@bemedev/typings 0.2.0 → 0.2.2

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 (93) hide show
  1. package/lib/_virtual/_rolldown/runtime.cjs +13 -0
  2. package/lib/_virtual/_rolldown/runtime.js +13 -0
  3. package/lib/constants.cjs +2 -2
  4. package/lib/constants.cjs.map +1 -1
  5. package/lib/constants.d.ts +2 -2
  6. package/lib/constants.js +2 -2
  7. package/lib/constants.js.map +1 -1
  8. package/lib/helpers/any.cjs +5 -2
  9. package/lib/helpers/any.cjs.map +1 -1
  10. package/lib/helpers/any.d.ts +3 -3
  11. package/lib/helpers/any.js +4 -2
  12. package/lib/helpers/any.js.map +1 -1
  13. package/lib/helpers/array.cjs +2 -1
  14. package/lib/helpers/array.cjs.map +1 -1
  15. package/lib/helpers/array.d.ts +3 -3
  16. package/lib/helpers/array.js +1 -1
  17. package/lib/helpers/array.js.map +1 -1
  18. package/lib/helpers/custom.cjs +2 -1
  19. package/lib/helpers/custom.cjs.map +1 -1
  20. package/lib/helpers/custom.d.ts +2 -2
  21. package/lib/helpers/custom.js +1 -1
  22. package/lib/helpers/custom.js.map +1 -1
  23. package/lib/helpers/index.cjs +46 -14
  24. package/lib/helpers/index.cjs.map +1 -0
  25. package/lib/helpers/index.d.ts +15 -13
  26. package/lib/helpers/index.js +38 -14
  27. package/lib/helpers/index.js.map +1 -0
  28. package/lib/helpers/intersection.cjs +2 -1
  29. package/lib/helpers/intersection.cjs.map +1 -1
  30. package/lib/helpers/intersection.d.ts +3 -10
  31. package/lib/helpers/intersection.js +1 -1
  32. package/lib/helpers/intersection.js.map +1 -1
  33. package/lib/helpers/litterals.cjs +2 -1
  34. package/lib/helpers/litterals.cjs.map +1 -1
  35. package/lib/helpers/litterals.d.ts +2 -2
  36. package/lib/helpers/litterals.js +1 -1
  37. package/lib/helpers/litterals.js.map +1 -1
  38. package/lib/helpers/optional.cjs +2 -1
  39. package/lib/helpers/optional.cjs.map +1 -1
  40. package/lib/helpers/optional.d.ts +3 -3
  41. package/lib/helpers/optional.js +1 -1
  42. package/lib/helpers/optional.js.map +1 -1
  43. package/lib/helpers/partial.cjs +2 -1
  44. package/lib/helpers/partial.cjs.map +1 -1
  45. package/lib/helpers/partial.d.ts +3 -3
  46. package/lib/helpers/partial.js +1 -1
  47. package/lib/helpers/partial.js.map +1 -1
  48. package/lib/helpers/primitive.cjs +25 -0
  49. package/lib/helpers/primitive.cjs.map +1 -0
  50. package/lib/helpers/primitive.d.ts +10 -0
  51. package/lib/helpers/primitive.js +25 -0
  52. package/lib/helpers/primitive.js.map +1 -0
  53. package/lib/helpers/primitiveObject.cjs +2 -1
  54. package/lib/helpers/primitiveObject.cjs.map +1 -1
  55. package/lib/helpers/primitiveObject.d.ts +4 -4
  56. package/lib/helpers/primitiveObject.js +1 -1
  57. package/lib/helpers/primitiveObject.js.map +1 -1
  58. package/lib/helpers/readonly.cjs +7 -0
  59. package/lib/helpers/readonly.cjs.map +1 -0
  60. package/lib/helpers/readonly.d.ts +2 -0
  61. package/lib/helpers/readonly.js +6 -0
  62. package/lib/helpers/readonly.js.map +1 -0
  63. package/lib/helpers/record.cjs +2 -1
  64. package/lib/helpers/record.cjs.map +1 -1
  65. package/lib/helpers/record.d.ts +1 -1
  66. package/lib/helpers/record.js +1 -1
  67. package/lib/helpers/record.js.map +1 -1
  68. package/lib/helpers/soa.cjs +2 -1
  69. package/lib/helpers/soa.cjs.map +1 -1
  70. package/lib/helpers/soa.d.ts +2 -2
  71. package/lib/helpers/soa.js +1 -1
  72. package/lib/helpers/soa.js.map +1 -1
  73. package/lib/helpers/sv.cjs +2 -1
  74. package/lib/helpers/sv.cjs.map +1 -1
  75. package/lib/helpers/sv.d.ts +2 -2
  76. package/lib/helpers/sv.js +1 -1
  77. package/lib/helpers/sv.js.map +1 -1
  78. package/lib/helpers/tuple.cjs +2 -1
  79. package/lib/helpers/tuple.cjs.map +1 -1
  80. package/lib/helpers/tuple.d.ts +1 -1
  81. package/lib/helpers/tuple.js +1 -1
  82. package/lib/helpers/tuple.js.map +1 -1
  83. package/lib/helpers/union.cjs +4 -3
  84. package/lib/helpers/union.cjs.map +1 -1
  85. package/lib/helpers/union.d.ts +2 -2
  86. package/lib/helpers/union.js +3 -3
  87. package/lib/helpers/union.js.map +1 -1
  88. package/lib/index.cjs +7 -27
  89. package/lib/index.d.ts +4 -4
  90. package/lib/index.js +2 -15
  91. package/lib/type.types.d.ts +3 -1
  92. package/lib/types.d.ts +11 -7
  93. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ exports.__exportAll = __exportAll;
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll };
package/lib/constants.cjs CHANGED
@@ -8,14 +8,14 @@ const PRIMITIVES = [
8
8
  "symbol",
9
9
  "undefined",
10
10
  "null",
11
- "unknown",
12
11
  "never",
13
12
  "primitive"
14
13
  ];
15
14
  const PRIMITIVE_OBJECTS = [
16
15
  "date",
17
16
  "any",
18
- "object"
17
+ "object",
18
+ "unknown"
19
19
  ];
