@bemedev/typings 0.2.2 → 0.3.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.
- package/lib/constants.cjs +0 -2
- package/lib/constants.js +0 -2
- package/lib/helpers/any.cjs +0 -2
- package/lib/helpers/any.js +0 -2
- package/lib/helpers/array.cjs +0 -2
- package/lib/helpers/array.js +0 -2
- package/lib/helpers/custom.cjs +0 -2
- package/lib/helpers/custom.js +0 -2
- package/lib/helpers/index.cjs +0 -28
- package/lib/helpers/index.js +1 -23
- package/lib/helpers/intersection.cjs +0 -2
- package/lib/helpers/intersection.js +0 -2
- package/lib/helpers/litterals.cjs +0 -2
- package/lib/helpers/litterals.js +0 -2
- package/lib/helpers/optional.cjs +0 -2
- package/lib/helpers/optional.js +0 -2
- package/lib/helpers/partial.cjs +0 -2
- package/lib/helpers/partial.js +0 -2
- package/lib/helpers/primitive.cjs +0 -2
- package/lib/helpers/primitive.js +0 -2
- package/lib/helpers/primitiveObject.cjs +0 -2
- package/lib/helpers/primitiveObject.js +0 -2
- package/lib/helpers/readonly.cjs +0 -2
- package/lib/helpers/readonly.js +0 -2
- package/lib/helpers/record.cjs +0 -2
- package/lib/helpers/record.js +0 -2
- package/lib/helpers/soa.cjs +0 -2
- package/lib/helpers/soa.js +0 -2
- package/lib/helpers/sv.cjs +0 -2
- package/lib/helpers/sv.js +0 -2
- package/lib/helpers/tuple.cjs +0 -2
- package/lib/helpers/tuple.js +0 -2
- package/lib/helpers/union.cjs +0 -2
- package/lib/helpers/union.js +0 -2
- package/lib/index.cjs +0 -9
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -3
- package/lib/type.cjs +58 -0
- package/lib/type.js +57 -0
- package/lib/types.cjs +0 -0
- package/lib/types.d.ts +1 -1
- package/lib/types.js +1 -0
- package/lib/utils/expandFn.cjs +0 -2
- package/lib/utils/expandFn.js +0 -2
- package/package.json +15 -1
- package/lib/_virtual/_rolldown/runtime.cjs +0 -13
- package/lib/_virtual/_rolldown/runtime.js +0 -13
- package/lib/constants.cjs.map +0 -1
- package/lib/constants.js.map +0 -1
- package/lib/helpers/any.cjs.map +0 -1
- package/lib/helpers/any.js.map +0 -1
- package/lib/helpers/array.cjs.map +0 -1
- package/lib/helpers/array.js.map +0 -1
- package/lib/helpers/custom.cjs.map +0 -1
- package/lib/helpers/custom.js.map +0 -1
- package/lib/helpers/index.cjs.map +0 -1
- package/lib/helpers/index.js.map +0 -1
- package/lib/helpers/intersection.cjs.map +0 -1
- package/lib/helpers/intersection.js.map +0 -1
- package/lib/helpers/litterals.cjs.map +0 -1
- package/lib/helpers/litterals.js.map +0 -1
- package/lib/helpers/optional.cjs.map +0 -1
- package/lib/helpers/optional.js.map +0 -1
- package/lib/helpers/partial.cjs.map +0 -1
- package/lib/helpers/partial.js.map +0 -1
- package/lib/helpers/primitive.cjs.map +0 -1
- package/lib/helpers/primitive.js.map +0 -1
- package/lib/helpers/primitiveObject.cjs.map +0 -1
- package/lib/helpers/primitiveObject.js.map +0 -1
- package/lib/helpers/readonly.cjs.map +0 -1
- package/lib/helpers/readonly.js.map +0 -1
- package/lib/helpers/record.cjs.map +0 -1
- package/lib/helpers/record.js.map +0 -1
- package/lib/helpers/soa.cjs.map +0 -1
- package/lib/helpers/soa.js.map +0 -1
- package/lib/helpers/sv.cjs.map +0 -1
- package/lib/helpers/sv.js.map +0 -1
- package/lib/helpers/tuple.cjs.map +0 -1
- package/lib/helpers/tuple.js.map +0 -1
- package/lib/helpers/union.cjs.map +0 -1
- package/lib/helpers/union.js.map +0 -1
- package/lib/utils/expandFn.cjs.map +0 -1
- package/lib/utils/expandFn.js.map +0 -1
package/lib/constants.cjs
CHANGED
package/lib/constants.js
CHANGED
package/lib/helpers/any.cjs
CHANGED
package/lib/helpers/any.js
CHANGED
package/lib/helpers/array.cjs
CHANGED
package/lib/helpers/array.js
CHANGED
package/lib/helpers/custom.cjs
CHANGED
package/lib/helpers/custom.js
CHANGED
package/lib/helpers/index.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
2
|
const require_helpers_readonly = require("./readonly.cjs");
|
|
4
3
|
const require_helpers_any = require("./any.cjs");
|
|
5
4
|
const require_helpers_array = require("./array.cjs");
|
|
@@ -15,34 +14,9 @@ const require_helpers_soa = require("./soa.cjs");
|
|
|
15
14
|
const require_helpers_sv = require("./sv.cjs");
|
|
16
15
|
const require_helpers_tuple = require("./tuple.cjs");
|
|
17
16
|
const require_helpers_union = require("./union.cjs");
|
|
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
17
|
exports.any = require_helpers_any.any;
|
|
38
18
|
exports.array = require_helpers_array.array;
|
|
39
19
|
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
20
|
exports.intersection = require_helpers_intersection.intersection;
|
|
47
21
|
exports.litterals = require_helpers_litterals.litterals;
|
|
48
22
|
exports.optional = require_helpers_optional.optional;
|
|
@@ -55,5 +29,3 @@ exports.soa = require_helpers_soa.soa;
|
|
|
55
29
|
exports.sv = require_helpers_sv.sv;
|
|
56
30
|
exports.tuple = require_helpers_tuple.tuple;
|
|
57
31
|
exports.union = require_helpers_union.union;
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=index.cjs.map
|
package/lib/helpers/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
1
|
import { readonly } from "./readonly.js";
|
|
3
2
|
import { any } from "./any.js";
|
|
4
3
|
import { array } from "./array.js";
|
|
@@ -14,25 +13,4 @@ import { soa } from "./soa.js";
|
|
|
14
13
|
import { sv } from "./sv.js";
|
|
15
14
|
import { tuple } from "./tuple.js";
|
|
16
15
|
import { union } from "./union.js";
|
|
17
|
-
|
|
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
|
|
16
|
+
export { any, array, custom, intersection, litterals, optional, partial, primitive, primitiveObject, readonly, record, soa, sv, tuple, union };
|
package/lib/helpers/litterals.js
CHANGED
package/lib/helpers/optional.cjs
CHANGED
package/lib/helpers/optional.js
CHANGED
package/lib/helpers/partial.cjs
CHANGED
package/lib/helpers/partial.js
CHANGED
package/lib/helpers/primitive.js
CHANGED
package/lib/helpers/readonly.cjs
CHANGED
package/lib/helpers/readonly.js
CHANGED
package/lib/helpers/record.cjs
CHANGED
package/lib/helpers/record.js
CHANGED
package/lib/helpers/soa.cjs
CHANGED
package/lib/helpers/soa.js
CHANGED
package/lib/helpers/sv.cjs
CHANGED
package/lib/helpers/sv.js
CHANGED
package/lib/helpers/tuple.cjs
CHANGED
package/lib/helpers/tuple.js
CHANGED
package/lib/helpers/union.cjs
CHANGED
package/lib/helpers/union.js
CHANGED
package/lib/index.cjs
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_types = require("./types.cjs");
|
|
3
2
|
const require_constants = require("./constants.cjs");
|
|
4
|
-
const require_helpers_index = require("./helpers/index.cjs");
|
|
5
3
|
const require_type = require("./type.cjs");
|
|
6
4
|
exports.ARRAY = require_constants.ARRAY;
|
|
7
5
|
exports.CUSTOM = require_constants.CUSTOM;
|
|
8
6
|
exports.OPTIONAL = require_constants.OPTIONAL;
|
|
9
|
-
exports.OptionalHelperClass = require_types.OptionalHelperClass;
|
|
10
7
|
exports.PARTIAL = require_constants.PARTIAL;
|
|
11
8
|
exports.PRIMITIVES = require_constants.PRIMITIVES;
|
|
12
9
|
exports.PRIMITIVE_OBJECTS = require_constants.PRIMITIVE_OBJECTS;
|
|
13
10
|
exports.SOA = require_constants.SOA;
|
|
14
|
-
Object.defineProperty(exports, "helpers", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function() {
|
|
17
|
-
return require_helpers_index.helpers_exports;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
11
|
exports.type = require_type.type;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { OptionalHelperClass } from "./types.js";
|
|
2
1
|
import { ARRAY, CUSTOM, OPTIONAL, PARTIAL, PRIMITIVES, PRIMITIVE_OBJECTS, SOA } from "./constants.js";
|
|
3
|
-
import { helpers_exports } from "./helpers/index.js";
|
|
4
2
|
import { type } from "./type.js";
|
|
5
|
-
export { ARRAY, CUSTOM, OPTIONAL,
|
|
3
|
+
export { ARRAY, CUSTOM, OPTIONAL, PARTIAL, PRIMITIVES, PRIMITIVE_OBJECTS, SOA, type };
|
package/lib/type.cjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_constants = require("./constants.cjs");
|
|
3
|
+
const require_helpers_readonly = require("./helpers/readonly.cjs");
|
|
4
|
+
const require_helpers_any = require("./helpers/any.cjs");
|
|
5
|
+
const require_helpers_array = require("./helpers/array.cjs");
|
|
6
|
+
const require_helpers_custom = require("./helpers/custom.cjs");
|
|
7
|
+
const require_helpers_intersection = require("./helpers/intersection.cjs");
|
|
8
|
+
const require_helpers_litterals = require("./helpers/litterals.cjs");
|
|
9
|
+
const require_helpers_optional = require("./helpers/optional.cjs");
|
|
10
|
+
const require_helpers_partial = require("./helpers/partial.cjs");
|
|
11
|
+
const require_helpers_primitive = require("./helpers/primitive.cjs");
|
|
12
|
+
const require_helpers_primitiveObject = require("./helpers/primitiveObject.cjs");
|
|
13
|
+
const require_helpers_record = require("./helpers/record.cjs");
|
|
14
|
+
const require_helpers_soa = require("./helpers/soa.cjs");
|
|
15
|
+
const require_helpers_sv = require("./helpers/sv.cjs");
|
|
16
|
+
const require_helpers_tuple = require("./helpers/tuple.cjs");
|
|
17
|
+
const require_helpers_union = require("./helpers/union.cjs");
|
|
18
|
+
require("./helpers/index.cjs");
|
|
19
|
+
//#region src/type.ts
|
|
20
|
+
const transformTypes = (_) => {};
|
|
21
|
+
const _transform = (obj) => {
|
|
22
|
+
const _obj = obj;
|
|
23
|
+
if (Array.isArray(obj)) return obj.map(_transform);
|
|
24
|
+
if (typeof obj === "object") {
|
|
25
|
+
if ("$$app-ts => optional$$" in _obj) return _transform(_obj[require_constants.OPTIONAL]);
|
|
26
|
+
const isCustom = Object.keys(obj).every((key) => key === require_constants.CUSTOM);
|
|
27
|
+
const out = {};
|
|
28
|
+
if (isCustom) return out;
|
|
29
|
+
Object.entries(obj).filter(([key]) => key !== require_constants.PARTIAL).forEach(([key, value]) => {
|
|
30
|
+
out[key] = _transform(value);
|
|
31
|
+
});
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
return transformTypes(_obj);
|
|
35
|
+
};
|
|
36
|
+
const type = (option) => {
|
|
37
|
+
if (!option) return void 0;
|
|
38
|
+
if (typeof option === "function") return _transform(option({
|
|
39
|
+
any: require_helpers_any.any,
|
|
40
|
+
custom: require_helpers_custom.custom,
|
|
41
|
+
intersection: require_helpers_intersection.intersection,
|
|
42
|
+
litterals: require_helpers_litterals.litterals,
|
|
43
|
+
optional: require_helpers_optional.optional,
|
|
44
|
+
partial: require_helpers_partial.partial,
|
|
45
|
+
record: require_helpers_record.record,
|
|
46
|
+
soa: require_helpers_soa.soa,
|
|
47
|
+
sv: require_helpers_sv.sv,
|
|
48
|
+
union: require_helpers_union.union,
|
|
49
|
+
array: require_helpers_array.array,
|
|
50
|
+
tuple: require_helpers_tuple.tuple,
|
|
51
|
+
primitiveObject: require_helpers_primitiveObject.primitiveObject,
|
|
52
|
+
primitive: require_helpers_primitive.primitive,
|
|
53
|
+
readonly: require_helpers_readonly.readonly
|
|
54
|
+
}));
|
|
55
|
+
return _transform(option);
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
exports.type = type;
|
package/lib/type.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CUSTOM, OPTIONAL, PARTIAL } from "./constants.js";
|
|
2
|
+
import { readonly } from "./helpers/readonly.js";
|
|
3
|
+
import { any } from "./helpers/any.js";
|
|
4
|
+
import { array } from "./helpers/array.js";
|
|
5
|
+
import { custom } from "./helpers/custom.js";
|
|
6
|
+
import { intersection } from "./helpers/intersection.js";
|
|
7
|
+
import { litterals } from "./helpers/litterals.js";
|
|
8
|
+
import { optional } from "./helpers/optional.js";
|
|
9
|
+
import { partial } from "./helpers/partial.js";
|
|
10
|
+
import { primitive } from "./helpers/primitive.js";
|
|
11
|
+
import { primitiveObject } from "./helpers/primitiveObject.js";
|
|
12
|
+
import { record } from "./helpers/record.js";
|
|
13
|
+
import { soa } from "./helpers/soa.js";
|
|
14
|
+
import { sv } from "./helpers/sv.js";
|
|
15
|
+
import { tuple } from "./helpers/tuple.js";
|
|
16
|
+
import { union } from "./helpers/union.js";
|
|
17
|
+
import "./helpers/index.js";
|
|
18
|
+
//#region src/type.ts
|
|
19
|
+
const transformTypes = (_) => {};
|
|
20
|
+
const _transform = (obj) => {
|
|
21
|
+
const _obj = obj;
|
|
22
|
+
if (Array.isArray(obj)) return obj.map(_transform);
|
|
23
|
+
if (typeof obj === "object") {
|
|
24
|
+
if ("$$app-ts => optional$$" in _obj) return _transform(_obj[OPTIONAL]);
|
|
25
|
+
const isCustom = Object.keys(obj).every((key) => key === CUSTOM);
|
|
26
|
+
const out = {};
|
|
27
|
+
if (isCustom) return out;
|
|
28
|
+
Object.entries(obj).filter(([key]) => key !== PARTIAL).forEach(([key, value]) => {
|
|
29
|
+
out[key] = _transform(value);
|
|
30
|
+
});
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
return transformTypes(_obj);
|
|
34
|
+
};
|
|
35
|
+
const type = (option) => {
|
|
36
|
+
if (!option) return void 0;
|
|
37
|
+
if (typeof option === "function") return _transform(option({
|
|
38
|
+
any,
|
|
39
|
+
custom,
|
|
40
|
+
intersection,
|
|
41
|
+
litterals,
|
|
42
|
+
optional,
|
|
43
|
+
partial,
|
|
44
|
+
record,
|
|
45
|
+
soa,
|
|
46
|
+
sv,
|
|
47
|
+
union,
|
|
48
|
+
array,
|
|
49
|
+
tuple,
|
|
50
|
+
primitiveObject,
|
|
51
|
+
primitive,
|
|
52
|
+
readonly
|
|
53
|
+
}));
|
|
54
|
+
return _transform(option);
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { type };
|
package/lib/types.cjs
ADDED
|
File without changes
|
package/lib/types.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export type ArrayCustom<T extends ObjectT = any> = {
|
|
|
48
48
|
export type ObjectMapS = {
|
|
49
49
|
[key: Keys]: SoRa<_ObjectT>;
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
declare class OptionalHelperClass {
|
|
52
52
|
readonly __NO_TYPE__ = "@bemedev/addons/NO_TYPE";
|
|
53
53
|
private constructor();
|
|
54
54
|
}
|
package/lib/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/utils/expandFn.cjs
CHANGED
package/lib/utils/expandFn.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bemedev/typings",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Typings by variables",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "bri_lvi@icloud.com",
|
|
@@ -16,6 +16,20 @@
|
|
|
16
16
|
"main": "lib/index.js",
|
|
17
17
|
"types": "lib/index.d.ts",
|
|
18
18
|
"module": "lib/index.js",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./lib/index.js",
|
|
22
|
+
"require": "./lib/index.cjs",
|
|
23
|
+
"types": "./lib/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./helpers": {
|
|
26
|
+
"import": "./lib/helpers/index.js",
|
|
27
|
+
"require": "./lib/helpers/index.cjs",
|
|
28
|
+
"types": "./lib/helpers/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json",
|
|
31
|
+
"./tsconfig.json": "./tsconfig.json"
|
|
32
|
+
},
|
|
19
33
|
"maintainers": [
|
|
20
34
|
{
|
|
21
35
|
"email": "bri_lvi@icloud.com",
|
|
@@ -1,13 +0,0 @@
|
|
|
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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/helpers/any.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/helpers/any.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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"}
|
package/lib/helpers/array.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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":""}
|
package/lib/helpers/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primitive.js","names":[],"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,YAAY,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primitiveObject.cjs","names":["expandFn"],"sources":["../../src/helpers/primitiveObject.ts"],"sourcesContent":["import type {\n IntersectionCustom,\n NotReadonly,\n PrimitiveObjectMapS,\n PrimitiveObjectT,\n} from \"../types\";\nimport { expandFn } from \"../utils/expandFn\";\n\nconst primitiveObject = expandFn(\n <\n const T extends\n | PrimitiveObjectT\n | IntersectionCustom<PrimitiveObjectMapS[]> = PrimitiveObjectT,\n >(\n value?: T,\n ): NotReadonly<T> => {\n return (value || {}) as any;\n },\n {\n map: <\n const T extends\n | PrimitiveObjectMapS\n | IntersectionCustom<PrimitiveObjectMapS[]> = PrimitiveObjectMapS,\n >(\n value?: T,\n ): NotReadonly<T> => {\n return (value || {}) as any;\n },\n },\n);\n\nexport { primitiveObject };\n"],"mappings":";;AAQA,MAAM,mDAAkBA,UAMpB,UACmB;AACnB,QAAQ,SAAS,EAAE;GAErB,EACE,MAKE,UACmB;AACnB,QAAQ,SAAS,EAAE;GAEtB,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primitiveObject.js","names":[],"sources":["../../src/helpers/primitiveObject.ts"],"sourcesContent":["import type {\n IntersectionCustom,\n NotReadonly,\n PrimitiveObjectMapS,\n PrimitiveObjectT,\n} from \"../types\";\nimport { expandFn } from \"../utils/expandFn\";\n\nconst primitiveObject = expandFn(\n <\n const T extends\n | PrimitiveObjectT\n | IntersectionCustom<PrimitiveObjectMapS[]> = PrimitiveObjectT,\n >(\n value?: T,\n ): NotReadonly<T> => {\n return (value || {}) as any;\n },\n {\n map: <\n const T extends\n | PrimitiveObjectMapS\n | IntersectionCustom<PrimitiveObjectMapS[]> = PrimitiveObjectMapS,\n >(\n value?: T,\n ): NotReadonly<T> => {\n return (value || {}) as any;\n },\n },\n);\n\nexport { primitiveObject };\n"],"mappings":";;AAQA,MAAM,kBAAkB,UAMpB,UACmB;AACnB,QAAQ,SAAS,EAAE;GAErB,EACE,MAKE,UACmB;AACnB,QAAQ,SAAS,EAAE;GAEtB,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readonly.cjs","names":[],"sources":["../../src/helpers/readonly.ts"],"sourcesContent":["import type { ObjectT } from \"../types\";\n\nexport const readonly = <const T extends ObjectT>(value: T) => value;\n"],"mappings":";;AAEA,MAAa,YAAqC,UAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readonly.js","names":[],"sources":["../../src/helpers/readonly.ts"],"sourcesContent":["import type { ObjectT } from \"../types\";\n\nexport const readonly = <const T extends ObjectT>(value: T) => value;\n"],"mappings":";AAEA,MAAa,YAAqC,UAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record.cjs","names":[],"sources":["../../src/helpers/record.ts"],"sourcesContent":["import type { Keys, ObjectT } from \"../types\";\n\nconst record = <const K extends Keys[], V extends ObjectT>(\n value: V,\n ...keys: K\n) => {\n const object = keys.reduce((acc, key) => {\n acc[key] = value;\n return acc;\n }, {} as any);\n\n return object as Record<K[number] extends never ? Keys : K[number], V>;\n};\n\nexport { record };\n"],"mappings":";;AAEA,MAAM,UACJ,OACA,GAAG,SACA;AAMH,QALe,KAAK,QAAQ,KAAK,QAAQ;AACvC,MAAI,OAAO;AACX,SAAO;IACN,EAAE,CAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record.js","names":[],"sources":["../../src/helpers/record.ts"],"sourcesContent":["import type { Keys, ObjectT } from \"../types\";\n\nconst record = <const K extends Keys[], V extends ObjectT>(\n value: V,\n ...keys: K\n) => {\n const object = keys.reduce((acc, key) => {\n acc[key] = value;\n return acc;\n }, {} as any);\n\n return object as Record<K[number] extends never ? Keys : K[number], V>;\n};\n\nexport { record };\n"],"mappings":";AAEA,MAAM,UACJ,OACA,GAAG,SACA;AAMH,QALe,KAAK,QAAQ,KAAK,QAAQ;AACvC,MAAI,OAAO;AACX,SAAO;IACN,EAAE,CAAQ"}
|
package/lib/helpers/soa.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"soa.cjs","names":["SOA"],"sources":["../../src/helpers/soa.ts"],"sourcesContent":["import { SOA } from \"../constants\";\nimport type { NotReadonly, ObjectT, SoaCustom } from \"../types\";\n\nconst soa = <const T extends ObjectT>(value: T) => {\n return { [SOA]: value } as SoaCustom<NotReadonly<T>>;\n};\n\nexport { soa };\n"],"mappings":";;;AAGA,MAAM,OAAgC,UAAa;AACjD,QAAO,GAAGA,kBAAAA,MAAM,OAAO"}
|
package/lib/helpers/soa.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"soa.js","names":[],"sources":["../../src/helpers/soa.ts"],"sourcesContent":["import { SOA } from \"../constants\";\nimport type { NotReadonly, ObjectT, SoaCustom } from \"../types\";\n\nconst soa = <const T extends ObjectT>(value: T) => {\n return { [SOA]: value } as SoaCustom<NotReadonly<T>>;\n};\n\nexport { soa };\n"],"mappings":";;AAGA,MAAM,OAAgC,UAAa;AACjD,QAAO,GAAG,MAAM,OAAO"}
|
package/lib/helpers/sv.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sv.cjs","names":[],"sources":["../../src/helpers/sv.ts"],"sourcesContent":["import type { Custom, StateValue } from \"../types\";\nconst sv = {} as Custom<StateValue>;\nexport { sv };\n"],"mappings":";;AACA,MAAM,KAAK,EAAE"}
|
package/lib/helpers/sv.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sv.js","names":[],"sources":["../../src/helpers/sv.ts"],"sourcesContent":["import type { Custom, StateValue } from \"../types\";\nconst sv = {} as Custom<StateValue>;\nexport { sv };\n"],"mappings":";AACA,MAAM,KAAK,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tuple.cjs","names":[],"sources":["../../src/helpers/tuple.ts"],"sourcesContent":["import type { NotReadonly, ObjectT } from \"../types\";\n\nconst tuple = <const T extends [ObjectT, ...ObjectT[]]>(...values: T) =>\n values as NotReadonly<T>;\n\nexport { tuple };\n"],"mappings":";;AAEA,MAAM,SAAkD,GAAG,WACzD"}
|
package/lib/helpers/tuple.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tuple.js","names":[],"sources":["../../src/helpers/tuple.ts"],"sourcesContent":["import type { NotReadonly, ObjectT } from \"../types\";\n\nconst tuple = <const T extends [ObjectT, ...ObjectT[]]>(...values: T) =>\n values as NotReadonly<T>;\n\nexport { tuple };\n"],"mappings":";AAEA,MAAM,SAAkD,GAAG,WACzD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"union.cjs","names":["expandFn"],"sources":["../../src/helpers/union.ts"],"sourcesContent":["import type { Keys, ObjectMapS, ObjectT } from \"../types\";\nimport { expandFn } from \"../utils/expandFn\";\n\nconst _union = <T extends [ObjectT, ObjectT, ...ObjectT[]]>(...values: T) => {\n return values[0] as T[number];\n};\n\ntype Discriminated<K extends Keys> = ObjectMapS & Record<K, ObjectT>;\n\nconst union = expandFn(_union, {\n discriminated: <\n const K extends Keys,\n T extends [Discriminated<K>, Discriminated<K>, ...Discriminated<K>[]],\n >(\n _key: K,\n ...values: T\n ) => _union(...values),\n});\n\nexport { union };\n"],"mappings":";;;AAGA,MAAM,UAAsD,GAAG,WAAc;AAC3E,QAAO,OAAO;;AAKhB,MAAM,QAAQA,uBAAAA,SAAS,QAAQ,EAC7B,gBAIE,MACA,GAAG,WACA,OAAO,GAAG,OAAO,EACvB,CAAC"}
|
package/lib/helpers/union.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","names":[],"sources":["../../src/helpers/union.ts"],"sourcesContent":["import type { Keys, ObjectMapS, ObjectT } from \"../types\";\nimport { expandFn } from \"../utils/expandFn\";\n\nconst _union = <T extends [ObjectT, ObjectT, ...ObjectT[]]>(...values: T) => {\n return values[0] as T[number];\n};\n\ntype Discriminated<K extends Keys> = ObjectMapS & Record<K, ObjectT>;\n\nconst union = expandFn(_union, {\n discriminated: <\n const K extends Keys,\n T extends [Discriminated<K>, Discriminated<K>, ...Discriminated<K>[]],\n >(\n _key: K,\n ...values: T\n ) => _union(...values),\n});\n\nexport { union };\n"],"mappings":";;AAGA,MAAM,UAAsD,GAAG,WAAc;AAC3E,QAAO,OAAO;;AAKhB,MAAM,QAAQ,SAAS,QAAQ,EAC7B,gBAIE,MACA,GAAG,WACA,OAAO,GAAG,OAAO,EACvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expandFn.cjs","names":[],"sources":["../../src/utils/expandFn.ts"],"sourcesContent":["import type { Fn, FnBasic } from \"../types\";\n\nexport const expandFn = <Main extends Fn, const Tr extends object = object>(\n main: Main,\n extensions?: Tr,\n): FnBasic<Main, Tr> => {\n const out: any = main;\n\n /* v8 ignore start -- @preserve */\n if (extensions) Object.assign(out, extensions);\n /* v8 ignore stop -- @preserve */\n\n return out;\n};\n"],"mappings":";;AAEA,MAAa,YACX,MACA,eACsB;CACtB,MAAM,MAAW;;AAGjB,KAAI,WAAY,QAAO,OAAO,KAAK,WAAW;;AAG9C,QAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expandFn.js","names":[],"sources":["../../src/utils/expandFn.ts"],"sourcesContent":["import type { Fn, FnBasic } from \"../types\";\n\nexport const expandFn = <Main extends Fn, const Tr extends object = object>(\n main: Main,\n extensions?: Tr,\n): FnBasic<Main, Tr> => {\n const out: any = main;\n\n /* v8 ignore start -- @preserve */\n if (extensions) Object.assign(out, extensions);\n /* v8 ignore stop -- @preserve */\n\n return out;\n};\n"],"mappings":";AAEA,MAAa,YACX,MACA,eACsB;CACtB,MAAM,MAAW;;AAGjB,KAAI,WAAY,QAAO,OAAO,KAAK,WAAW;;AAG9C,QAAO"}
|