lay-sing 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +17 -17
  2. package/esm/main/expect/index.d.ts +31 -0
  3. package/esm/main/expect/index.d.ts.map +1 -0
  4. package/esm/main/expect/index.js +2 -0
  5. package/esm/main/expect/index.js.map +1 -0
  6. package/esm/main/expect/to/be.d.ts +23 -0
  7. package/esm/main/expect/to/be.d.ts.map +1 -0
  8. package/esm/main/expect/to/be.js +2 -0
  9. package/esm/main/expect/to/be.js.map +1 -0
  10. package/esm/main/expect/to/equal.d.ts +26 -0
  11. package/esm/main/expect/to/equal.d.ts.map +1 -0
  12. package/esm/main/expect/to/equal.js +2 -0
  13. package/esm/main/expect/to/equal.js.map +1 -0
  14. package/esm/main/expect/to/extend.d.ts +31 -0
  15. package/esm/main/expect/to/extend.d.ts.map +1 -0
  16. package/esm/main/expect/to/extend.js +2 -0
  17. package/esm/main/expect/to/extend.js.map +1 -0
  18. package/esm/main/expect/to/have-key.d.ts +38 -0
  19. package/esm/main/expect/to/have-key.d.ts.map +1 -0
  20. package/esm/main/expect/to/have-key.js +2 -0
  21. package/esm/main/expect/to/have-key.js.map +1 -0
  22. package/esm/main/expect/to/index.d.ts +13 -0
  23. package/esm/main/expect/to/index.d.ts.map +1 -0
  24. package/esm/main/expect/to/index.js +2 -0
  25. package/esm/main/expect/to/index.js.map +1 -0
  26. package/esm/main/expect/to/proper-extends.d.ts +21 -0
  27. package/esm/main/expect/to/proper-extends.d.ts.map +1 -0
  28. package/esm/main/expect/to/proper-extends.js +2 -0
  29. package/esm/main/expect/to/proper-extends.js.map +1 -0
  30. package/esm/main/index.d.ts +10 -8
  31. package/esm/main/index.d.ts.map +1 -1
  32. package/esm/main/index.js +20 -3
  33. package/esm/main/index.js.map +1 -1
  34. package/esm/utils/compare/exact.d.ts +8 -8
  35. package/esm/utils/compare/exact.js.map +1 -1
  36. package/esm/utils/index.d.ts +1 -0
  37. package/esm/utils/index.d.ts.map +1 -1
  38. package/esm/utils/index.js +1 -0
  39. package/esm/utils/index.js.map +1 -1
  40. package/esm/utils/logic/assert.d.ts +3 -3
  41. package/esm/utils/logic/assert.js.map +1 -1
  42. package/esm/utils/logic/switch.d.ts +1 -1
  43. package/esm/utils/logic/switch.js.map +1 -1
  44. package/esm/utils/misc.d.ts +34 -0
  45. package/esm/utils/misc.d.ts.map +1 -0
  46. package/esm/utils/misc.js +2 -0
  47. package/esm/utils/misc.js.map +1 -0
  48. package/esm/utils/object/keys.d.ts +12 -12
  49. package/esm/utils/object/keys.js.map +1 -1
  50. package/esm/utils/object/pick.d.ts +1 -1
  51. package/esm/utils/object/pick.js.map +1 -1
  52. package/esm/utils/object/props.d.ts +1 -1
  53. package/esm/utils/object/props.js.map +1 -1
  54. package/esm/utils/tuple/append.d.ts +2 -2
  55. package/esm/utils/tuple/append.js.map +1 -1
  56. package/esm/utils/tuple/concat.d.ts +2 -2
  57. package/esm/utils/tuple/concat.js.map +1 -1
  58. package/esm/utils/tuple/includes.d.ts +3 -3
  59. package/esm/utils/tuple/includes.js.map +1 -1
  60. package/package.json +1 -1
  61. package/script/main/expect/index.d.ts +31 -0
  62. package/script/main/expect/index.d.ts.map +1 -0
  63. package/script/main/{expect.js → expect/index.js} +1 -1
  64. package/script/main/expect/index.js.map +1 -0
  65. package/script/main/expect/to/be.d.ts +23 -0
  66. package/script/main/expect/to/be.d.ts.map +1 -0
  67. package/script/main/expect/to/be.js +3 -0
  68. package/script/main/expect/to/be.js.map +1 -0
  69. package/script/main/expect/to/equal.d.ts +26 -0
  70. package/script/main/expect/to/equal.d.ts.map +1 -0
  71. package/script/main/expect/to/equal.js +3 -0
  72. package/script/main/expect/to/equal.js.map +1 -0
  73. package/script/main/expect/to/extend.d.ts +31 -0
  74. package/script/main/expect/to/extend.d.ts.map +1 -0
  75. package/script/main/expect/to/extend.js +3 -0
  76. package/script/main/expect/to/extend.js.map +1 -0
  77. package/script/main/expect/to/have-key.d.ts +38 -0
  78. package/script/main/expect/to/have-key.d.ts.map +1 -0
  79. package/script/main/expect/to/have-key.js +3 -0
  80. package/script/main/expect/to/have-key.js.map +1 -0
  81. package/script/main/expect/to/index.d.ts +13 -0
  82. package/script/main/expect/to/index.d.ts.map +1 -0
  83. package/script/main/expect/to/index.js +3 -0
  84. package/script/main/expect/to/index.js.map +1 -0
  85. package/script/main/expect/to/proper-extends.d.ts +21 -0
  86. package/script/main/expect/to/proper-extends.d.ts.map +1 -0
  87. package/script/main/expect/to/proper-extends.js +3 -0
  88. package/script/main/expect/to/proper-extends.js.map +1 -0
  89. package/script/main/index.d.ts +10 -8
  90. package/script/main/index.d.ts.map +1 -1
  91. package/script/main/index.js +21 -5
  92. package/script/main/index.js.map +1 -1
  93. package/script/utils/compare/exact.d.ts +8 -8
  94. package/script/utils/compare/exact.js.map +1 -1
  95. package/script/utils/index.d.ts +1 -0
  96. package/script/utils/index.d.ts.map +1 -1
  97. package/script/utils/index.js +1 -0
  98. package/script/utils/index.js.map +1 -1
  99. package/script/utils/logic/assert.d.ts +3 -3
  100. package/script/utils/logic/assert.js.map +1 -1
  101. package/script/utils/logic/switch.d.ts +1 -1
  102. package/script/utils/logic/switch.js.map +1 -1
  103. package/script/utils/misc.d.ts +34 -0
  104. package/script/utils/misc.d.ts.map +1 -0
  105. package/script/utils/misc.js +3 -0
  106. package/script/utils/misc.js.map +1 -0
  107. package/script/utils/object/keys.d.ts +12 -12
  108. package/script/utils/object/keys.js.map +1 -1
  109. package/script/utils/object/pick.d.ts +1 -1
  110. package/script/utils/object/pick.js.map +1 -1
  111. package/script/utils/object/props.d.ts +1 -1
  112. package/script/utils/object/props.js.map +1 -1
  113. package/script/utils/tuple/append.d.ts +2 -2
  114. package/script/utils/tuple/append.js.map +1 -1
  115. package/script/utils/tuple/concat.d.ts +2 -2
  116. package/script/utils/tuple/concat.js.map +1 -1
  117. package/script/utils/tuple/includes.d.ts +3 -3
  118. package/script/utils/tuple/includes.js.map +1 -1
  119. package/esm/main/expect.d.ts +0 -293
  120. package/esm/main/expect.d.ts.map +0 -1
  121. package/esm/main/expect.js +0 -2
  122. package/esm/main/expect.js.map +0 -1
  123. package/script/main/expect.d.ts +0 -293
  124. package/script/main/expect.d.ts.map +0 -1
  125. package/script/main/expect.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"exact.js","sourceRoot":"","sources":["../../../src/utils/compare/exact.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Checks whether two types are exactly the same.\n *\n * **⚠️Important:** parameter `A` and `B` are not distributive. When they are union type, it does not check each member separately.\n *\n * @template A - The first type to compare\n * @template B - The second type to compare\n * @template Yes - The result if types are exactly the same (defaults to `true`)\n * @template No - The result if types are not exactly the same (defaults to `false`)\n *\n * ### Result\n *\n * - `Yes`: `A` and `B` are exactly the same\n * - `No`: Otherwise\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<Exact<string, string>>().toBeTrue\n * expect<Exact<never, never>>().toBeTrue\n * expect<Exact<any, any>>().toBeTrue\n *\n * expect<Exact<{ a: 3 }, { a?: 3 }>>().toBeFalse\n * expect<Exact<1 | 2, 1>>().toBeFalse\n * expect<Exact<1, number>>().toBeFalse\n * expect<Exact<() => void, () => undefined>>().toBeFalse\n * ```\n */\nexport type Exact<\n A,\n B,\n Yes = true,\n No = false,\n> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? Yes : No\n\n/**\n * Checks whether two types are not exactly the same.\n *\n * This is the logical negation of `Exact<A, B>`.\n *\n * @template A - The first type to compare\n * @template B - The second type to compare\n * @template Yes - The result if types are not exactly the same (defaults to `true`)\n * @template No - The result if types are exactly the same (defaults to `false`)\n *\n * @example\n * ```ts\n * type T1 = NotExact<number, string> // true\n * type T2 = NotExact<1, number> // true\n * type F1 = NotExact<number, number> // false\n * type F2 = NotExact<1, 1> // false\n * ```\n */\nexport type NotExact<\n A,\n B,\n Yes = true,\n No = false,\n> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? No : Yes\n"]}