20
20
  const OPTIONAL = "$$app-ts => optional$$";
21
21
  const CUSTOM = "$$app-ts => custom$$";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const PRIMITIVES = [\n \"string\",\n \"number\",\n \"boolean\",\n \"bigint\",\n \"symbol\",\n \"undefined\",\n \"null\",\n \"unknown\",\n \"never\",\n \"primitive\",\n] as const;\n\nexport const PRIMITIVE_OBJECTS = [\"date\", \"any\", \"object\"] as const;\nexport const OPTIONAL = \"$$app-ts => optional$$\" as const;\nexport const CUSTOM = \"$$app-ts => custom$$\" as const;\nexport const PARTIAL = \"$$app-ts => partial$$\" as const;\nexport const ARRAY = \"$$app-ts => array$$\" as const;\nexport const SOA = \"$$app-ts => soa$$\" as const;\n"],"mappings":";;AAAA,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,oBAAoB;CAAC;CAAQ;CAAO;CAAS;AAC1D,MAAa,WAAW;AACxB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,MAAM"}
1
+ {"version":3,"file":"constants.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const PRIMITIVES = [\n \"string\",\n \"number\",\n \"boolean\",\n \"bigint\",\n \"symbol\",\n \"undefined\",\n \"null\",\n \"never\",\n \"primitive\",\n] as const;\n\nexport const PRIMITIVE_OBJECTS = [\"date\", \"any\", \"object\", \"unknown\"] as const;\nexport const OPTIONAL = \"$$app-ts => optional$$\" as const;\nexport const CUSTOM = \"$$app-ts => custom$$\" as const;\nexport const PARTIAL = \"$$app-ts => partial$$\" as const;\nexport const ARRAY = \"$$app-ts => array$$\" as const;\nexport const SOA = \"$$app-ts => soa$$\" as const;\n"],"mappings":";;AAAA,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,oBAAoB;CAAC;CAAQ;CAAO;CAAU;CAAU;AACrE,MAAa,WAAW;AACxB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,MAAM"}
@@ -1,5 +1,5 @@
1
- export declare const PRIMITIVES: readonly ["string", "number", "boolean", "bigint", "symbol", "undefined", "null", "unknown", "never", "primitive"];
2
- export declare const PRIMITIVE_OBJECTS: readonly ["date", "any", "object"];
1
+ export declare const PRIMITIVES: readonly ["string", "number", "boolean", "bigint", "symbol", "undefined", "null", "never", "primitive"];
2
+ export declare const PRIMITIVE_OBJECTS: readonly ["date", "any", "object", "unknown"];
3
3
  export declare const OPTIONAL: "$$app-ts => optional$$";
4
4
  export declare const CUSTOM: "$$app-ts => custom$$";
5
5
  export declare const PARTIAL: "$$app-ts => partial$$";
package/lib/constants.js CHANGED
@@ -7,14 +7,14 @@ const PRIMITIVES = [
7
7
  "symbol",
8
8
  "undefined",
9
9
  "null",
10
- "unknown",
11
10
  "never",
12
11
  "primitive"
13
12
  ];
14
13
  const PRIMITIVE_OBJECTS = [
15
14
  "date",
16
15
  "any",
17
- "object"
16
+ "object",
17
+ "unknown"
18
18
  ];
19
19
  const OPTIONAL = "$$app-ts => optional$$";
20
20
  const CUSTOM = "$$app-ts => custom$$";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const PRIMITIVES = [\n \"string\",\n \"number\",\n \"boolean\",\n \"bigint\",\n \"symbol\",\n \"undefined\",\n \"null\",\n \"unknown\",\n \"never\",\n \"primitive\",\n] as const;\n\nexport const PRIMITIVE_OBJECTS = [\"date\", \"any\", \"object\"] as const;\nexport const OPTIONAL = \"$$app-ts => optional$$\" as const;\nexport const CUSTOM = \"$$app-ts => custom$$\" as const;\nexport const PARTIAL = \"$$app-ts => partial$$\" as const;\nexport const ARRAY = \"$$app-ts => array$$\" as const;\nexport const SOA = \"$$app-ts => soa$$\" as const;\n"],"mappings":";AAAA,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,oBAAoB;CAAC;CAAQ;CAAO;CAAS;AAC1D,MAAa,WAAW;AACxB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,MAAM"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const PRIMITIVES = [\n \"string\",\n \"number\",\n \"boolean\",\n \"bigint\",\n \"symbol\",\n \"undefined\",\n \"null\",\n \"never\",\n \"primitive\",\n] as const;\n\nexport const PRIMITIVE_OBJECTS = [\"date\", \"any\", \"object\", \"unknown\"] as const;\nexport const OPTIONAL = \"$$app-ts => optional$$\" as const;\nexport const CUSTOM = \"$$app-ts => custom$$\" as const;\nexport const PARTIAL = \"$$app-ts => partial$$\" as const;\nexport const ARRAY = \"$$app-ts => array$$\" as const;\nexport const SOA = \"$$app-ts => soa$$\" as const;\n"],"mappings":";AAAA,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,oBAAoB;CAAC;CAAQ;CAAO;CAAU;CAAU;AACrE,MAAa,WAAW;AACxB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,MAAM"}
@@ -1,6 +1,9 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  //#region src/helpers/any.ts
2
- const any = (value) => value;
3
+ const any = (value) => {
4
+ return value;
5
+ };
3
6
  //#endregion
4
- module.exports = any;
7
+ exports.any = any;
5
8
 
6
9
  //# sourceMappingURL=any.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"any.cjs","names":[],"sources":["../../src/helpers/any.ts"],"sourcesContent":["import type { ObjectT } from \"../types\";\n\nconst any = <T extends ObjectT = ObjectT>(value?: T) =>\n value as ObjectT extends T ? \"any\" : T;\nexport default any;\n"],"mappings":";AAEA,MAAM,OAAoC,UACxC"}
