@bemedev/typings 0.0.1
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/LICENSE +21 -0
- package/README.md +75 -0
- package/lib/constants.cjs +26 -0
- package/lib/constants.cjs.map +1 -0
- package/lib/constants.d.ts +8 -0
- package/lib/constants.d.ts.map +1 -0
- package/lib/constants.js +18 -0
- package/lib/constants.js.map +1 -0
- package/lib/helpers/any.cjs +6 -0
- package/lib/helpers/any.cjs.map +1 -0
- package/lib/helpers/any.d.ts +4 -0
- package/lib/helpers/any.d.ts.map +1 -0
- package/lib/helpers/any.js +4 -0
- package/lib/helpers/any.js.map +1 -0
- package/lib/helpers/array.cjs +10 -0
- package/lib/helpers/array.cjs.map +1 -0
- package/lib/helpers/array.d.ts +4 -0
- package/lib/helpers/array.d.ts.map +1 -0
- package/lib/helpers/array.js +8 -0
- package/lib/helpers/array.js.map +1 -0
- package/lib/helpers/custom.cjs +10 -0
- package/lib/helpers/custom.cjs.map +1 -0
- package/lib/helpers/custom.d.ts +4 -0
- package/lib/helpers/custom.d.ts.map +1 -0
- package/lib/helpers/custom.js +8 -0
- package/lib/helpers/custom.js.map +1 -0
- package/lib/helpers/index.cjs +30 -0
- package/lib/helpers/index.cjs.map +1 -0
- package/lib/helpers/index.d.ts +13 -0
- package/lib/helpers/index.d.ts.map +1 -0
- package/lib/helpers/index.js +13 -0
- package/lib/helpers/index.js.map +1 -0
- package/lib/helpers/intersection.cjs +14 -0
- package/lib/helpers/intersection.cjs.map +1 -0
- package/lib/helpers/intersection.d.ts +11 -0
- package/lib/helpers/intersection.d.ts.map +1 -0
- package/lib/helpers/intersection.js +12 -0
- package/lib/helpers/intersection.js.map +1 -0
- package/lib/helpers/litterals.cjs +6 -0
- package/lib/helpers/litterals.cjs.map +1 -0
- package/lib/helpers/litterals.d.ts +4 -0
- package/lib/helpers/litterals.d.ts.map +1 -0
- package/lib/helpers/litterals.js +4 -0
- package/lib/helpers/litterals.js.map +1 -0
- package/lib/helpers/maybe.cjs +10 -0
- package/lib/helpers/maybe.cjs.map +1 -0
- package/lib/helpers/maybe.d.ts +4 -0
- package/lib/helpers/maybe.d.ts.map +1 -0
- package/lib/helpers/maybe.js +8 -0
- package/lib/helpers/maybe.js.map +1 -0
- package/lib/helpers/partial.cjs +15 -0
- package/lib/helpers/partial.cjs.map +1 -0
- package/lib/helpers/partial.d.ts +4 -0
- package/lib/helpers/partial.d.ts.map +1 -0
- package/lib/helpers/partial.js +13 -0
- package/lib/helpers/partial.js.map +1 -0
- package/lib/helpers/record.cjs +12 -0
- package/lib/helpers/record.cjs.map +1 -0
- package/lib/helpers/record.d.ts +4 -0
- package/lib/helpers/record.d.ts.map +1 -0
- package/lib/helpers/record.js +10 -0
- package/lib/helpers/record.js.map +1 -0
- package/lib/helpers/soa.cjs +10 -0
- package/lib/helpers/soa.cjs.map +1 -0
- package/lib/helpers/soa.d.ts +4 -0
- package/lib/helpers/soa.d.ts.map +1 -0
- package/lib/helpers/soa.js +8 -0
- package/lib/helpers/soa.js.map +1 -0
- package/lib/helpers/sv.cjs +6 -0
- package/lib/helpers/sv.cjs.map +1 -0
- package/lib/helpers/sv.d.ts +4 -0
- package/lib/helpers/sv.d.ts.map +1 -0
- package/lib/helpers/sv.js +4 -0
- package/lib/helpers/sv.js.map +1 -0
- package/lib/helpers/tuple.cjs +6 -0
- package/lib/helpers/tuple.cjs.map +1 -0
- package/lib/helpers/tuple.d.ts +4 -0
- package/lib/helpers/tuple.d.ts.map +1 -0
- package/lib/helpers/tuple.js +4 -0
- package/lib/helpers/tuple.js.map +1 -0
- package/lib/helpers/union.cjs +13 -0
- package/lib/helpers/union.cjs.map +1 -0
- package/lib/helpers/union.d.ts +7 -0
- package/lib/helpers/union.d.ts.map +1 -0
- package/lib/helpers/union.js +11 -0
- package/lib/helpers/union.js.map +1 -0
- package/lib/index.cjs +40 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/transform.cjs +63 -0
- package/lib/transform.cjs.map +1 -0
- package/lib/transform.d.ts +3 -0
- package/lib/transform.d.ts.map +1 -0
- package/lib/transform.js +61 -0
- package/lib/transform.js.map +1 -0
- package/lib/transform.types.d.ts +18 -0
- package/lib/transform.types.d.ts.map +1 -0
- package/lib/types.d.ts +81 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/utils/expandFn.cjs +12 -0
- package/lib/utils/expandFn.cjs.map +1 -0
- package/lib/utils/expandFn.d.ts +5 -0
- package/lib/utils/expandFn.d.ts.map +1 -0
- package/lib/utils/expandFn.js +10 -0
- package/lib/utils/expandFn.js.map +1 -0
- package/package.json +114 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 chlbri
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @bemedev/typings
|
|
2
|
+
|
|
3
|
+
Typings by variables
|
|
4
|
+
|
|
5
|
+
<br/>
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { transform } from '@bemedev/typings';
|
|
11
|
+
|
|
12
|
+
const result = transform(({ array, maybe, intersection }) => ({
|
|
13
|
+
nodes: maybe(
|
|
14
|
+
array(
|
|
15
|
+
intersection(
|
|
16
|
+
{
|
|
17
|
+
position: {
|
|
18
|
+
x: 'number',
|
|
19
|
+
y: 'number',
|
|
20
|
+
},
|
|
21
|
+
data: {
|
|
22
|
+
label: maybe('string'),
|
|
23
|
+
content: 'string',
|
|
24
|
+
},
|
|
25
|
+
input: 'boolean',
|
|
26
|
+
},
|
|
27
|
+
{ id: 'string' },
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
}));
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<br/>
|
|
35
|
+
|
|
36
|
+
## Licence
|
|
37
|
+
|
|
38
|
+
MIT
|
|
39
|
+
|
|
40
|
+
## CHANGE_LOG
|
|
41
|
+
|
|
42
|
+
<details>
|
|
43
|
+
|
|
44
|
+
<summary>
|
|
45
|
+
...
|
|
46
|
+
</summary>
|
|
47
|
+
|
|
48
|
+
### Version [0.0.1] --> 29/12/2025 => 11:12
|
|
49
|
+
|
|
50
|
+
- ✨ Première version de la bibliothèque
|
|
51
|
+
- Add `transform` core logic
|
|
52
|
+
- Add type helpers (`any`, `array`, `custom`, `intersection`, `litterals`,
|
|
53
|
+
`maybe`, `partial`, `record`, `soa`, `sv`, `tuple`, `union`)
|
|
54
|
+
- Add `expandFn` utility
|
|
55
|
+
- Add comprehensive tests for `transform`
|
|
56
|
+
- Update project configuration
|
|
57
|
+
- <u>Test coverage **_100%_**</u>
|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<br/>
|
|
62
|
+
|
|
63
|
+
## Auteur
|
|
64
|
+
|
|
65
|
+
chlbri (bri_lvi@icloud.com)
|
|
66
|
+
|
|
67
|
+
[My github](https://github.com/chlbri?tab=repositories)
|
|
68
|
+
|
|
69
|
+
[<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>](https://github.com/chlbri?tab=repositories)
|
|
70
|
+
|
|
71
|
+
<br/>
|
|
72
|
+
|
|
73
|
+
## Liens
|
|
74
|
+
|
|
75
|
+
- [Documentation](https://github.com/chlbri/new-package)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const PRIMITIVES = [
|
|
4
|
+
'string',
|
|
5
|
+
'number',
|
|
6
|
+
'boolean',
|
|
7
|
+
'bigint',
|
|
8
|
+
'symbol',
|
|
9
|
+
'undefined',
|
|
10
|
+
'null',
|
|
11
|
+
];
|
|
12
|
+
const PRIMITIVE_OBJECTS = ['date', 'primitive'];
|
|
13
|
+
const MAYBE = '$$app-ts => maybe$$';
|
|
14
|
+
const CUSTOM = '$$app-ts => custom$$';
|
|
15
|
+
const PARTIAL = '$$app-ts => partial$$';
|
|
16
|
+
const ARRAY = '$$app-ts => array$$';
|
|
17
|
+
const SOA = '$$app-ts => soa$$';
|
|
18
|
+
|
|
19
|
+
exports.ARRAY = ARRAY;
|
|
20
|
+
exports.CUSTOM = CUSTOM;
|
|
21
|
+
exports.MAYBE = MAYBE;
|
|
22
|
+
exports.PARTIAL = PARTIAL;
|
|
23
|
+
exports.PRIMITIVES = PRIMITIVES;
|
|
24
|
+
exports.PRIMITIVE_OBJECTS = PRIMITIVE_OBJECTS;
|
|
25
|
+
exports.SOA = SOA;
|
|
26
|
+
//# sourceMappingURL=constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sources":["../src/constants.ts"],"sourcesContent":["export const PRIMITIVES = [\n 'string',\n 'number',\n 'boolean',\n 'bigint',\n 'symbol',\n 'undefined',\n 'null',\n] as const;\n\nexport const PRIMITIVE_OBJECTS = ['date', 'primitive'] as const;\nexport const MAYBE = '$$app-ts => maybe$$' 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"],"names":[],"mappings":";;AAAO,MAAM,UAAU,GAAG;IACxB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,MAAM;;MAGK,iBAAiB,GAAG,CAAC,MAAM,EAAE,WAAW;AAC9C,MAAM,KAAK,GAAG;AACd,MAAM,MAAM,GAAG;AACf,MAAM,OAAO,GAAG;AAChB,MAAM,KAAK,GAAG;AACd,MAAM,GAAG,GAAG;;;;;;;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PRIMITIVES: readonly ["string", "number", "boolean", "bigint", "symbol", "undefined", "null"];
|
|
2
|
+
export declare const PRIMITIVE_OBJECTS: readonly ["date", "primitive"];
|
|
3
|
+
export declare const MAYBE: "$$app-ts => maybe$$";
|
|
4
|
+
export declare const CUSTOM: "$$app-ts => custom$$";
|
|
5
|
+
export declare const PARTIAL: "$$app-ts => partial$$";
|
|
6
|
+
export declare const ARRAY: "$$app-ts => array$$";
|
|
7
|
+
export declare const SOA: "$$app-ts => soa$$";
|
|
8
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,mFAQb,CAAC;AAEX,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAChE,eAAO,MAAM,KAAK,EAAG,qBAA8B,CAAC;AACpD,eAAO,MAAM,MAAM,EAAG,sBAA+B,CAAC;AACtD,eAAO,MAAM,OAAO,EAAG,uBAAgC,CAAC;AACxD,eAAO,MAAM,KAAK,EAAG,qBAA8B,CAAC;AACpD,eAAO,MAAM,GAAG,EAAG,mBAA4B,CAAC"}
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const PRIMITIVES = [
|
|
2
|
+
'string',
|
|
3
|
+
'number',
|
|
4
|
+
'boolean',
|
|
5
|
+
'bigint',
|
|
6
|
+
'symbol',
|
|
7
|
+
'undefined',
|
|
8
|
+
'null',
|
|
9
|
+
];
|
|
10
|
+
const PRIMITIVE_OBJECTS = ['date', 'primitive'];
|
|
11
|
+
const MAYBE = '$$app-ts => maybe$$';
|
|
12
|
+
const CUSTOM = '$$app-ts => custom$$';
|
|
13
|
+
const PARTIAL = '$$app-ts => partial$$';
|
|
14
|
+
const ARRAY = '$$app-ts => array$$';
|
|
15
|
+
const SOA = '$$app-ts => soa$$';
|
|
16
|
+
|
|
17
|
+
export { ARRAY, CUSTOM, MAYBE, PARTIAL, PRIMITIVES, PRIMITIVE_OBJECTS, SOA };
|
|
18
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export const PRIMITIVES = [\n 'string',\n 'number',\n 'boolean',\n 'bigint',\n 'symbol',\n 'undefined',\n 'null',\n] as const;\n\nexport const PRIMITIVE_OBJECTS = ['date', 'primitive'] as const;\nexport const MAYBE = '$$app-ts => maybe$$' 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"],"names":[],"mappings":"AAAO,MAAM,UAAU,GAAG;IACxB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,MAAM;;MAGK,iBAAiB,GAAG,CAAC,MAAM,EAAE,WAAW;AAC9C,MAAM,KAAK,GAAG;AACd,MAAM,MAAM,GAAG;AACf,MAAM,OAAO,GAAG;AAChB,MAAM,KAAK,GAAG;AACd,MAAM,GAAG,GAAG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any.cjs","sources":["../../src/helpers/any.ts"],"sourcesContent":["import type { ObjectS } from '../types';\n\nconst any = <T extends ObjectS = ObjectS>(value?: T) => value as T;\nexport default any;\n"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAAG,CAA8B,KAAS,KAAK;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../../src/helpers/any.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,QAAA,MAAM,GAAG,GAAI,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,QAAQ,CAAC,KAAc,CAAC,CAAC;AACnE,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any.js","sources":["../../src/helpers/any.ts"],"sourcesContent":["import type { ObjectS } from '../types';\n\nconst any = <T extends ObjectS = ObjectS>(value?: T) => value as T;\nexport default any;\n"],"names":[],"mappings":"AAEA,MAAM,GAAG,GAAG,CAA8B,KAAS,KAAK;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.cjs","sources":["../../src/helpers/array.ts"],"sourcesContent":["import { ARRAY } from '../constants';\nimport type { ArrayCustom, NotReadonly, ObjectS } from '../types';\n\nconst array = <const T extends ObjectS>(value: T) => {\n type Out = ArrayCustom<Extract<NotReadonly<T>, ObjectS>>;\n\n return { [ARRAY]: value } as Out;\n};\n\nexport default array;\n"],"names":["ARRAY"],"mappings":";;;;AAGA,MAAM,KAAK,GAAG,CAA0B,KAAQ,KAAI;AAGlD,IAAA,OAAO,EAAE,CAACA,eAAK,GAAG,KAAK,EAAS;AAClC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/helpers/array.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAElE,QAAA,MAAM,KAAK,GAAI,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,CAAC,kDAI/C,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.js","sources":["../../src/helpers/array.ts"],"sourcesContent":["import { ARRAY } from '../constants';\nimport type { ArrayCustom, NotReadonly, ObjectS } from '../types';\n\nconst array = <const T extends ObjectS>(value: T) => {\n type Out = ArrayCustom<Extract<NotReadonly<T>, ObjectS>>;\n\n return { [ARRAY]: value } as Out;\n};\n\nexport default array;\n"],"names":[],"mappings":";;AAGA,MAAM,KAAK,GAAG,CAA0B,KAAQ,KAAI;AAGlD,IAAA,OAAO,EAAE,CAAC,KAAK,GAAG,KAAK,EAAS;AAClC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.cjs","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"],"names":["CUSTOM"],"mappings":";;;;AAGA,MAAM,MAAM,GAAG,CAAU,KAAS,MAC/B;IACC,CAACA,gBAAM,GAAG,KAAK;AAChB,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/helpers/custom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,QAAA,MAAM,MAAM,GAAI,CAAC,GAAG,GAAG,EAAE,QAAQ,CAAC,KAG1B,MAAM,CAAC,CAAC,CAAC,CAAC;AAElB,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.js","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"],"names":[],"mappings":";;AAGA,MAAM,MAAM,GAAG,CAAU,KAAS,MAC/B;IACC,CAAC,MAAM,GAAG,KAAK;AAChB,CAAA;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var helpers_any = require('./any.cjs');
|
|
4
|
+
var helpers_array = require('./array.cjs');
|
|
5
|
+
var helpers_custom = require('./custom.cjs');
|
|
6
|
+
var helpers_intersection = require('./intersection.cjs');
|
|
7
|
+
var helpers_litterals = require('./litterals.cjs');
|
|
8
|
+
var helpers_maybe = require('./maybe.cjs');
|
|
9
|
+
var helpers_partial = require('./partial.cjs');
|
|
10
|
+
var helpers_record = require('./record.cjs');
|
|
11
|
+
var helpers_soa = require('./soa.cjs');
|
|
12
|
+
var helpers_sv = require('./sv.cjs');
|
|
13
|
+
var helpers_tuple = require('./tuple.cjs');
|
|
14
|
+
var helpers_union = require('./union.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.any = helpers_any;
|
|
19
|
+
exports.array = helpers_array;
|
|
20
|
+
exports.custom = helpers_custom;
|
|
21
|
+
exports.intersection = helpers_intersection;
|
|
22
|
+
exports.litterals = helpers_litterals;
|
|
23
|
+
exports.maybe = helpers_maybe;
|
|
24
|
+
exports.partial = helpers_partial;
|
|
25
|
+
exports.record = helpers_record;
|
|
26
|
+
exports.soa = helpers_soa;
|
|
27
|
+
exports.sv = helpers_sv;
|
|
28
|
+
exports.tuple = helpers_tuple;
|
|
29
|
+
exports.union = helpers_union;
|
|
30
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 maybe } from './maybe';
|
|
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
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as any } from './any.js';
|
|
2
|
+
export { default as array } from './array.js';
|
|
3
|
+
export { default as custom } from './custom.js';
|
|
4
|
+
export { default as intersection } from './intersection.js';
|
|
5
|
+
export { default as litterals } from './litterals.js';
|
|
6
|
+
export { default as maybe } from './maybe.js';
|
|
7
|
+
export { default as partial } from './partial.js';
|
|
8
|
+
export { default as record } from './record.js';
|
|
9
|
+
export { default as soa } from './soa.js';
|
|
10
|
+
export { default as sv } from './sv.js';
|
|
11
|
+
export { default as tuple } from './tuple.js';
|
|
12
|
+
export { default as union } from './union.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const intersection = (...values) => {
|
|
4
|
+
const out = values.reduce((acc, curr) => {
|
|
5
|
+
Object.entries(curr).forEach(([key, value]) => {
|
|
6
|
+
acc[key] = value;
|
|
7
|
+
});
|
|
8
|
+
return acc;
|
|
9
|
+
}, {});
|
|
10
|
+
return out;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
module.exports = intersection;
|
|
14
|
+
//# sourceMappingURL=intersection.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.cjs","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"],"names":[],"mappings":";;AAgBA,MAAM,YAAY,GAAG,CACnB,GAAG,MAAS,KACV;IACF,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAI;AACtC,QAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC5C,YAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAClB,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,GAAG;IACZ,CAAC,EAAE,EAAS,CAAC;AACb,IAAA,OAAO,GAA4B;AACrC;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
11
|
+
//# sourceMappingURL=intersection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../src/helpers/intersection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,KAAK,mBAAmB,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,CAAC,SAAS;IAC3D,MAAM,KAAK,SAAS,UAAU;IAC9B,GAAG,MAAM,IAAI,SAAS,UAAU,EAAE;CACnC,GACG,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC;AAEZ,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,UAAU,EAAE,IACnD,mBAAmB,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAClC;KACG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GACD,KAAK,CAAC;AAEZ,QAAA,MAAM,YAAY,GAAI,CAAC,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC,EACvE,GAAG,QAAQ,CAAC,KAQE,kBAAkB,CAAC,CAAC,CACnC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const intersection = (...values) => {
|
|
2
|
+
const out = values.reduce((acc, curr) => {
|
|
3
|
+
Object.entries(curr).forEach(([key, value]) => {
|
|
4
|
+
acc[key] = value;
|
|
5
|
+
});
|
|
6
|
+
return acc;
|
|
7
|
+
}, {});
|
|
8
|
+
return out;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { intersection as default };
|
|
12
|
+
//# sourceMappingURL=intersection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.js","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"],"names":[],"mappings":"AAgBA,MAAM,YAAY,GAAG,CACnB,GAAG,MAAS,KACV;IACF,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAI;AACtC,QAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC5C,YAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAClB,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,GAAG;IACZ,CAAC,EAAE,EAAS,CAAC;AACb,IAAA,OAAO,GAA4B;AACrC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"litterals.cjs","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"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAAG,CAChB,GAAG,MAAS,KACT,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"litterals.d.ts","sourceRoot":"","sources":["../../src/helpers/litterals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,QAAA,MAAM,SAAS,GAAI,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,EAC9D,GAAG,QAAQ,CAAC,KACe,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"litterals.js","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"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,CAChB,GAAG,MAAS,KACT,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maybe.cjs","sources":["../../src/helpers/maybe.ts"],"sourcesContent":["import { MAYBE } from '../constants';\nimport type { __ObjectS, Maybe } from '../types';\n\nconst maybe = <T extends __ObjectS | __ObjectS[]>(value?: T) =>\n ({\n [MAYBE]: value,\n }) as Maybe<T>;\n\nexport default maybe;\n"],"names":["MAYBE"],"mappings":";;;;AAGA,MAAM,KAAK,GAAG,CAAoC,KAAS,MACxD;IACC,CAACA,eAAK,GAAG,KAAK;AACf,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maybe.d.ts","sourceRoot":"","sources":["../../src/helpers/maybe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjD,QAAA,MAAM,KAAK,GAAI,CAAC,SAAS,SAAS,GAAG,SAAS,EAAE,EAAE,QAAQ,CAAC,KAGnD,KAAK,CAAC,CAAC,CAAC,CAAC;AAEjB,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maybe.js","sources":["../../src/helpers/maybe.ts"],"sourcesContent":["import { MAYBE } from '../constants';\nimport type { __ObjectS, Maybe } from '../types';\n\nconst maybe = <T extends __ObjectS | __ObjectS[]>(value?: T) =>\n ({\n [MAYBE]: value,\n }) as Maybe<T>;\n\nexport default maybe;\n"],"names":[],"mappings":";;AAGA,MAAM,KAAK,GAAG,CAAoC,KAAS,MACxD;IACC,CAAC,KAAK,GAAG,KAAK;AACf,CAAA;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var constants = require('../constants.cjs');
|
|
4
|
+
|
|
5
|
+
const partial = (value) => {
|
|
6
|
+
const entries = Object.entries(value).filter(([key]) => key !== constants.PARTIAL);
|
|
7
|
+
const out = {};
|
|
8
|
+
entries.forEach(([key, value]) => {
|
|
9
|
+
out[key] = value;
|
|
10
|
+
});
|
|
11
|
+
return out;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
module.exports = partial;
|
|
15
|
+
//# sourceMappingURL=partial.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.cjs","sources":["../../src/helpers/partial.ts"],"sourcesContent":["import { PARTIAL } from '../constants';\nimport type { ObjectS, PartialCustom } from '../types';\n\nconst partial = <T extends ObjectS>(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"],"names":["PARTIAL"],"mappings":";;;;AAGA,MAAM,OAAO,GAAG,CAAoB,KAAQ,KAAuB;IACjE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,KAAKA,iBAAO,CAAC;IACxE,MAAM,GAAG,GAAQ,EAAE;IAEnB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC/B,QAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAClB,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,GAAG;AACZ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.d.ts","sourceRoot":"","sources":["../../src/helpers/partial.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,QAAA,MAAM,OAAO,GAAI,CAAC,SAAS,OAAO,EAAE,OAAO,CAAC,KAAG,CAAC,GAAG,aASlD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PARTIAL } from '../constants.js';
|
|
2
|
+
|
|
3
|
+
const partial = (value) => {
|
|
4
|
+
const entries = Object.entries(value).filter(([key]) => key !== PARTIAL);
|
|
5
|
+
const out = {};
|
|
6
|
+
entries.forEach(([key, value]) => {
|
|
7
|
+
out[key] = value;
|
|
8
|
+
});
|
|
9
|
+
return out;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { partial as default };
|
|
13
|
+
//# sourceMappingURL=partial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.js","sources":["../../src/helpers/partial.ts"],"sourcesContent":["import { PARTIAL } from '../constants';\nimport type { ObjectS, PartialCustom } from '../types';\n\nconst partial = <T extends ObjectS>(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"],"names":[],"mappings":";;AAGA,MAAM,OAAO,GAAG,CAAoB,KAAQ,KAAuB;IACjE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,OAAO,CAAC;IACxE,MAAM,GAAG,GAAQ,EAAE;IAEnB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC/B,QAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAClB,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,GAAG;AACZ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.cjs","sources":["../../src/helpers/record.ts"],"sourcesContent":["import type { Keys, ObjectS } from '../types';\n\nconst record = <const K extends Keys[], V extends ObjectS>(\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 default record;\n"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAG,CACb,KAAQ,EACR,GAAG,IAAO,KACR;IACF,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AACtC,QAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAChB,QAAA,OAAO,GAAG;IACZ,CAAC,EAAE,EAAS,CAAC;AAEb,IAAA,OAAO,MAA+D;AACxE;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/helpers/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE9C,QAAA,MAAM,MAAM,GAAI,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,SAAS,OAAO,EACvD,OAAO,CAAC,EACR,GAAG,MAAM,CAAC,KAOO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CACtE,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.js","sources":["../../src/helpers/record.ts"],"sourcesContent":["import type { Keys, ObjectS } from '../types';\n\nconst record = <const K extends Keys[], V extends ObjectS>(\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 default record;\n"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,CACb,KAAQ,EACR,GAAG,IAAO,KACR;IACF,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AACtC,QAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAChB,QAAA,OAAO,GAAG;IACZ,CAAC,EAAE,EAAS,CAAC;AAEb,IAAA,OAAO,MAA+D;AACxE;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soa.cjs","sources":["../../src/helpers/soa.ts"],"sourcesContent":["import { SOA } from '../constants';\nimport type { NotReadonly, ObjectS, SoaCustom } from '../types';\n\nconst soa = <const T extends ObjectS>(value: T) => {\n type Out = SoaCustom<Extract<NotReadonly<T>, ObjectS>>;\n return { [SOA]: value } as Out;\n};\n\nexport default soa;\n"],"names":["SOA"],"mappings":";;;;AAGA,MAAM,GAAG,GAAG,CAA0B,KAAQ,KAAI;AAEhD,IAAA,OAAO,EAAE,CAACA,aAAG,GAAG,KAAK,EAAS;AAChC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soa.d.ts","sourceRoot":"","sources":["../../src/helpers/soa.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEhE,QAAA,MAAM,GAAG,GAAI,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,CAAC,gDAG7C,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soa.js","sources":["../../src/helpers/soa.ts"],"sourcesContent":["import { SOA } from '../constants';\nimport type { NotReadonly, ObjectS, SoaCustom } from '../types';\n\nconst soa = <const T extends ObjectS>(value: T) => {\n type Out = SoaCustom<Extract<NotReadonly<T>, ObjectS>>;\n return { [SOA]: value } as Out;\n};\n\nexport default soa;\n"],"names":[],"mappings":";;AAGA,MAAM,GAAG,GAAG,CAA0B,KAAQ,KAAI;AAEhD,IAAA,OAAO,EAAE,CAAC,GAAG,GAAG,KAAK,EAAS;AAChC;;;;"}
|