1
+ {"version":3,"file":"exact.js","sourceRoot":"","sources":["../../../src/utils/compare/exact.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Checks whether two types are exactly the same.\n *\n * **⚠️Important:** parameter `A` and `B` are not distributive. When they are union type, it does not check each member separately.\n *\n * @template A - The first type to compare\n * @template B - The second type to compare\n * @template Yes - The result if types are exactly the same (defaults to `true`)\n * @template No - The result if types are not exactly the same (defaults to `false`)\n *\n * ### Result\n *\n * - `Yes`: `A` and `B` are exactly the same\n * - `No`: Otherwise\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<Exact<string, string>>().to.be.true\n * expect<Exact<never, never>>().to.be.true\n * expect<Exact<any, any>>().to.be.true\n *\n * expect<Exact<{ a: 3 }, { a?: 3 }>>().to.be.false\n * expect<Exact<1 | 2, 1>>().to.be.false\n * expect<Exact<1, number>>().to.be.false\n * expect<Exact<() => void, () => undefined>>().to.be.false\n * ```\n */\nexport type Exact<\n A,\n B,\n Yes = true,\n No = false,\n> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? Yes : No\n\n/**\n * Checks whether two types are not exactly the same.\n *\n * This is the logical negation of `Exact<A, B>`.\n *\n * @template A - The first type to compare\n * @template B - The second type to compare\n * @template Yes - The result if types are not exactly the same (defaults to `true`)\n * @template No - The result if types are exactly the same (defaults to `false`)\n *\n * @example\n * ```ts\n * type T1 = NotExact<number, string> // true\n * type T2 = NotExact<1, number> // true\n * type F1 = NotExact<number, number> // false\n * type F2 = NotExact<1, 1> // false\n * ```\n */\nexport type NotExact<\n A,\n B,\n Yes = true,\n No = false,\n> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? No : Yes\n"]}
@@ -5,6 +5,7 @@
5
5
  */
6
6
  export * from './compare/index.js';
7
7
  export * from './logic/index.js';
8
+ export * from './misc.js';
8
9
  export * from './object/index.js';
9
10
  export * from './tuple/index.js';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  // Index start >>>>>>>>>>>>>>>>
23
23
  __exportStar(require("./compare/index.js"), exports);
24
24
  __exportStar(require("./logic/index.js"), exports);
25
+ __exportStar(require("./misc.js"), exports);
25
26
  __exportStar(require("./object/index.js"), exports);
26
27
  __exportStar(require("./tuple/index.js"), exports);
27
28
  // <<<<<<<<<<<<<<<< Index end
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,+BAA+B;AAC/B,qDAAkC;AAClC,mDAAgC;AAChC,oDAAiC;AACjC,mDAAgC;AAChC,+BAA+B","sourcesContent":["/**\n * [Full API documentation is available on JSR](https://jsr.io/@leawind/lay-sing/doc)\n *\n * @module\n */\n\n// Index start >>>>>>>>>>>>>>>>\nexport * from './compare/index.js'\nexport * from './logic/index.js'\nexport * from './object/index.js'\nexport * from './tuple/index.js'\n// <<<<<<<<<<<<<<<< Index end\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,+BAA+B;AAC/B,qDAAkC;AAClC,mDAAgC;AAChC,4CAAyB;AACzB,oDAAiC;AACjC,mDAAgC;AAChC,+BAA+B","sourcesContent":["/**\n * [Full API documentation is available on JSR](https://jsr.io/@leawind/lay-sing/doc)\n *\n * @module\n */\n\n// Index start >>>>>>>>>>>>>>>>\nexport * from './compare/index.js'\nexport * from './logic/index.js'\nexport * from './misc.js'\nexport * from './object/index.js'\nexport * from './tuple/index.js'\n// <<<<<<<<<<<<<<<< Index end\n"]}
@@ -9,9 +9,9 @@
9
9
  * ```ts
10
10
  * import { expect } from '@leawind/lay-sing'
11
11
  *
12
- * expect<AssertExtends<string, number>>().toBeNever
13
- * expect<AssertExtends<1 | 2, 1>>().toBeNever
14
- * expect<AssertExtends<1, 1 | 2>>().toBe<1>().success
12
+ * expect<AssertExtends<string, number>>().to.be.never
13
+ * expect<AssertExtends<1 | 2, 1>>().to.be.never
14
+ * expect<AssertExtends<1, 1 | 2>>().to.be<1>().pass
15
15
  * ```
16
16
  */
17
17
  export type AssertExtends<T, U> = [T] extends [U] ? T : never;
@@ -1 +1 @@
1
- {"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../src/utils/logic/assert.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * **⚠️Important:** parameter `T` and `U` are not distributive. When they are union type, it treats them as a single entity.\n *\n * @template T - The type to test (not distributed over unions)\n * @template U - The constraint type to test against\n *\n * @example\n *\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<AssertExtends<string, number>>().toBeNever\n * expect<AssertExtends<1 | 2, 1>>().toBeNever\n * expect<AssertExtends<1, 1 | 2>>().toBe<1>().success\n * ```\n */\nexport type AssertExtends<T, U> = [T] extends [U] ? T : never\n"]}
1
+ {"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../src/utils/logic/assert.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * **⚠️Important:** parameter `T` and `U` are not distributive. When they are union type, it treats them as a single entity.\n *\n * @template T - The type to test (not distributed over unions)\n * @template U - The constraint type to test against\n *\n * @example\n *\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<AssertExtends<string, number>>().to.be.never\n * expect<AssertExtends<1 | 2, 1>>().to.be.never\n * expect<AssertExtends<1, 1 | 2>>().to.be<1>().pass\n * ```\n */\nexport type AssertExtends<T, U> = [T] extends [U] ? T : never\n"]}
@@ -80,7 +80,7 @@ export type SwitchExact<T, Cases extends readonly [unknown, unknown][], Default
80
80
  * [number, boolean],
81
81
  * [string, boolean],
82
82
  * ], Error>