1
+ {"version":3,"file":"any.cjs","names":[],"sources":["../../src/helpers/any.ts"],"sourcesContent":["import type { NotReadonly, ObjectT } from \"../types\";\n\nconst any = <const T extends ObjectT = ObjectT>(value?: T) => {\n return value as ObjectT extends NotReadonly<T> ? \"any\" : NotReadonly<T>;\n};\n\nexport { any };\n"],"mappings":";;AAEA,MAAM,OAA0C,UAAc;AAC5D,QAAO"}
@@ -1,3 +1,3 @@
1
- import type { ObjectT } from "../types";
2
- declare const any: <T extends ObjectT = ObjectT>(value?: T) => ObjectT extends T ? "any" : T;
3
- export default any;
1
+ import type { NotReadonly, ObjectT } from "../types";
2
+ declare const any: <const T extends ObjectT = ObjectT>(value?: T) => ObjectT extends NotReadonly<T> ? "any" : NotReadonly<T>;
3
+ export { any };
@@ -1,6 +1,8 @@
1
1
  //#region src/helpers/any.ts
2
- const any = (value) => value;
2
+ const any = (value) => {
3
+ return value;
4
+ };
3
5
  //#endregion
4
- export { any as default };
6
+ export { any };
5
7
 
6
8
  //# sourceMappingURL=any.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"any.js","names":[],"sources":["../../src/helpers/any.ts"],"sourcesContent":["import type { ObjectT } from \"../types\";\n\nconst any = <T extends ObjectT = ObjectT>(value?: T) =>\n value as ObjectT extends T ? \"any\" : T;\nexport default any;\n"],"mappings":";AAEA,MAAM,OAAoC,UACxC"}
1
+ {"version":3,"file":"any.js","names":[],"sources":["../../src/helpers/any.ts"],"sourcesContent":["import type { NotReadonly, ObjectT } from \"../types\";\n\nconst any = <const T extends ObjectT = ObjectT>(value?: T) => {\n return value as ObjectT extends NotReadonly<T> ? \"any\" : NotReadonly<T>;\n};\n\nexport { any };\n"],"mappings":";AAEA,MAAM,OAA0C,UAAc;AAC5D,QAAO"}
@@ -1,9 +1,10 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  const require_constants = require("../constants.cjs");
2
3
  //#region src/helpers/array.ts
3
4
  const array = (value) => {
4
5
  return { [require_constants.ARRAY]: value };
5
6
  };
6
7
  //#endregion
7
- module.exports = array;
8
+ exports.array = array;
8
9
 
9
10
  //# sourceMappingURL=array.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"array.cjs","names":["ARRAY"],"sources":["../../src/helpers/array.ts"],"sourcesContent":["import { ARRAY } from \"../constants\";\nimport type { ArrayCustom, NotReadonly, ObjectT } from \"../types\";\n\nconst array = <const T extends ObjectT>(value: T) => {\n type Out = ArrayCustom<Extract<NotReadonly<T>, ObjectT>>;\n\n return { [ARRAY]: value } as Out;\n};\n\nexport default array;\n"],"mappings":";;AAGA,MAAM,SAAkC,UAAa;AAGnD,QAAO,GAAGA,kBAAAA,QAAQ,OAAO"}
1
+ {"version":3,"file":"array.cjs","names":["ARRAY"],"sources":["../../src/helpers/array.ts"],"sourcesContent":["import { ARRAY } from \"../constants\";\nimport type { ArrayCustom, ObjectT } from \"../types\";\n\nconst array = <T extends ObjectT>(value: T) => {\n type Out = ArrayCustom<T>;\n\n return { [ARRAY]: value } as Out;\n};\n\nexport { array };\n"],"mappings":";;;AAGA,MAAM,SAA4B,UAAa;AAG7C,QAAO,GAAGA,kBAAAA,QAAQ,OAAO"}
@@ -1,3 +1,3 @@
1
- import type { ArrayCustom, NotReadonly, ObjectT } from "../types";
2
- declare const array: <const T extends ObjectT>(value: T) => ArrayCustom<Extract<NotReadonly<T>, ObjectT>>;
3
- export default array;
1
+ import type { ArrayCustom, ObjectT } from "../types";
2
+ declare const array: <T extends ObjectT>(value: T) => ArrayCustom<T>;
3
+ export { array };
@@ -4,6 +4,6 @@ const array = (value) => {
4
4
  return { [ARRAY]: value };
5
5
  };
6
6
  //#endregion
7
- export { array as default };
7
+ export { array };
8
8
 
9
9
  //# sourceMappingURL=array.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"array.js","names":[],"sources":["../../src/helpers/array.ts"],"sourcesContent":["import { ARRAY } from \"../constants\";\nimport type { ArrayCustom, NotReadonly, ObjectT } from \"../types\";\n\nconst array = <const T extends ObjectT>(value: T) => {\n type Out = ArrayCustom<Extract<NotReadonly<T>, ObjectT>>;\n\n return { [ARRAY]: value } as Out;\n};\n\nexport default array;\n"],"mappings":";;AAGA,MAAM,SAAkC,UAAa;AAGnD,QAAO,GAAG,QAAQ,OAAO"}
1
+ {"version":3,"file":"array.js","names":[],"sources":["../../src/helpers/array.ts"],"sourcesContent":["import { ARRAY } from \"../constants\";\nimport type { ArrayCustom, ObjectT } from \"../types\";\n\nconst array = <T extends ObjectT>(value: T) => {\n type Out = ArrayCustom<T>;\n\n return { [ARRAY]: value } as Out;\n};\n\nexport { array };\n"],"mappings":";;AAGA,MAAM,SAA4B,UAAa;AAG7C,QAAO,GAAG,QAAQ,OAAO"}
@@ -1,7 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  const require_constants = require("../constants.cjs");
2
3
  //#region src/helpers/custom.ts
3
4
  const custom = (value) => ({ [require_constants.CUSTOM]: value });
4
5
  //#endregion
5
- module.exports = custom;
6
+ exports.custom = custom;
6
7
 
7
8
  //# sourceMappingURL=custom.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom.cjs","names":["CUSTOM"],"sources":["../../src/helpers/custom.ts"],"sourcesContent":["import { CUSTOM } from '../constants';\nimport type { Custom } from '../types';\n\nconst custom = <T = any>(value?: T) =>\n ({\n [CUSTOM]: value,\n }) as Custom<T>;\n\nexport default custom;\n"],"mappings":";;AAGA,MAAM,UAAmB,WACtB,GACEA,kBAAAA,SAAS,OACX"}