83
- * >().toBe<boolean>().success
83
+ * >().to.be<boolean>().pass
84
84
  * ```
85
85
  */
86
86
  export type SwitchExtends<T, Cases extends readonly [unknown, unknown][], Default = never> = Cases extends [infer First, ...infer Rest] ? (First extends [infer C, infer R] ? ([T] extends [C] ? R : SwitchExtends<T, Rest extends readonly [unknown, unknown][] ? Rest : never, Default>) : never) : Default;
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/utils/logic/switch.ts"],"names":[],"mappings":"","sourcesContent":["import type { Exact } from '../index.js'\n\n/**\n * Case tuple type used with `SwitchExact` and `SwitchExtends`\n *\n * @template T - The condition type to match against\n * @template Result - The result type to return if match is found\n *\n * @example\n * ```ts\n * type MyCase = Case<1, 'one'>\n * // Equivalent to: [1, 'one']\n * ```\n *\n * @example\n * ```ts\n * import { SwitchExact, DefaultCase } from '@leawind/lay-sing/utils'\n * type NameMap<id> = SwitchExact<id, [\n * [1, 'Alice'],\n * [2, 'Bob'],\n * ], DefaultCase<'Steve'>>\n * ```\n *\n * @see SwitchExact\n */\nexport type Case<T = unknown, Result = unknown> = [T, Result]\n\n/**\n * Default case type used with `SwitchExact` and `SwitchExtends`\n *\n * @template T - The default result type\n *\n * @example\n * ```ts\n * import { SwitchExact, DefaultCase } from '@leawind/lay-sing/utils'\n * type NameMap<id> = SwitchExact<id, [\n * [1, 'Alice'],\n * [2, 'Bob'],\n * ], DefaultCase<'Steve'>>\n * ```\n *\n * @see SwitchExact\n */\nexport type DefaultCase<T> = T\n\n/**\n * Switch type that uses exact matching logic\n *\n * **⚠️Important:** `T` parameter is not distributive. When `T` is a union type, it does not check each member separately.\n *\n * @template T - The type to match against cases\n * @template Cases - Array of case tuples, each tuple has the form [Condition, Result]\n * @template Default - Default result if no exact match is found (defaults to `never`)\n *\n * @example\n * ```ts\n * import { SwitchExact, DefaultCase } from '@leawind/lay-sing/utils'\n * type Result = SwitchExact<2, [\n * [1, 'Alice'],\n * [2, 'Bob'],\n * [3, 'Charlie'],\n * ], DefaultCase<'Steve'>>\n *\n * // Result: 'Bob'\n * ```\n */\nexport type SwitchExact<\n T,\n Cases extends readonly [unknown, unknown][],\n Default = never,\n> = Cases extends [infer First, ...infer Rest] ? (\n First extends [infer Condition, infer Result] ? (Exact<T, Condition> extends true ? Result\n : (SwitchExact<T, Rest extends readonly [unknown, unknown][] ? Rest : never, Default>))\n : (never)\n )\n : Default\n\n/**\n * Switch type that uses 'extends' logic instead of 'Exact' logic\n *\n * **⚠️Important:** `T` parameter is not distributive. When `T` is a union type, it does not check each member separately.\n *\n * @template T - The type to match against cases\n * @template Cases - Array of case tuples, each tuple has the form [Condition, Result]\n * @template Default - Default result if no match is found (defaults to `never`)\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<\n * SwitchExtends<string, [\n * [number, boolean],\n * [string, boolean],\n * ], Error>\n * >().toBe<boolean>().success\n * ```\n */\nexport type SwitchExtends<\n T,\n Cases extends readonly [unknown, unknown][],\n Default = never,\n> = Cases extends [infer First, ...infer Rest] ? (\n First extends [infer C, infer R]\n ? ([T] extends [C] ? R : SwitchExtends<T, Rest extends readonly [unknown, unknown][] ? Rest : never, Default>)\n : never\n )\n : Default\n"]}
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/utils/logic/switch.ts"],"names":[],"mappings":"","sourcesContent":["import type { Exact } from '../index.js'\n\n/**\n * Case tuple type used with `SwitchExact` and `SwitchExtends`\n *\n * @template T - The condition type to match against\n * @template Result - The result type to return if match is found\n *\n * @example\n * ```ts\n * type MyCase = Case<1, 'one'>\n * // Equivalent to: [1, 'one']\n * ```\n *\n * @example\n * ```ts\n * import { SwitchExact, DefaultCase } from '@leawind/lay-sing/utils'\n * type NameMap<id> = SwitchExact<id, [\n * [1, 'Alice'],\n * [2, 'Bob'],\n * ], DefaultCase<'Steve'>>\n * ```\n *\n * @see SwitchExact\n */\nexport type Case<T = unknown, Result = unknown> = [T, Result]\n\n/**\n * Default case type used with `SwitchExact` and `SwitchExtends`\n *\n * @template T - The default result type\n *\n * @example\n * ```ts\n * import { SwitchExact, DefaultCase } from '@leawind/lay-sing/utils'\n * type NameMap<id> = SwitchExact<id, [\n * [1, 'Alice'],\n * [2, 'Bob'],\n * ], DefaultCase<'Steve'>>\n * ```\n *\n * @see SwitchExact\n */\nexport type DefaultCase<T> = T\n\n/**\n * Switch type that uses exact matching logic\n *\n * **⚠️Important:** `T` parameter is not distributive. When `T` is a union type, it does not check each member separately.\n *\n * @template T - The type to match against cases\n * @template Cases - Array of case tuples, each tuple has the form [Condition, Result]\n * @template Default - Default result if no exact match is found (defaults to `never`)\n *\n * @example\n * ```ts\n * import { SwitchExact, DefaultCase } from '@leawind/lay-sing/utils'\n * type Result = SwitchExact<2, [\n * [1, 'Alice'],\n * [2, 'Bob'],\n * [3, 'Charlie'],\n * ], DefaultCase<'Steve'>>\n *\n * // Result: 'Bob'\n * ```\n */\nexport type SwitchExact<\n T,\n Cases extends readonly [unknown, unknown][],\n Default = never,\n> = Cases extends [infer First, ...infer Rest] ? (\n First extends [infer Condition, infer Result] ? (Exact<T, Condition> extends true ? Result\n : (SwitchExact<T, Rest extends readonly [unknown, unknown][] ? Rest : never, Default>))\n : (never)\n )\n : Default\n\n/**\n * Switch type that uses 'extends' logic instead of 'Exact' logic\n *\n * **⚠️Important:** `T` parameter is not distributive. When `T` is a union type, it does not check each member separately.\n *\n * @template T - The type to match against cases\n * @template Cases - Array of case tuples, each tuple has the form [Condition, Result]\n * @template Default - Default result if no match is found (defaults to `never`)\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<\n * SwitchExtends<string, [\n * [number, boolean],\n * [string, boolean],\n * ], Error>\n * >().to.be<boolean>().pass\n * ```\n */\nexport type SwitchExtends<\n T,\n Cases extends readonly [unknown, unknown][],\n Default = never,\n> = Cases extends [infer First, ...infer Rest] ? (\n First extends [infer C, infer R]\n ? ([T] extends [C] ? R : SwitchExtends<T, Rest extends readonly [unknown, unknown][] ? Rest : never, Default>)\n : never\n )\n : Default\n"]}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Creates an intersection of all types in the provided tuple
3
+ *
4
+ * ## `IntersectionOf<[A, B, ... T]>` = `A & B & ... & T`
5
+ *
6
+ * @template Types - A tuple of types to create an intersection from
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { expect } from '@leawind/lay-sing'
11
+ *
12
+ * type Result = IntersectionOf<[{ a: string }, { b: number }, { c: boolean }]>
13
+ * expect<Result>().to.extend<{ a: string } & { b: number } & { c: boolean }>().pass
14
+ * expect<Result>().to.extend<{ a: string; b: number; c: boolean }>().pass
15
+ * ```
16
+ */
17
+ export type IntersectionOf<Types extends readonly unknown[]> = Types extends [infer First, ...infer Rest] ? First & IntersectionOf<Rest> : unknown;
18
+ /**
19
+ * Creates a union of all types in the provided tuple
20
+ *
21
+ * ## `UnionOf<[A, B, ... T]>` = `A | B | ... | T`
22
+ *
23
+ * @template Types - A tuple of types to create a union from
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * import { expect } from '@leawind/lay-sing'
28
+ *
29
+ * type Result = UnionOf<[string, number, boolean]>
30
+ * expect<Result>().to.be<string | number | boolean>().pass
31
+ * ```
32
+ */
33
+ export type UnionOf<Types extends readonly unknown[]> = Types extends [infer First, ...infer Rest] ? First | UnionOf<Rest> : never;
34
+ //# sourceMappingURL=misc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/utils/misc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,MAAM,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,GACrG,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,GAC5B,OAAO,CAAA;AAEX;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,MAAM,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,GAC9F,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,GACrB,KAAK,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=misc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/utils/misc.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Creates an intersection of all types in the provided tuple\n *\n * ## `IntersectionOf<[A, B, ... T]>` = `A & B & ... & T`\n *\n * @template Types - A tuple of types to create an intersection from\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * type Result = IntersectionOf<[{ a: string }, { b: number }, { c: boolean }]>\n * expect<Result>().to.extend<{ a: string } & { b: number } & { c: boolean }>().pass\n * expect<Result>().to.extend<{ a: string; b: number; c: boolean }>().pass\n * ```\n */\nexport type IntersectionOf<Types extends readonly unknown[]> = Types extends [infer First, ...infer Rest]\n ? First & IntersectionOf<Rest>\n : unknown\n\n/**\n * Creates a union of all types in the provided tuple\n *\n * ## `UnionOf<[A, B, ... T]>` = `A | B | ... | T`\n *\n * @template Types - A tuple of types to create a union from\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * type Result = UnionOf<[string, number, boolean]>\n * expect<Result>().to.be<string | number | boolean>().pass\n * ```\n */\nexport type UnionOf<Types extends readonly unknown[]> = Types extends [infer First, ...infer Rest]\n ? First | UnionOf<Rest>\n : never\n"]}
@@ -14,17 +14,17 @@ import type { Exact } from '../index.js';
14
14
  *