1
+ {"version":3,"file":"custom.cjs","names":["CUSTOM"],"sources":["../../src/helpers/custom.ts"],"sourcesContent":["import { CUSTOM } from \"../constants\";\nimport type { Custom } from \"../types\";\n\nconst custom = <T = any>(value?: T) =>\n ({\n [CUSTOM]: value,\n }) as Custom<T>;\n\nexport { custom };\n"],"mappings":";;;AAGA,MAAM,UAAmB,WACtB,GACEA,kBAAAA,SAAS,OACX"}
@@ -1,3 +1,3 @@
1
- import type { Custom } from '../types';
1
+ import type { Custom } from "../types";
2
2
  declare const custom: <T = any>(value?: T) => Custom<T>;
3
- export default custom;
3
+ export { custom };
@@ -2,6 +2,6 @@ import { CUSTOM } from "../constants.js";
2
2
  //#region src/helpers/custom.ts
3
3
  const custom = (value) => ({ [CUSTOM]: value });
4
4
  //#endregion
5
- export { custom as default };
5
+ export { custom };
6
6
 
7
7
  //# sourceMappingURL=custom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom.js","names":[],"sources":["../../src/helpers/custom.ts"],"sourcesContent":["import { CUSTOM } from '../constants';\nimport type { Custom } from '../types';\n\nconst custom = <T = any>(value?: T) =>\n ({\n [CUSTOM]: value,\n }) as Custom<T>;\n\nexport default custom;\n"],"mappings":";;AAGA,MAAM,UAAmB,WACtB,GACE,SAAS,OACX"}
1
+ {"version":3,"file":"custom.js","names":[],"sources":["../../src/helpers/custom.ts"],"sourcesContent":["import { CUSTOM } from \"../constants\";\nimport type { Custom } from \"../types\";\n\nconst custom = <T = any>(value?: T) =>\n ({\n [CUSTOM]: value,\n }) as Custom<T>;\n\nexport { custom };\n"],"mappings":";;AAGA,MAAM,UAAmB,WACtB,GACE,SAAS,OACX"}
@@ -1,4 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
+ const require_helpers_readonly = require("./readonly.cjs");
2
4
  const require_helpers_any = require("./any.cjs");
3
5
  const require_helpers_array = require("./array.cjs");
4
6
  const require_helpers_custom = require("./custom.cjs");
@@ -6,22 +8,52 @@ const require_helpers_intersection = require("./intersection.cjs");
6
8
  const require_helpers_litterals = require("./litterals.cjs");
7
9
  const require_helpers_optional = require("./optional.cjs");
8
10
  const require_helpers_partial = require("./partial.cjs");
11
+ const require_helpers_primitive = require("./primitive.cjs");
12
+ const require_helpers_primitiveObject = require("./primitiveObject.cjs");
9
13
  const require_helpers_record = require("./record.cjs");
10
14
  const require_helpers_soa = require("./soa.cjs");
11
15
  const require_helpers_sv = require("./sv.cjs");
12
16
  const require_helpers_tuple = require("./tuple.cjs");
13
17
  const require_helpers_union = require("./union.cjs");