15
15
  * // Basic usage: match exact type (non-optional property)
16
16
  * type A = { a: 1; b: 2; c: 1 };
17
- * expect<KeysOfExactType<A, 1>>().toBe<'a' | 'c'>().success
17
+ * expect<KeysOfExactType<A, 1>>().to.be<'a' | 'c'>().pass
18
18
  *
19
19
  * // Key difference: optional property matching (requires undefined in `ValueType`)
20
20
  * type B = { a?: string };
21
- * expect<KeysOfExactType<B, string | undefined>>().toBe<'a'>().success // matches complete type
22
- * expect<KeysOfExactType<B, string>>().toBe<never>().success // does not match complete type
21
+ * expect<KeysOfExactType<B, string | undefined>>().to.be<'a'>().pass // matches complete type
22
+ * expect<KeysOfExactType<B, string>>().to.be<never>().pass // does not match complete type
23
23
  *
24
24
  * type C = { a: never; b: any; c: unknown };
25
- * expect<KeysOfExactType<C, never>>().toBe<'a'>().success
26
- * expect<KeysOfExactType<C, any>>().toBe<'b'>().success
27
- * expect<KeysOfExactType<C, unknown>>().toBe<'c'>().success
25
+ * expect<KeysOfExactType<C, never>>().to.be<'a'>().pass
26
+ * expect<KeysOfExactType<C, any>>().to.be<'b'>().pass
27
+ * expect<KeysOfExactType<C, unknown>>().to.be<'c'>().pass
28
28
  * ```
29
29
  */
30
30
  export type KeysOfExactType<Obj, ValueType> = Exclude<{
@@ -45,17 +45,17 @@ export type KeysOfExactType<Obj, ValueType> = Exclude<{
45
45
  *
46
46
  * // Basic usage: match base type (non-optional property)
47
47
  * type A = { a: 1; b: 2; c: 1 };
48
- * expect<KeysOfBaseType<A, 1>>().toBe<'a' | 'c'>().success
48
+ * expect<KeysOfBaseType<A, 1>>().to.be<'a' | 'c'>().pass
49
49
  *
50
50
  * // Key difference: optional property matching (ignores undefined)
51
51
  * type B = { a?: string; b: string };
52
- * expect<KeysOfBaseType<B, string>>().toBe<'a' | 'b'>().success // matches base type of both
53
- * expect<KeysOfBaseType<B, string | undefined>>().toBe<never>().success // base type does not include undefined
52
+ * expect<KeysOfBaseType<B, string>>().to.be<'a' | 'b'>().pass // matches base type of both
53
+ * expect<KeysOfBaseType<B, string | undefined>>().to.be<never>().pass // base type does not include undefined
54
54
  *
55
55
  * type C = { a: never; b: any; c: unknown };
56
- * expect<KeysOfBaseType<C, never>>().toBe<'a'>().success
57
- * expect<KeysOfBaseType<C, any>>().toBe<'b'>().success
58
- * expect<KeysOfBaseType<C, unknown>>().toBe<'c'>().success
56
+ * expect<KeysOfBaseType<C, never>>().to.be<'a'>().pass
57
+ * expect<KeysOfBaseType<C, any>>().to.be<'b'>().pass
58
+ * expect<KeysOfBaseType<C, unknown>>().to.be<'c'>().pass
59
59
  * ```
60
60
  */