14
- const require_helpers_primitiveObject = require("./primitiveObject.cjs");
15
- exports.any = require_helpers_any;
16
- exports.array = require_helpers_array;
17
- exports.custom = require_helpers_custom;
18
- exports.intersection = require_helpers_intersection;
19
- exports.litterals = require_helpers_litterals;
20
- exports.optional = require_helpers_optional;
21
- exports.partial = require_helpers_partial;
22
- exports.primitiveObject = require_helpers_primitiveObject;
23
- exports.record = require_helpers_record;
24
- exports.soa = require_helpers_soa;
25
- exports.sv = require_helpers_sv;
26
- exports.tuple = require_helpers_tuple;
27
- exports.union = require_helpers_union;
18
+ //#region src/helpers/index.ts
19
+ var helpers_exports = /* @__PURE__ */ require_runtime.__exportAll({
20
+ any: () => require_helpers_any.any,
21
+ array: () => require_helpers_array.array,
22
+ custom: () => require_helpers_custom.custom,
23
+ intersection: () => require_helpers_intersection.intersection,
24
+ litterals: () => require_helpers_litterals.litterals,
25
+ optional: () => require_helpers_optional.optional,
26
+ partial: () => require_helpers_partial.partial,
27
+ primitive: () => require_helpers_primitive.primitive,
28
+ primitiveObject: () => require_helpers_primitiveObject.primitiveObject,
29
+ readonly: () => require_helpers_readonly.readonly,
30
+ record: () => require_helpers_record.record,
31
+ soa: () => require_helpers_soa.soa,
32
+ sv: () => require_helpers_sv.sv,
33
+ tuple: () => require_helpers_tuple.tuple,
34
+ union: () => require_helpers_union.union
35
+ });
36
+ //#endregion
37
+ exports.any = require_helpers_any.any;
38
+ exports.array = require_helpers_array.array;
39
+ exports.custom = require_helpers_custom.custom;
40
+ Object.defineProperty(exports, "helpers_exports", {
41
+ enumerable: true,
42
+ get: function() {
43
+ return helpers_exports;
44
+ }
45
+ });
46
+ exports.intersection = require_helpers_intersection.intersection;
47
+ exports.litterals = require_helpers_litterals.litterals;
48
+ exports.optional = require_helpers_optional.optional;
49
+ exports.partial = require_helpers_partial.partial;
50
+ exports.primitive = require_helpers_primitive.primitive;
51
+ exports.primitiveObject = require_helpers_primitiveObject.primitiveObject;
52
+ exports.readonly = require_helpers_readonly.readonly;
53
+ exports.record = require_helpers_record.record;
54
+ exports.soa = require_helpers_soa.soa;
55
+ exports.sv = require_helpers_sv.sv;
56
+ exports.tuple = require_helpers_tuple.tuple;
57
+ exports.union = require_helpers_union.union;
58
+
59
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../src/helpers/index.ts"],"sourcesContent":["export * from \"./any\";\nexport * from \"./array\";\nexport * from \"./custom\";\nexport * from \"./intersection\";\nexport * from \"./litterals\";\nexport * from \"./optional\";\nexport * from \"./partial\";\nexport * from \"./primitive\";\nexport * from \"./primitiveObject\";\nexport * from \"./readonly\";\nexport * from \"./record\";\nexport * from \"./soa\";\nexport * from \"./sv\";\nexport * from \"./tuple\";\nexport * from \"./union\";\n"],"mappings":""}
@@ -1,13 +1,15 @@
1
- export { default as any } from "./any";
2
- export { default as array } from "./array";
3
- export { default as custom } from "./custom";
4
- export { default as intersection } from "./intersection";
5
- export { default as litterals } from "./litterals";
6
- export { default as optional } from "./optional";
7
- export { default as partial } from "./partial";
8
- export { default as record } from "./record";
9
- export { default as soa } from "./soa";
10
- export { default as sv } from "./sv";
11
- export { default as tuple } from "./tuple";
12
- export { default as union } from "./union";
13
- export { default as primitiveObject } from "./primitiveObject";
1
+ export * from "./any";
2
+ export * from "./array";
3
+ export * from "./custom";
4
+ export * from "./intersection";
5
+ export * from "./litterals";
6
+ export * from "./optional";
7
+ export * from "./partial";
8
+ export * from "./primitive";
9
+ export * from "./primitiveObject";
10
+ export * from "./readonly";
11
+ export * from "./record";
12
+ export * from "./soa";
13
+ export * from "./sv";
14
+ export * from "./tuple";
15
+ export * from "./union";
@@ -1,14 +1,38 @@
1
- import any from "./any.js";
2
- import array from "./array.js";
3
- import custom from "./custom.js";
4
- import intersection from "./intersection.js";
5
- import litterals from "./litterals.js";
6
- import optional from "./optional.js";
7
- import partial from "./partial.js";
8
- import record from "./record.js";
9
- import soa from "./soa.js";
10
- import sv from "./sv.js";
11
- import tuple from "./tuple.js";
12
- import fn from "./union.js";
13
- import primitiveObject from "./primitiveObject.js";
14
- export { any, array, custom, intersection, litterals, optional, partial, primitiveObject, record, soa, sv, tuple, fn as union };
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { readonly } from "./readonly.js";
3
+ import { any } from "./any.js";
4
+ import { array } from "./array.js";
5
+ import { custom } from "./custom.js";
6
+ import { intersection } from "./intersection.js";
7
+ import { litterals } from "./litterals.js";
8
+ import { optional } from "./optional.js";
9
+ import { partial } from "./partial.js";
10
+ import { primitive } from "./primitive.js";
11
+ import { primitiveObject } from "./primitiveObject.js";
12
+ import { record } from "./record.js";
13
+ import { soa } from "./soa.js";
14
+ import { sv } from "./sv.js";
15
+ import { tuple } from "./tuple.js";
16
+ import { union } from "./union.js";
17
+ //#region src/helpers/index.ts
18
+ var helpers_exports = /* @__PURE__ */ __exportAll({
19
+ any: () => any,
20
+ array: () => array,
21
+ custom: () => custom,
22
+ intersection: () => intersection,
23
+ litterals: () => litterals,
24
+ optional: () => optional,
25
+ partial: () => partial,
26
+ primitive: () => primitive,
27
+ primitiveObject: () => primitiveObject,
28
+ readonly: () => readonly,
29
+ record: () => record,
30
+ soa: () => soa,
31
+ sv: () => sv,
32
+ tuple: () => tuple,
33
+ union: () => union
34
+ });
35
+ //#endregion
36
+ export { any, array, custom, helpers_exports, intersection, litterals, optional, partial, primitive, primitiveObject, readonly, record, soa, sv, tuple, union };
37
+
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/helpers/index.ts"],"sourcesContent":["export * from \"./any\";\nexport * from \"./array\";\nexport * from \"./custom\";\nexport * from \"./intersection\";\nexport * from \"./litterals\";\nexport * from \"./optional\";\nexport * from \"./partial\";\nexport * from \"./primitive\";\nexport * from \"./primitiveObject\";\nexport * from \"./readonly\";\nexport * from \"./record\";\nexport * from \"./soa\";\nexport * from \"./sv\";\nexport * from \"./tuple\";\nexport * from \"./union\";\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  //#region src/helpers/intersection.ts
2
3
  const intersection = (...values) => {
3
4
  return values.reduce((acc, curr) => {
@@ -8,6 +9,6 @@ const intersection = (...values) => {
8
9
  }, {});
9
10
  };
10
11
  //#endregion
11
- module.exports = intersection;
12
+ exports.intersection = intersection;
12
13
 
13
14
  //# sourceMappingURL=intersection.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"intersection.cjs","names":[],"sources":["../../src/helpers/intersection.ts"],"sourcesContent":["import type { ObjectMapS } from '../types';\n\ntype _IntersectionCustom<T extends ObjectMapS[]> = T extends [\n infer First extends ObjectMapS,\n ...infer Rest extends ObjectMapS[],\n]\n ? First & IntersectionCustom<Rest>\n : unknown;\n\nexport type IntersectionCustom<T extends ObjectMapS[]> =\n _IntersectionCustom<T> extends infer R\n ? {\n [K in keyof R]: R[K];\n }\n : never;\n\nconst intersection = <T extends [ObjectMapS, ObjectMapS, ...ObjectMapS[]]>(\n ...values: T\n) => {\n const out = values.reduce((acc, curr) => {\n Object.entries(curr).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {} as any);\n return out as IntersectionCustom<T>;\n};\n\nexport default intersection;\n"],"mappings":";AAgBA,MAAM,gBACJ,GAAG,WACA;AAOH,QANY,OAAO,QAAQ,KAAK,SAAS;AACvC,SAAO,QAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,WAAW;AAC7C,OAAI,OAAO;IACX;AACF,SAAO;IACN,EAAE,CAAQ"}
1
+ {"version":3,"file":"intersection.cjs","names":[],"sources":["../../src/helpers/intersection.ts"],"sourcesContent":["import type { IntersectionCustom, NotReadonly, ObjectMapS } from \"../types\";\n\nconst intersection = <\n const T extends [ObjectMapS, ObjectMapS, ...ObjectMapS[]],\n>(\n ...values: T\n) => {\n const out = values.reduce((acc, curr) => {\n Object.entries(curr).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {} as any);\n\n return out as IntersectionCustom<NotReadonly<T>>;\n};\n\nexport { intersection };\n"],"mappings":";;AAEA,MAAM,gBAGJ,GAAG,WACA;AAQH,QAPY,OAAO,QAAQ,KAAK,SAAS;AACvC,SAAO,QAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,WAAW;AAC7C,OAAI,OAAO;IACX;AACF,SAAO;IACN,EAAE,CAAQ"}
@@ -1,10 +1,3 @@
1
- import type { ObjectMapS } from '../types';
2
- type _IntersectionCustom<T extends ObjectMapS[]> = T extends [
3
- infer First extends ObjectMapS,
4
- ...infer Rest extends ObjectMapS[]
5
- ] ? First & IntersectionCustom<Rest> : unknown;
6
- export type IntersectionCustom<T extends ObjectMapS[]> = _IntersectionCustom<T> extends infer R ? {
7
- [K in keyof R]: R[K];
8
- } : never;
9
- declare const intersection: <T extends [ObjectMapS, ObjectMapS, ...ObjectMapS[]]>(...values: T) => IntersectionCustom<T>;
10
- export default intersection;
1
+ import type { IntersectionCustom, NotReadonly, ObjectMapS } from "../types";
2
+ declare const intersection: <const T extends [ObjectMapS, ObjectMapS, ...ObjectMapS[]]>(...values: T) => IntersectionCustom<NotReadonly<T>>;
3
+ export { intersection };
@@ -8,6 +8,6 @@ const intersection = (...values) => {
8
8
  }, {});