61
61
  export type KeysOfBaseType<Obj, ValueType> = Exclude<{
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../src/utils/object/keys.ts"],"names":[],"mappings":"","sourcesContent":["import type { Exact } from '../index.js'\n\n/**\n * Extracts the keys of an object whose **complete value type** exactly matches the specified `ValueType` (including undefined for optional properties).\n *\n * This utility strictly matches the full type of each property (including `undefined` added by optional modifiers `?`).\n * For optional properties (e.g., `a?: string`), the type is treated as `string | undefined` – to match, `ValueType` must include `undefined`.\n *\n * @template Obj - The target object type to extract keys from.\n * @template ValueType - The exact type to match against property values (including undefined for optional properties).\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * // Basic usage: match exact type (non-optional property)\n * type A = { a: 1; b: 2; c: 1 };\n * expect<KeysOfExactType<A, 1>>().toBe<'a' | 'c'>().success\n *\n * // Key difference: optional property matching (requires undefined in `ValueType`)\n * type B = { a?: string };\n * expect<KeysOfExactType<B, string | undefined>>().toBe<'a'>().success // matches complete type\n * expect<KeysOfExactType<B, string>>().toBe<never>().success // does not match complete type\n *\n * type C = { a: never; b: any; c: unknown };\n * expect<KeysOfExactType<C, never>>().toBe<'a'>().success\n * expect<KeysOfExactType<C, any>>().toBe<'b'>().success\n * expect<KeysOfExactType<C, unknown>>().toBe<'c'>().success\n * ```\n */\nexport type KeysOfExactType<Obj, ValueType> = Exclude<\n { [K in keyof Obj]: Exact<Obj[K], ValueType> extends true ? K : never }[keyof Obj],\n undefined\n>\n\n/**\n * Extracts the keys of an object whose **base value type** matches the specified `ValueType` (ignoring undefined from optional properties).\n *\n * This utility matches the underlying/base type of each property (stripping `undefined` added by optional modifiers `?`).\n * For optional properties (e.g., `a?: string`), the type is treated as `string` – no need to include `undefined` in `ValueType` to match.\n *\n * @template Obj - The target object type to extract keys from.\n * @template ValueType - The base type to match against property values (ignoring undefined from optional properties).\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * // Basic usage: match base type (non-optional property)\n * type A = { a: 1; b: 2; c: 1 };\n * expect<KeysOfBaseType<A, 1>>().toBe<'a' | 'c'>().success\n *\n * // Key difference: optional property matching (ignores undefined)\n * type B = { a?: string; b: string };\n * expect<KeysOfBaseType<B, string>>().toBe<'a' | 'b'>().success // matches base type of both\n * expect<KeysOfBaseType<B, string | undefined>>().toBe<never>().success // base type does not include undefined\n *\n * type C = { a: never; b: any; c: unknown };\n * expect<KeysOfBaseType<C, never>>().toBe<'a'>().success\n * expect<KeysOfBaseType<C, any>>().toBe<'b'>().success\n * expect<KeysOfBaseType<C, unknown>>().toBe<'c'>().success\n * ```\n */\nexport type KeysOfBaseType<Obj, ValueType> = Exclude<\n {\n [K in keyof Obj]: Exact<Required<Obj>[K], ValueType> extends true ? K : never\n }[keyof Obj],\n undefined\n>\n"]}
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../src/utils/object/keys.ts"],"names":[],"mappings":"","sourcesContent":["import type { Exact } from '../index.js'\n\n/**\n * Extracts the keys of an object whose **complete value type** exactly matches the specified `ValueType` (including undefined for optional properties).\n *\n * This utility strictly matches the full type of each property (including `undefined` added by optional modifiers `?`).\n * For optional properties (e.g., `a?: string`), the type is treated as `string | undefined` – to match, `ValueType` must include `undefined`.\n *\n * @template Obj - The target object type to extract keys from.\n * @template ValueType - The exact type to match against property values (including undefined for optional properties).\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * // Basic usage: match exact type (non-optional property)\n * type A = { a: 1; b: 2; c: 1 };\n * expect<KeysOfExactType<A, 1>>().to.be<'a' | 'c'>().pass\n *\n * // Key difference: optional property matching (requires undefined in `ValueType`)\n * type B = { a?: string };\n * expect<KeysOfExactType<B, string | undefined>>().to.be<'a'>().pass // matches complete type\n * expect<KeysOfExactType<B, string>>().to.be<never>().pass // does not match complete type\n *\n * type C = { a: never; b: any; c: unknown };\n * expect<KeysOfExactType<C, never>>().to.be<'a'>().pass\n * expect<KeysOfExactType<C, any>>().to.be<'b'>().pass\n * expect<KeysOfExactType<C, unknown>>().to.be<'c'>().pass\n * ```\n */\nexport type KeysOfExactType<Obj, ValueType> = Exclude<\n { [K in keyof Obj]: Exact<Obj[K], ValueType> extends true ? K : never }[keyof Obj],\n undefined\n>\n\n/**\n * Extracts the keys of an object whose **base value type** matches the specified `ValueType` (ignoring undefined from optional properties).\n *\n * This utility matches the underlying/base type of each property (stripping `undefined` added by optional modifiers `?`).\n * For optional properties (e.g., `a?: string`), the type is treated as `string` – no need to include `undefined` in `ValueType` to match.\n *\n * @template Obj - The target object type to extract keys from.\n * @template ValueType - The base type to match against property values (ignoring undefined from optional properties).\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * // Basic usage: match base type (non-optional property)\n * type A = { a: 1; b: 2; c: 1 };\n * expect<KeysOfBaseType<A, 1>>().to.be<'a' | 'c'>().pass\n *\n * // Key difference: optional property matching (ignores undefined)\n * type B = { a?: string; b: string };\n * expect<KeysOfBaseType<B, string>>().to.be<'a' | 'b'>().pass // matches base type of both\n * expect<KeysOfBaseType<B, string | undefined>>().to.be<never>().pass // base type does not include undefined\n *\n * type C = { a: never; b: any; c: unknown };\n * expect<KeysOfBaseType<C, never>>().to.be<'a'>().pass\n * expect<KeysOfBaseType<C, any>>().to.be<'b'>().pass\n * expect<KeysOfBaseType<C, unknown>>().to.be<'c'>().pass\n * ```\n */\nexport type KeysOfBaseType<Obj, ValueType> = Exclude<\n {\n [K in keyof Obj]: Exact<Required<Obj>[K], ValueType> extends true ? K : never\n }[keyof Obj],\n undefined\n>\n"]}
@@ -9,7 +9,7 @@
9
9
  * import { expect } from '@leawind/lay-sing'
10
10
  *
11
11
  * type Result = SafePick<{ a: string; b: number }, 'a' | 'c'>
12
- * expect<Result>().toBe<{ a: string }>().success
12
+ * expect<Result>().to.be<{ a: string }>().pass
13
13
  * ```
14
14
  */
15
15
  export type SafePick<Obj, Key> = Pick<Obj, Key & keyof Obj>;
@@ -1 +1 @@
1
- {"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../src/utils/object/pick.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Safely picks keys `Key` from type `Obj`, excluding non-existent keys\n *\n * @template Obj - The object type to pick keys from\n * @template Key - The keys to pick from the object\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * type Result = SafePick<{ a: string; b: number }, 'a' | 'c'>\n * expect<Result>().toBe<{ a: string }>().success\n * ```\n */\nexport type SafePick<Obj, Key> = Pick<Obj, Key & keyof Obj>\n"]}
1
+ {"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../src/utils/object/pick.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Safely picks keys `Key` from type `Obj`, excluding non-existent keys\n *\n * @template Obj - The object type to pick keys from\n * @template Key - The keys to pick from the object\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * type Result = SafePick<{ a: string; b: number }, 'a' | 'c'>\n * expect<Result>().to.be<{ a: string }>().pass\n * ```\n */\nexport type SafePick<Obj, Key> = Pick<Obj, Key & keyof Obj>\n"]}
@@ -10,7 +10,7 @@ import type { KeysOfBaseType } from '../index.js';
10
10
  * import { expect } from '@leawind/lay-sing'
11
11
  * type A = { a: string; b: number; c: string }
12
12
  * type Strings = PropsOfBaseType<A, string> // { a: string; c: string }
13
- * expect<PropsOfBaseType<A, string>>().toBe<{ a: string; c: string }>()
13
+ * expect<PropsOfBaseType<A, string>>().to.be<{ a: string; c: string }>()
14
14
  * ```
15
15
  */
16
16
  export type PropsOfBaseType<T, U> = Pick<T, KeysOfBaseType<Required<T>, U>>;
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/utils/object/props.ts"],"names":[],"mappings":"","sourcesContent":["import type { KeysOfBaseType } from '../index.js'\n\n/**\n * Picks properties from `T` that have values of type `U`\n *\n * @template T - The object type to pick properties from\n * @template U - The value type to match against\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n * type A = { a: string; b: number; c: string }\n * type Strings = PropsOfBaseType<A, string> // { a: string; c: string }\n * expect<PropsOfBaseType<A, string>>().toBe<{ a: string; c: string }>()\n * ```\n */\nexport type PropsOfBaseType<T, U> = Pick<T, KeysOfBaseType<Required<T>, U>>\n"]}
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/utils/object/props.ts"],"names":[],"mappings":"","sourcesContent":["import type { KeysOfBaseType } from '../index.js'\n\n/**\n * Picks properties from `T` that have values of type `U`\n *\n * @template T - The object type to pick properties from\n * @template U - The value type to match against\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n * type A = { a: string; b: number; c: string }\n * type Strings = PropsOfBaseType<A, string> // { a: string; c: string }\n * expect<PropsOfBaseType<A, string>>().to.be<{ a: string; c: string }>()\n * ```\n */\nexport type PropsOfBaseType<T, U> = Pick<T, KeysOfBaseType<Required<T>, U>>\n"]}
@@ -9,8 +9,8 @@ import type { IfTupleIncludes } from '../index.js';
9
9
  * ```ts
10
10
  * import { expect } from '@leawind/lay-sing'
11
11
  *
12
- * expect<AppendUnique<[1, 2, 3], 4>>().toBe<[1, 2, 3, 4]>().success
13
- * expect<AppendUnique<[1, 2, 3], 2>>().toBe<[1, 2, 3]>().success
12
+ * expect<AppendUnique<[1, 2, 3], 4>>().to.be<[1, 2, 3, 4]>().pass
13
+ * expect<AppendUnique<[1, 2, 3], 2>>().to.be<[1, 2, 3]>().pass
14
14
  * ```
15
15
  */
16
16
  export type AppendUnique<Tuple extends readonly unknown[], Element> = IfTupleIncludes<Tuple, Element> extends true ? Tuple : [...Tuple, Element];
@@ -1 +1 @@
1
- {"version":3,"file":"append.js","sourceRoot":"","sources":["../../../src/utils/tuple/append.ts"],"names":[],"mappings":"","sourcesContent":["import type { IfTupleIncludes } from '../index.js'\n\n/**\n * Appends an element to a tuple only if it doesn't already exist in the tuple\n *\n * @template Tuple - The tuple type to append to\n * @template Element - The element type to append\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<AppendUnique<[1, 2, 3], 4>>().toBe<[1, 2, 3, 4]>().success\n * expect<AppendUnique<[1, 2, 3], 2>>().toBe<[1, 2, 3]>().success\n * ```\n */\nexport type AppendUnique<\n Tuple extends readonly unknown[],\n Element,\n> = IfTupleIncludes<Tuple, Element> extends true ? Tuple : [...Tuple, Element]\n"]}
1
+ {"version":3,"file":"append.js","sourceRoot":"","sources":["../../../src/utils/tuple/append.ts"],"names":[],"mappings":"","sourcesContent":["import type { IfTupleIncludes } from '../index.js'\n\n/**\n * Appends an element to a tuple only if it doesn't already exist in the tuple\n *\n * @template Tuple - The tuple type to append to\n * @template Element - The element type to append\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<AppendUnique<[1, 2, 3], 4>>().to.be<[1, 2, 3, 4]>().pass\n * expect<AppendUnique<[1, 2, 3], 2>>().to.be<[1, 2, 3]>().pass\n * ```\n */\nexport type AppendUnique<\n Tuple extends readonly unknown[],\n Element,\n> = IfTupleIncludes<Tuple, Element> extends true ? Tuple : [...Tuple, Element]\n"]}
@@ -9,7 +9,7 @@ import type { AppendUnique } from '../index.js';
9
9
  * ```ts
10
10
  * import { expect } from '@leawind/lay-sing'
11
11
  *
12
- * expect<ConcatTuple<[1, 2], [3, 4]>>().toBe<[1, 2, 3, 4]>().success
12
+ * expect<ConcatTuple<[1, 2], [3, 4]>>().to.be<[1, 2, 3, 4]>().pass
13
13
  * ```
14
14
  */
15
15
  export type ConcatTuple<Left extends readonly unknown[], Right extends readonly unknown[]> = Left extends readonly unknown[] ? (Right extends readonly unknown[] ? [...Left, ...Right] : never) : never;
@@ -24,7 +24,7 @@ export type ConcatTuple<Left extends readonly unknown[], Right extends readonly
24
24
  * ```ts
25
25
  * import { expect } from '@leawind/lay-sing'
26
26
  *
27
- * expect<ConcatUniqueTuple<[1, 2, 3], [2, 3, 4]>>().toBe<[1, 2, 3, 4]>().success
27
+ * expect<ConcatUniqueTuple<[1, 2, 3], [2, 3, 4]>>().to.be<[1, 2, 3, 4]>().pass
28
28
  * ```
29
29
  */
30
30
  export type ConcatUniqueTuple<Left extends readonly unknown[], Right extends readonly unknown[], R extends readonly unknown[] = Left> = Right extends readonly [infer First, ...infer Rest] ? ConcatUniqueTuple<Left, Rest, AppendUnique<R, First>> : R;
@@ -1 +1 @@
1
- {"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../src/utils/tuple/concat.ts"],"names":[],"mappings":"","sourcesContent":["// Import needed for ConcatUniqueTuple\nimport type { AppendUnique } from '../index.js'\n\n/**\n * Concatenates two tuples into a single tuple type\n *\n * @template Left - The first tuple type to concatenate\n * @template Right - The second tuple type to concatenate\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<ConcatTuple<[1, 2], [3, 4]>>().toBe<[1, 2, 3, 4]>().success\n * ```\n */\nexport type ConcatTuple<\n Left extends readonly unknown[],\n Right extends readonly unknown[],\n> = Left extends readonly unknown[] ? (Right extends readonly unknown[] ? [...Left, ...Right] : never) : never\n\n/**\n * Concatenates two tuples while ensuring uniqueness of elements\n *\n * @template Left - The first tuple type to concatenate\n * @template Right - The second tuple type to concatenate\n * @template R - The intermediate result tuple type (defaults to `Left`)\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<ConcatUniqueTuple<[1, 2, 3], [2, 3, 4]>>().toBe<[1, 2, 3, 4]>().success\n * ```\n */\nexport type ConcatUniqueTuple<\n Left extends readonly unknown[],\n Right extends readonly unknown[],\n R extends readonly unknown[] = Left,\n> = Right extends readonly [infer First, ...infer Rest] ? ConcatUniqueTuple<Left, Rest, AppendUnique<R, First>> : R\n"]}
1
+ {"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../src/utils/tuple/concat.ts"],"names":[],"mappings":"","sourcesContent":["// Import needed for ConcatUniqueTuple\nimport type { AppendUnique } from '../index.js'\n\n/**\n * Concatenates two tuples into a single tuple type\n *\n * @template Left - The first tuple type to concatenate\n * @template Right - The second tuple type to concatenate\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<ConcatTuple<[1, 2], [3, 4]>>().to.be<[1, 2, 3, 4]>().pass\n * ```\n */\nexport type ConcatTuple<\n Left extends readonly unknown[],\n Right extends readonly unknown[],\n> = Left extends readonly unknown[] ? (Right extends readonly unknown[] ? [...Left, ...Right] : never) : never\n\n/**\n * Concatenates two tuples while ensuring uniqueness of elements\n *\n * @template Left - The first tuple type to concatenate\n * @template Right - The second tuple type to concatenate\n * @template R - The intermediate result tuple type (defaults to `Left`)\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<ConcatUniqueTuple<[1, 2, 3], [2, 3, 4]>>().to.be<[1, 2, 3, 4]>().pass\n * ```\n */\nexport type ConcatUniqueTuple<\n Left extends readonly unknown[],\n Right extends readonly unknown[],\n R extends readonly unknown[] = Left,\n> = Right extends readonly [infer First, ...infer Rest] ? ConcatUniqueTuple<Left, Rest, AppendUnique<R, First>> : R\n"]}
@@ -11,9 +11,9 @@ import type { Exact } from '../index.js';
11
11
  * ```ts
12
12
  * import { expect } from '@leawind/lay-sing'
13
13
  *
14
- * expect<IfTupleIncludes<[1, 2, 3], 2>>().toBeTrue
15
- * expect<IfTupleIncludes<[1, 2, 3], 4>>().toBeFalse
16
- * expect<IfTupleIncludes<[1, 2, 1], 1>>().toBeTrue
14
+ * expect<IfTupleIncludes<[1, 2, 3], 2>>().to.be.true
15
+ * expect<IfTupleIncludes<[1, 2, 3], 4>>().to.be.false
16
+ * expect<IfTupleIncludes<[1, 2, 1], 1>>().to.be.true
17
17
  * ```
18
18
  */