9
9
  };
10
10
  //#endregion
11
- export { intersection as default };
11
+ export { intersection };
12
12
 
13
13
  //# sourceMappingURL=intersection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"intersection.js","names":[],"sources":["../../src/helpers/intersection.ts"],"sourcesContent":["import type { ObjectMapS } from '../types';\n\ntype _IntersectionCustom<T extends ObjectMapS[]> = T extends [\n infer First extends ObjectMapS,\n ...infer Rest extends ObjectMapS[],\n]\n ? First & IntersectionCustom<Rest>\n : unknown;\n\nexport type IntersectionCustom<T extends ObjectMapS[]> =\n _IntersectionCustom<T> extends infer R\n ? {\n [K in keyof R]: R[K];\n }\n : never;\n\nconst intersection = <T extends [ObjectMapS, ObjectMapS, ...ObjectMapS[]]>(\n ...values: T\n) => {\n const out = values.reduce((acc, curr) => {\n Object.entries(curr).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {} as any);\n return out as IntersectionCustom<T>;\n};\n\nexport default intersection;\n"],"mappings":";AAgBA,MAAM,gBACJ,GAAG,WACA;AAOH,QANY,OAAO,QAAQ,KAAK,SAAS;AACvC,SAAO,QAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,WAAW;AAC7C,OAAI,OAAO;IACX;AACF,SAAO;IACN,EAAE,CAAQ"}
1
+ {"version":3,"file":"intersection.js","names":[],"sources":["../../src/helpers/intersection.ts"],"sourcesContent":["import type { IntersectionCustom, NotReadonly, ObjectMapS } from \"../types\";\n\nconst intersection = <\n const T extends [ObjectMapS, ObjectMapS, ...ObjectMapS[]],\n>(\n ...values: T\n) => {\n const out = values.reduce((acc, curr) => {\n Object.entries(curr).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {} as any);\n\n return out as IntersectionCustom<NotReadonly<T>>;\n};\n\nexport { intersection };\n"],"mappings":";AAEA,MAAM,gBAGJ,GAAG,WACA;AAQH,QAPY,OAAO,QAAQ,KAAK,SAAS;AACvC,SAAO,QAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,WAAW;AAC7C,OAAI,OAAO;IACX;AACF,SAAO;IACN,EAAE,CAAQ"}
@@ -1,6 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  //#region src/helpers/litterals.ts
2
3
  const litterals = (...values) => values[0];
3
4
  //#endregion
4
- module.exports = litterals;
5
+ exports.litterals = litterals;
5
6
 
6
7
  //# sourceMappingURL=litterals.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"litterals.cjs","names":[],"sources":["../../src/helpers/litterals.ts"],"sourcesContent":["import type { Custom } from '../types';\n\nconst litterals = <const T extends (string | number | boolean)[]>(\n ...values: T\n) => values[0] as unknown as Custom<T[number]>;\n\nexport default litterals;\n"],"mappings":";AAEA,MAAM,aACJ,GAAG,WACA,OAAO"}
1
+ {"version":3,"file":"litterals.cjs","names":[],"sources":["../../src/helpers/litterals.ts"],"sourcesContent":["import type { Custom } from \"../types\";\n\nconst litterals = <const T extends (string | number | boolean)[]>(\n ...values: T\n) => values[0] as unknown as Custom<T[number]>;\n\nexport { litterals };\n"],"mappings":";;AAEA,MAAM,aACJ,GAAG,WACA,OAAO"}
@@ -1,3 +1,3 @@
1
- import type { Custom } from '../types';
1
+ import type { Custom } from "../types";
2
2
  declare const litterals: <const T extends (string | number | boolean)[]>(...values: T) => Custom<T[number]>;
3
- export default litterals;
3
+ export { litterals };
@@ -1,6 +1,6 @@
1
1
  //#region src/helpers/litterals.ts
2
2
  const litterals = (...values) => values[0];
3
3
  //#endregion
4
- export { litterals as default };
4
+ export { litterals };
5
5
 