19
19
  export type IfTupleIncludes<Tuple extends readonly unknown[], Element, Yes = true, No = false> = Exact<Tuple, any> extends true ? never : Tuple extends readonly [infer First, ...infer Rest] ? (Exact<Element, First> extends true ? Yes : IfTupleIncludes<Rest, Element, Yes, No>) : No;
@@ -1 +1 @@
1
- {"version":3,"file":"includes.js","sourceRoot":"","sources":["../../../src/utils/tuple/includes.ts"],"names":[],"mappings":"","sourcesContent":["import type { Exact } from '../index.js'\n\n/**\n * Checks whether a tuple includes a specific element type\n *\n * @template Tuple - The tuple type to check\n * @template Element - The element type to look for\n * @template Yes - The result if the element is found (defaults to `true`)\n * @template No - The result if the element is not found (defaults to `false`)\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<IfTupleIncludes<[1, 2, 3], 2>>().toBeTrue\n * expect<IfTupleIncludes<[1, 2, 3], 4>>().toBeFalse\n * expect<IfTupleIncludes<[1, 2, 1], 1>>().toBeTrue\n * ```\n */\nexport type IfTupleIncludes<\n Tuple extends readonly unknown[],\n Element,\n Yes = true,\n No = false,\n> = Exact<Tuple, any> extends true ? never\n : Tuple extends readonly [infer First, ...infer Rest]\n ? (Exact<Element, First> extends true ? Yes : IfTupleIncludes<Rest, Element, Yes, No>)\n : No\n"]}
1
+ {"version":3,"file":"includes.js","sourceRoot":"","sources":["../../../src/utils/tuple/includes.ts"],"names":[],"mappings":"","sourcesContent":["import type { Exact } from '../index.js'\n\n/**\n * Checks whether a tuple includes a specific element type\n *\n * @template Tuple - The tuple type to check\n * @template Element - The element type to look for\n * @template Yes - The result if the element is found (defaults to `true`)\n * @template No - The result if the element is not found (defaults to `false`)\n *\n * @example\n * ```ts\n * import { expect } from '@leawind/lay-sing'\n *\n * expect<IfTupleIncludes<[1, 2, 3], 2>>().to.be.true\n * expect<IfTupleIncludes<[1, 2, 3], 4>>().to.be.false\n * expect<IfTupleIncludes<[1, 2, 1], 1>>().to.be.true\n * ```\n */\nexport type IfTupleIncludes<\n Tuple extends readonly unknown[],\n Element,\n Yes = true,\n No = false,\n> = Exact<Tuple, any> extends true ? never\n : Tuple extends readonly [infer First, ...infer Rest]\n ? (Exact<Element, First> extends true ? Yes : IfTupleIncludes<Rest, Element, Yes, No>)\n : No\n"]}
@@ -1,293 +0,0 @@
1
- import type { Exact, Extends, If, IfTupleIncludes, MutuallyAssignable, ProperExtend, SafePick } from '../utils/index.js';
2
- /**
3
- * Represents the result of a type assertion based on a boolean condition.
4
- *
5
- * - If `true`, the result has a `success` property;
6
- * - If `false`, the result has a `fail` property;
7
- * - Otherwise, the result is `never`
8
- *
9
- * @template B The boolean condition result (true or false)
10
- * @template R The type of the result value (default is void)
11
- */
12
- export type TypeAssertionResult<B extends boolean, R = void> = Exact<B, never> extends true ? never : [boolean] extends [B] ? never : [B] extends [true] ? {
13
- /**
14
- * This field exist only when this type assertion succeed
15
- *
16
- * If you expect this assertion to fail, use `.fail`
17
- */
18
- success: R;
19
- } : [B] extends [false] ? {
20
- /**
21
- * This field exist only when this type assertion failed
22
- *
23
- * If you expect this assertion to success, use `.success`
24
- */
25
- fail: R;
26
- } : never;
27
- type ExpectTypeMethods<T, H extends PropertyKey = never> = {
28
- /**
29
- * Tests if the current type is exactly the same as the provided type U.
30
- *
31
- * @template U The type to compare with
32
- *
33
- * @example
34
- * ```ts
35
- * import { expect } from '@leawind/lay-sing'
36
- *
37
- * expect<any>().toBe<any>().success
38
- * expect<never>().toBe<never>().success
39
- * expect<false>().toBe<true>().fail
40
- * ```
41
- */
42
- toBe<U>(): TypeAssertionResult<Exact<T, U>, ExpectType<T, H>>;
43
- toBe<U>(_: U): TypeAssertionResult<Exact<T, U>, ExpectType<T, H>>;
44
- /**
45
- * Tests if the current type is mutually assignable with the provided type U.
46
- *
47
- * It's like:
48
- *
49
- * ```ts ignore
50
- * [T] extends [U] ? [U] extends [T] ? Yes : No : No
51
- * ```
52
- *
53
- * @template U The type to compare with
54
- *
55
- * @example
56
- * ```ts
57
- * import { expect } from '@leawind/lay-sing'
58
- *
59
- * expect<{ a: 1; b: 2 }>().toEqual<{ a: 1 } & { b: 2 }>().success
60
- * expect<1>().toEqual<1 | 2>().fail
61
- * ```
62
- */
63
- toEqual<U>(): TypeAssertionResult<MutuallyAssignable<T, U>, ExpectType<T, H>>;
64
- toEqual<U>(_: U): TypeAssertionResult<MutuallyAssignable<T, U>, ExpectType<T, H>>;
65
- /**
66
- * Tests if the current type T extends the provided type U.
67
- *
68
- * @template U The type to check extension against
69
- *
70
- * @example
71
- * ```ts
72
- * import { expect } from '@leawind/lay-sing'
73
- *
74
- * expect<3.14>().toExtend<number>().success
75
- * expect<2>().toExtend<string>().fail
76
- * expect<'hello'>().toExtend<string>().success
77
- * ```
78
- */
79
- toExtend<U>(): TypeAssertionResult<Extends<T, U>, ExpectType<T, H>>;
80
- toExtend<U>(_: U): TypeAssertionResult<Extends<T, U>, ExpectType<T, H>>;
81
- /**
82
- * Tests if the current type T properly extends the provided type U (extends but is not the same).
83
- *
84
- * @template U The type to check proper extension against
85
- *
86
- * @example
87
- * ```ts
88
- * import { expect } from '@leawind/lay-sing'
89
- *
90
- * expect<2>().toProperExtend<number>().success
91
- * expect<'a' | 'b'>().toProperExtend<string>().success
92
- * expect<number>().toProperExtend<number>().fail
93
- * ```
94
- */
95
- toProperExtend<U>(): TypeAssertionResult<ProperExtend<T, U>, ExpectType<T, H>>;
96
- toProperExtend<U>(_: U): TypeAssertionResult<ProperExtend<T, U>, ExpectType<T, H>>;
97
- /**
98
- * Tests if the current type `T` has a property with key `K`.
99
- *
100
- * @template K The property key to check for
101
- *
102
- * ### Behavior
103
- *
104
- * - For single keys: succeeds if the key exists in `T`
105
- * - For union types: succeeds only if **all** keys in the union exist in `T`
106
- *
107
- * ### Examples
108
- *
109
- * ```ts
110
- * import { expect } from '@leawind/lay-sing'
111
- *
112
- * type WithProp = { prop: string; another: number; may?: 5 }
113
- *
114
- * // Single key checks
115
- * expect<WithProp>().toHaveKey<'prop'>().success
116
- * expect<WithProp>().toHaveKey<'missing'>().fail
117
- *
118
- * // Union type checks
119
- * expect<WithProp>().toHaveKey<'prop' | 'another'>().success
120
- * expect<WithProp>().toHaveKey<'may' | 'unexist'>().fail
121
- * ```
122
- */
123
- toHaveKey<K extends PropertyKey>(): IfTupleIncludes<[
124
- never,
125
- any
126
- ], K, never, TypeAssertionResult<Extends<K, keyof T>, ExpectType<T, H>>>;
127
- toHaveKey<K extends PropertyKey>(_: K): IfTupleIncludes<[
128
- never,
129
- any
130
- ], K, never, TypeAssertionResult<Extends<K, keyof T>, ExpectType<T, H>>>;
131
- };
132
- type ExpectFunction<T, H extends PropertyKey = never> = Exact<T, any> extends true ? unknown : Exact<T, never> extends true ? unknown : [T] extends [(...args: infer Args) => infer R] ? {
133
- argsType(): ExpectType<Args, H>;
134
- returnType(): ExpectType<R, H>;
135
- } : [T] extends [new (...args: infer Args) => infer R] ? {
136
- argsType(): ExpectType<Args, H>;
137
- returnType(): ExpectType<R, H>;
138
- } : unknown;
139
- /**
140
- * Type-level testing utility that allows checking various relationships between types.
141
- * Provides methods to test type equality, extension, properties, and more.
142
- *
143
- * @template T The type being tested
144
- * @template H Hidden property keys that are already used (internal tracking)
145
- *
146
- * @example
147
- * ```ts
148
- * import { expect } from '@leawind/lay-sing'
149
- *
150
- * // Test if two types are identical
151
- * expect<number>().toBe<number>().success
152
- * expect<number>().toBe<string>().fail
153
- * // Test if one type extends another
154
- * expect<2>().toExtend<number>().success
155
- * expect<2>().toExtend<string>().fail
156
- * // Test if type has a specific property
157
- * expect<{name: string}>().toHaveKey<'name'>().success
158
- * ```
159
- */
160
- export type ExpectType<T, H extends PropertyKey = never> = Omit<(ExpectTypeMethods<T, H> & ExpectFunction<T, H> & {
161
- T: T;
162
- inspect: {
163
- [K in keyof T]: T[K];
164
- };
165
- } & SafePick<{
166
- /**
167
- * Tests if the current type extends the Number primitive type.
168
- * Available only if the current type extends number.
169
- *
170
- * @example
171
- * ```ts
172
- * import { expect } from '@leawind/lay-sing'
173
- *
174
- * expect<3.14>().toExtendNumber
175
- * ```
176
- */
177
- toExtendNumber: ExpectType<T, H | 'toExtendNumber' | 'toExtend'>;
178
- /**
179
- * Tests if the current type extends the String primitive type.
180
- * Available only if the current type extends string.
181
- *
182
- * @example
183
- * ```ts
184
- * import { expect } from '@leawind/lay-sing'
185
- *
186
- * expect<'hello'>().toExtendString
187
- * ```
188
- */
189
- toExtendString: ExpectType<T, H | 'toExtendString' | 'toExtend'>;
190
- /**
191
- * Tests if the current type extends the Boolean primitive type.
192
- * Available only if the current type extends boolean.
193
- *
194
- * @example
195
- * ```ts
196
- * import { expect } from '@leawind/lay-sing'
197
- *
198
- * expect<true>().toExtendBoolean
199
- * ```
200
- */
201
- toExtendBoolean: ExpectType<T, H | 'toExtendBoolean' | 'toExtend'>;
202
- }, If<Extends<T, number>, 'toExtendNumber'> | If<Extends<T, string>, 'toExtendString'> | If<Extends<T, boolean>, 'toExtendBoolean'>> & SafePick<{
203
- /**
204
- * Alias for {@link ExpectTypeMethods.toBe} where `U = any`
205
- *
206
- * ```ts
207
- * import { expect } from '@leawind/lay-sing'
208
- *
209
- * expect<any>().toBeAny
210
- * expect<any>().toBe<any>().success
211
- * ```
212
- */
213
- toBeAny: ExpectType<T, H | 'toBeAny' | 'toBe'>;
214
- /**
215
- * Alias for {@link ExpectTypeMethods.toBe} where `U = never`
216
- *
217
- * ```ts
218
- * import { expect } from '@leawind/lay-sing'
219
- *
220
- * expect<never>().toBeNever
221
- * expect<never>().toBe<never>().success
222
- * ```
223
- */
224
- toBeNever: ExpectType<T, H | 'toBeNever' | 'toBe'>;
225
- /**
226
- * Alias for {@link ExpectTypeMethods.toBe} where `U = unknown`
227
- *
228
- * ```ts
229
- * import { expect } from '@leawind/lay-sing'
230
- *
231
- * expect<unknown>().toBeUnknown
232
- * expect<unknown>().toBe<unknown>().success
233
- * ```
234
- */
235
- toBeUnknown: ExpectType<T, H | 'toBeUnknown' | 'toBe'>;
236
- /**
237
- * Alias for {@link ExpectTypeMethods.toBe} where `U = void`
238
- *
239
- * ```ts
240
- * import { expect } from '@leawind/lay-sing'
241
- *
242
- * expect<void>().toBeVoid
243
- * expect<void>().toBe<void>().success
244
- * ```
245
- */
246
- toBeVoid: ExpectType<T, H | 'toBeVoid' | 'toBe'>;
247
- /**
248
- * Alias for {@link ExpectTypeMethods.toBe} where `U = null`
249
- *
250
- * ```ts
251
- * import { expect } from '@leawind/lay-sing'
252
- *
253
- * expect<null>().toBeNull
254
- * expect<null>().toBe<null>().success
255
- * ```
256
- */
257
- toBeNull: ExpectType<T, H | 'toBeNull' | 'toBe'>;
258
- /**
259
- * Alias for {@link ExpectTypeMethods.toBe} where `U = undefined`
260
- *
261
- * ```ts
262
- * import { expect } from '@leawind/lay-sing'
263
- *
264
- * expect<undefined>().toBeUndefined
265
- * expect<undefined>().toBe<undefined>().success
266
- * ```
267
- */
268
- toBeUndefined: ExpectType<T, H | 'toBeUndefined' | 'toBe'>;
269
- /**
270
- * Alias for {@link ExpectTypeMethods.toBe} where `U = true`
271
- *
272
- * ```ts
273
- * import { expect } from '@leawind/lay-sing'
274
- *
275
- * expect<true>().toBeTrue
276
- * expect<true>().toBe<true>().success
277
- * ```
278
- */
279
- toBeTrue: ExpectType<T, H | 'toBeTrue' | 'toBe' | 'toExtendBoolean'>;
280
- /**
281
- * Alias for {@link ExpectTypeMethods.toBe} where `U = false`
282
- *
283
- * ```ts
284
- * import { expect } from '@leawind/lay-sing'
285
- *
286
- * expect<false>().toBeFalse
287
- * expect<false>().toBe<false>().success
288
- * ```
289
- */
290
- toBeFalse: ExpectType<T, H | 'toBeFalse' | 'toBe' | 'toExtendBoolean'>;
291
- }, If<Exact<T, any>, 'toBeAny'> | If<Exact<T, never>, 'toBeNever'> | If<Exact<T, unknown>, 'toBeUnknown'> | If<Exact<T, void>, 'toBeVoid'> | If<Exact<T, null>, 'toBeNull'> | If<Exact<T, undefined>, 'toBeUndefined'> | If<Exact<T, true>, 'toBeTrue'> | If<Exact<T, false>, 'toBeFalse'>>), H>;
292
- export {};
293
- //# sourceMappingURL=expect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/main/expect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,EAAE,EACF,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,QAAQ,EACT,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,GAAG,KAAK,GAC/F,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,GAC7B,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;IACnB;;;;OAIG;IACH,OAAO,EAAE,CAAC,CAAA;CACX,GACD,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG;IACpB;;;;OAIG;IACH,IAAI,EAAE,CAAC,CAAA;CACR,GACD,KAAK,CAAA;AAET,KAAK,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,GAAG,KAAK,IAAI;IACzD;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,CAAC,KAAK,mBAAmB,CAAC,KAAK,CAAC,CAAC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