6
6
  //# sourceMappingURL=litterals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"litterals.js","names":[],"sources":["../../src/helpers/litterals.ts"],"sourcesContent":["import type { Custom } from '../types';\n\nconst litterals = <const T extends (string | number | boolean)[]>(\n ...values: T\n) => values[0] as unknown as Custom<T[number]>;\n\nexport default litterals;\n"],"mappings":";AAEA,MAAM,aACJ,GAAG,WACA,OAAO"}
1
+ {"version":3,"file":"litterals.js","names":[],"sources":["../../src/helpers/litterals.ts"],"sourcesContent":["import type { Custom } from \"../types\";\n\nconst litterals = <const T extends (string | number | boolean)[]>(\n ...values: T\n) => values[0] as unknown as Custom<T[number]>;\n\nexport { litterals };\n"],"mappings":";AAEA,MAAM,aACJ,GAAG,WACA,OAAO"}
@@ -1,7 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  const require_constants = require("../constants.cjs");
2
3
  //#region src/helpers/optional.ts
3
4
  const optional = (value) => ({ [require_constants.OPTIONAL]: value });
4
5
  //#endregion
5
- module.exports = optional;
6
+ exports.optional = optional;
6
7
 
7
8
  //# sourceMappingURL=optional.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"optional.cjs","names":["OPTIONAL"],"sources":["../../src/helpers/optional.ts"],"sourcesContent":["import { OPTIONAL } from \"../constants\";\nimport type { __ObjectT, AnyArray, ArrayCustom, Optional } from \"../types\";\n\nconst optional = <T extends __ObjectT | ArrayCustom | AnyArray<__ObjectT>>(\n value?: T,\n) =>\n ({\n [OPTIONAL]: value,\n }) as Optional<T>;\n\nexport default optional;\n"],"mappings":";;AAGA,MAAM,YACJ,WAEC,GACEA,kBAAAA,WAAW,OACb"}
1
+ {"version":3,"file":"optional.cjs","names":["OPTIONAL"],"sources":["../../src/helpers/optional.ts"],"sourcesContent":["import { OPTIONAL } from \"../constants\";\nimport type {\n __ObjectT,\n AnyArray,\n ArrayCustom,\n NotReadonly,\n Optional,\n} from \"../types\";\n\nconst optional = <\n const T extends __ObjectT | ArrayCustom | AnyArray<__ObjectT>,\n>(\n value?: T,\n) =>\n ({\n [OPTIONAL]: value,\n }) as Optional<NotReadonly<T>>;\n\nexport { optional };\n"],"mappings":";;;AASA,MAAM,YAGJ,WAEC,GACEA,kBAAAA,WAAW,OACb"}
@@ -1,3 +1,3 @@
1
- import type { __ObjectT, AnyArray, ArrayCustom, Optional } from "../types";
2
- declare const optional: <T extends __ObjectT | ArrayCustom | AnyArray<__ObjectT>>(value?: T) => Optional<T>;
3
- export default optional;
1
+ import type { __ObjectT, AnyArray, ArrayCustom, NotReadonly, Optional } from "../types";
2
+ declare const optional: <const T extends __ObjectT | ArrayCustom | AnyArray<__ObjectT>>(value?: T) => Optional<NotReadonly<T>>;
3
+ export { optional };
@@ -2,6 +2,6 @@ import { OPTIONAL } from "../constants.js";
2
2
  //#region src/helpers/optional.ts
3
3
  const optional = (value) => ({ [OPTIONAL]: value });
4
4
  //#endregion
5
- export { optional as default };
5
+ export { optional };
6
6
 
7
7
  //# sourceMappingURL=optional.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"optional.js","names":[],"sources":["../../src/helpers/optional.ts"],"sourcesContent":["import { OPTIONAL } from \"../constants\";\nimport type { __ObjectT, AnyArray, ArrayCustom, Optional } from \"../types\";\n\nconst optional = <T extends __ObjectT | ArrayCustom | AnyArray<__ObjectT>>(\n value?: T,\n) =>\n ({\n [OPTIONAL]: value,\n }) as Optional<T>;\n\nexport default optional;\n"],"mappings":";;AAGA,MAAM,YACJ,WAEC,GACE,WAAW,OACb"}
1
+ {"version":3,"file":"optional.js","names":[],"sources":["../../src/helpers/optional.ts"],"sourcesContent":["import { OPTIONAL } from \"../constants\";\nimport type {\n __ObjectT,\n AnyArray,\n ArrayCustom,\n NotReadonly,\n Optional,\n} from \"../types\";\n\nconst optional = <\n const T extends __ObjectT | ArrayCustom | AnyArray<__ObjectT>,\n>(\n value?: T,\n) =>\n ({\n [OPTIONAL]: value,\n }) as Optional<NotReadonly<T>>;\n\nexport { optional };\n"],"mappings":";;AASA,MAAM,YAGJ,WAEC,GACE,WAAW,OACb"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
1
2
  const require_constants = require("../constants.cjs");
2
3
  //#region src/helpers/partial.ts
3
4
  const partial = (value) => {
@@ -9,6 +10,6 @@ const partial = (value) => {
9
10
  return out;
10
11
  };
11
12
  //#endregion
12
- module.exports = partial;
13
+ exports.partial = partial;
13
14
 
14
15
  //# sourceMappingURL=partial.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"partial.cjs","names":["PARTIAL"],"sources":["../../src/helpers/partial.ts"],"sourcesContent":["import { PARTIAL } from \"../constants\";\nimport type { ObjectT, PartialCustom } from \"../types\";\n\nconst partial = <T extends ObjectT>(value: T): T & PartialCustom => {\n const entries = Object.entries(value).filter(([key]) => key !== PARTIAL);\n const out: any = {};\n\n entries.forEach(([key, value]) => {\n out[key] = value;\n });\n\n return out;\n};\n\nexport default partial;\n"],"mappings":";;AAGA,MAAM,WAA8B,UAAgC;CAClE,MAAM,UAAU,OAAO,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAAS,QAAQA,kBAAAA,QAAQ;CACxE,MAAM,MAAW,EAAE;AAEnB,SAAQ,SAAS,CAAC,KAAK,WAAW;AAChC,MAAI,OAAO;GACX;AAEF,QAAO"}
1
+ {"version":3,"file":"partial.cjs","names":["PARTIAL"],"sources":["../../src/helpers/partial.ts"],"sourcesContent":["import { PARTIAL } from \"../constants\";\nimport type { NotReadonly, ObjectT, PartialCustom } from \"../types\";\n\nconst partial = <const T extends ObjectT>(\n value: T,\n): NotReadonly<T> & PartialCustom => {\n const entries = Object.entries(value).filter(([key]) => key !== PARTIAL);\n const out: any = {};\n\n entries.forEach(([key, value]) => {\n out[key] = value;\n });\n\n return out;\n};\n\nexport { partial };\n"],"mappings":";;;AAGA,MAAM,WACJ,UACmC;CACnC,MAAM,UAAU,OAAO,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAAS,QAAQA,kBAAAA,QAAQ;CACxE,MAAM,MAAW,EAAE;AAEnB,SAAQ,SAAS,CAAC,KAAK,WAAW;AAChC,MAAI,OAAO;GACX;AAEF,QAAO"}
@@ -1,3 +1,3 @@
1
- import type { ObjectT, PartialCustom } from "../types";
2
- declare const partial: <T extends ObjectT>(value: T) => T & PartialCustom;
3
- export default partial;
1
+ import type { NotReadonly, ObjectT, PartialCustom } from "../types";
2
+ declare const partial: <const T extends ObjectT>(value: T) => NotReadonly<T> & PartialCustom;
3
+ export { partial };
@@ -9,6 +9,6 @@ const partial = (value) => {
9
9
  return out;
10
10
  };
11
11
  //#endregion
12
- export { partial as default };
12
+ export { partial };
13
13
 
14
14
  //# sourceMappingURL=partial.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"partial.js","names":[],"sources":["../../src/helpers/partial.ts"],"sourcesContent":["import { PARTIAL } from \"../constants\";\nimport type { ObjectT, PartialCustom } from \"../types\";\n\nconst partial = <T extends ObjectT>(value: T): T & PartialCustom => {\n const entries = Object.entries(value).filter(([key]) => key !== PARTIAL);\n const out: any = {};\n\n entries.forEach(([key, value]) => {\n out[key] = value;\n });\n\n return out;\n};\n\nexport default partial;\n"],"mappings":";;AAGA,MAAM,WAA8B,UAAgC;CAClE,MAAM,UAAU,OAAO,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAAS,QAAQ,QAAQ;CACxE,MAAM,MAAW,EAAE;AAEnB,SAAQ,SAAS,CAAC,KAAK,WAAW;AAChC,MAAI,OAAO;GACX;AAEF,QAAO"}
1
+ {"version":3,"file":"partial.js","names":[],"sources":["../../src/helpers/partial.ts"],"sourcesContent":["import { PARTIAL } from \"../constants\";\nimport type { NotReadonly, ObjectT, PartialCustom } from \"../types\";\n\nconst partial = <const T extends ObjectT>(\n value: T,\n): NotReadonly<T> & PartialCustom => {\n const entries = Object.entries(value).filter(([key]) => key !== PARTIAL);\n const out: any = {};\n\n entries.forEach(([key, value]) => {\n out[key] = value;\n });\n\n return out;\n};\n\nexport { partial };\n"],"mappings":";;AAGA,MAAM,WACJ,UACmC;CACnC,MAAM,UAAU,OAAO,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAAS,QAAQ,QAAQ;CACxE,MAAM,MAAW,EAAE;AAEnB,SAAQ,SAAS,CAAC,KAAK,WAAW;AAChC,MAAI,OAAO;GACX;AAEF,QAAO"}
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/helpers/primitive.ts
3
+ const primitive = require("../utils/expandFn.cjs").expandFn((value) => value, {
4
+ boolean: (value) => {
5
+ return value;
6
+ },
7
+ string: (value) => {
8
+ return value;
9
+ },
10
+ number: (value) => {
11
+ return value;
12
+ },
13
+ bigint: (value) => {
14
+ return value;
15
+ },
16
+ symbol: (value) => {
17
+ return value;
18
+ },
19
+ never: () => {},
20
+ undefined: () => {}
21
+ });
22
+ //#endregion
23
+ exports.primitive = primitive;
24
+
25
+ //# sourceMappingURL=primitive.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive.cjs","names":["expandFn"],"sources":["../../src/helpers/primitive.ts"],"sourcesContent":["import type { Custom, PrimitiveT } from \"../types\";\nimport { expandFn } from \"../utils/expandFn\";\n\nexport const primitive = expandFn(\n <const T extends PrimitiveT>(value?: T) => value as T,\n {\n boolean: <const T extends boolean>(value?: T) => {\n type TT = boolean extends T ? \"boolean\" : Custom<T>;\n return value as unknown as TT;\n },\n\n string: <const T extends string = string>(value?: T) => {\n type TT = string extends T ? \"string\" : Custom<T>;\n return value as unknown as TT;\n },\n\n number: <const T extends number = number>(value?: T) => {\n type TT = number extends T ? \"number\" : Custom<T>;\n return value as unknown as TT;\n },\n\n bigint: <const T extends bigint = bigint>(value?: T) => {\n type TT = bigint extends T ? \"bigint\" : Custom<T>;\n return value as unknown as TT;\n },\n\n symbol: <const T extends symbol = symbol>(value?: T) => {\n type TT = symbol extends T ? \"symbol\" : Custom<T>;\n return value as unknown as TT;\n },\n\n never: (): Custom<never> => {\n return undefined as any;\n },\n\n undefined: (): Custom<undefined> => {\n return undefined as any;\n },\n },\n);\n"],"mappings":";;AAGA,MAAa,6CAAYA,UACM,UAAc,OAC3C;CACE,UAAmC,UAAc;AAE/C,SAAO;;CAGT,SAA0C,UAAc;AAEtD,SAAO;;CAGT,SAA0C,UAAc;AAEtD,SAAO;;CAGT,SAA0C,UAAc;AAEtD,SAAO;;CAGT,SAA0C,UAAc;AAEtD,SAAO;;CAGT,aAA4B;CAI5B,iBAAoC;CAGrC,CACF"}