@sinclair/typebox 0.32.0-dev-12 → 0.32.0-dev-14
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/build/import/index.d.mts +5 -5
- package/build/import/index.mjs +3 -3
- package/build/import/type/composite/composite.d.mts +2 -2
- package/build/import/type/extends/extends-mapped-result-from-result.d.mts +13 -0
- package/build/import/type/extends/extends-mapped-result-from-result.mjs +14 -0
- package/build/import/type/extends/extends-mapped-result.d.mts +13 -9
- package/build/import/type/extends/extends-mapped-result.mjs +15 -8
- package/build/import/type/extends/extends.d.mts +4 -4
- package/build/import/type/extends/extends.mjs +4 -4
- package/build/import/type/extends/index.d.mts +1 -1
- package/build/import/type/extends/index.mjs +1 -1
- package/build/import/type/guard/type.d.mts +47 -46
- package/build/import/type/guard/type.mjs +294 -293
- package/build/import/type/indexed/index.d.mts +2 -2
- package/build/import/type/indexed/index.mjs +2 -2
- package/build/import/type/indexed/{indexed-mapped.d.mts → indexed-mapped-result.d.mts} +4 -4
- package/build/import/type/indexed/{indexed-mapped.mjs → indexed-mapped-result.mjs} +3 -3
- package/build/import/type/indexed/indexed-property-keys.d.mts +3 -3
- package/build/import/type/indexed/indexed-property-keys.mjs +2 -2
- package/build/import/type/indexed/{indexed-type.d.mts → indexed-result.d.mts} +2 -2
- package/build/import/type/indexed/{indexed-type.mjs → indexed-result.mjs} +1 -1
- package/build/import/type/indexed/indexed.d.mts +6 -6
- package/build/import/type/indexed/indexed.mjs +6 -6
- package/build/import/type/intrinsic/capitalize.d.mts +4 -0
- package/build/import/type/intrinsic/capitalize.mjs +5 -0
- package/build/import/type/intrinsic/index.d.mts +5 -0
- package/build/import/type/intrinsic/index.mjs +5 -0
- package/build/import/type/intrinsic/intrinsic-mapped-result.d.mts +15 -0
- package/build/import/type/intrinsic/intrinsic-mapped-result.mjs +21 -0
- package/build/import/type/intrinsic/intrinsic.d.mts +9 -14
- package/build/import/type/intrinsic/intrinsic.mjs +10 -21
- package/build/import/type/intrinsic/lowercase.d.mts +4 -0
- package/build/import/type/intrinsic/lowercase.mjs +5 -0
- package/build/import/type/intrinsic/uncapitalize.d.mts +4 -0
- package/build/import/type/intrinsic/uncapitalize.mjs +5 -0
- package/build/import/type/intrinsic/uppercase.d.mts +4 -0
- package/build/import/type/intrinsic/uppercase.mjs +5 -0
- package/build/import/type/mapped/index.d.mts +2 -0
- package/build/import/type/mapped/index.mjs +2 -0
- package/build/import/type/mapped/mapped-key.d.mts +8 -0
- package/build/import/type/mapped/mapped-key.mjs +7 -0
- package/build/import/type/mapped/mapped-result.d.mts +9 -0
- package/build/import/type/mapped/mapped-result.mjs +7 -0
- package/build/import/type/mapped/mapped.d.mts +24 -31
- package/build/import/type/mapped/mapped.mjs +33 -36
- package/build/import/type/omit/index.d.mts +1 -0
- package/build/import/type/omit/index.mjs +1 -0
- package/build/import/type/omit/omit-mapped-result.d.mts +15 -0
- package/build/import/type/omit/omit-mapped-result.mjs +20 -0
- package/build/import/type/omit/omit.d.mts +5 -2
- package/build/import/type/omit/omit.mjs +12 -6
- package/build/import/type/pick/index.d.mts +1 -0
- package/build/import/type/pick/index.mjs +1 -0
- package/build/import/type/pick/pick-mapped-result.d.mts +15 -0
- package/build/import/type/pick/pick-mapped-result.mjs +20 -0
- package/build/import/type/pick/pick.d.mts +5 -2
- package/build/import/type/pick/pick.mjs +12 -6
- package/build/import/type/record/record.mjs +4 -4
- package/build/import/type/type/json.d.mts +15 -13
- package/build/import/value/transform/decode.mjs +2 -2
- package/build/import/value/transform/encode.mjs +2 -2
- package/build/require/index.d.ts +5 -5
- package/build/require/index.js +7 -6
- package/build/require/type/composite/composite.d.ts +2 -2
- package/build/require/type/extends/extends-mapped-result-from-result.d.ts +13 -0
- package/build/require/type/extends/extends-mapped-result-from-result.js +18 -0
- package/build/require/type/extends/extends-mapped-result.d.ts +13 -9
- package/build/require/type/extends/extends-mapped-result.js +17 -10
- package/build/require/type/extends/extends.d.ts +4 -4
- package/build/require/type/extends/extends.js +3 -3
- package/build/require/type/extends/index.d.ts +1 -1
- package/build/require/type/extends/index.js +1 -1
- package/build/require/type/guard/type.d.ts +47 -46
- package/build/require/type/guard/type.js +252 -250
- package/build/require/type/indexed/index.d.ts +2 -2
- package/build/require/type/indexed/index.js +2 -2
- package/build/require/type/indexed/{indexed-mapped.d.ts → indexed-mapped-result.d.ts} +4 -4
- package/build/require/type/indexed/{indexed-mapped.js → indexed-mapped-result.js} +5 -5
- package/build/require/type/indexed/indexed-property-keys.d.ts +3 -3
- package/build/require/type/indexed/indexed-property-keys.js +4 -4
- package/build/require/type/indexed/{indexed-type.d.ts → indexed-result.d.ts} +2 -2
- package/build/require/type/indexed/{indexed-type.js → indexed-result.js} +3 -3
- package/build/require/type/indexed/indexed.d.ts +6 -6
- package/build/require/type/indexed/indexed.js +5 -5
- package/build/require/type/intrinsic/capitalize.d.ts +4 -0
- package/build/require/type/intrinsic/capitalize.js +9 -0
- package/build/require/type/intrinsic/index.d.ts +5 -0
- package/build/require/type/intrinsic/index.js +5 -0
- package/build/require/type/intrinsic/intrinsic-mapped-result.d.ts +15 -0
- package/build/require/type/intrinsic/intrinsic-mapped-result.js +25 -0
- package/build/require/type/intrinsic/intrinsic.d.ts +9 -14
- package/build/require/type/intrinsic/intrinsic.js +10 -25
- package/build/require/type/intrinsic/lowercase.d.ts +4 -0
- package/build/require/type/intrinsic/lowercase.js +9 -0
- package/build/require/type/intrinsic/uncapitalize.d.ts +4 -0
- package/build/require/type/intrinsic/uncapitalize.js +9 -0
- package/build/require/type/intrinsic/uppercase.d.ts +4 -0
- package/build/require/type/intrinsic/uppercase.js +9 -0
- package/build/require/type/mapped/index.d.ts +2 -0
- package/build/require/type/mapped/index.js +2 -0
- package/build/require/type/mapped/mapped-key.d.ts +8 -0
- package/build/require/type/mapped/mapped-key.js +11 -0
- package/build/require/type/mapped/mapped-result.d.ts +9 -0
- package/build/require/type/mapped/mapped-result.js +11 -0
- package/build/require/type/mapped/mapped.d.ts +24 -31
- package/build/require/type/mapped/mapped.js +45 -52
- package/build/require/type/omit/index.d.ts +1 -0
- package/build/require/type/omit/index.js +1 -0
- package/build/require/type/omit/omit-mapped-result.d.ts +15 -0
- package/build/require/type/omit/omit-mapped-result.js +24 -0
- package/build/require/type/omit/omit.d.ts +5 -2
- package/build/require/type/omit/omit.js +10 -4
- package/build/require/type/pick/index.d.ts +1 -0
- package/build/require/type/pick/index.js +1 -0
- package/build/require/type/pick/pick-mapped-result.d.ts +15 -0
- package/build/require/type/pick/pick-mapped-result.js +24 -0
- package/build/require/type/pick/pick.d.ts +5 -2
- package/build/require/type/pick/pick.js +10 -4
- package/build/require/type/record/record.js +2 -2
- package/build/require/type/type/json.d.ts +15 -13
- package/build/require/value/transform/decode.js +1 -1
- package/build/require/value/transform/encode.js +1 -1
- package/package.json +1 -1
- package/readme.md +115 -47
- package/build/import/type/extends/extends-mapped.d.mts +0 -17
- package/build/import/type/extends/extends-mapped.mjs +0 -21
- package/build/require/type/extends/extends-mapped.d.ts +0 -17
- package/build/require/type/extends/extends-mapped.js +0 -25
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type TSchema } from '../schema/index';
|
|
2
2
|
import { type TProperties } from '../object/index';
|
|
3
|
-
import {
|
|
3
|
+
import { type TIndexResult } from './indexed-result';
|
|
4
4
|
import { type TMappedResult, type TMappedKey } from '../mapped/index';
|
|
5
5
|
import { Evaluate } from '../helpers/index';
|
|
6
6
|
type MappedIndexPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
7
|
-
[_ in K]:
|
|
7
|
+
[_ in K]: TIndexResult<T, [K]>;
|
|
8
8
|
};
|
|
9
9
|
declare function MappedIndexPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K): MappedIndexPropertyKey<T, K>;
|
|
10
10
|
type MappedIndexPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? MappedIndexPropertyKey<T, L> & MappedIndexPropertyKeys<T, R> : {});
|
|
11
11
|
declare function MappedIndexPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): MappedIndexPropertyKeys<T, K>;
|
|
12
12
|
type MappedIndexProperties<T extends TSchema, K extends TMappedKey> = Evaluate<MappedIndexPropertyKeys<T, K['keys']>>;
|
|
13
13
|
declare function MappedIndexProperties<T extends TSchema, K extends TMappedKey>(T: T, K: K): MappedIndexProperties<T, K>;
|
|
14
|
-
export type
|
|
15
|
-
export declare function
|
|
14
|
+
export type TIndexMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedIndexProperties<T, K>> = (TMappedResult<P>);
|
|
15
|
+
export declare function IndexMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedIndexProperties<T, K>>(T: T, K: K): TMappedResult<P>;
|
|
16
16
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
3
|
+
exports.IndexMappedResult = void 0;
|
|
4
|
+
const indexed_result_1 = require("./indexed-result");
|
|
5
5
|
const index_1 = require("../mapped/index");
|
|
6
6
|
function MappedIndexPropertyKey(T, K) {
|
|
7
|
-
return { [K]: (0,
|
|
7
|
+
return { [K]: (0, indexed_result_1.IndexResult)(T, [K]) };
|
|
8
8
|
}
|
|
9
9
|
function MappedIndexPropertyKeys(T, K) {
|
|
10
10
|
const [L, ...R] = K;
|
|
@@ -15,8 +15,8 @@ function MappedIndexPropertyKeys(T, K) {
|
|
|
15
15
|
function MappedIndexProperties(T, K) {
|
|
16
16
|
return MappedIndexPropertyKeys(T, K.keys);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function IndexMappedResult(T, K) {
|
|
19
19
|
const P = MappedIndexProperties(T, K);
|
|
20
20
|
return (0, index_1.MappedResult)(P);
|
|
21
21
|
}
|
|
22
|
-
exports.
|
|
22
|
+
exports.IndexMappedResult = IndexMappedResult;
|
|
@@ -6,11 +6,11 @@ import { type TSchema } from '../schema/index';
|
|
|
6
6
|
import { type TUnion } from '../union/index';
|
|
7
7
|
type FromTemplateLiteral<T extends TTemplateLiteral, F = IsTemplateLiteralFinite<T>> = (F extends true ? TemplateLiteralGenerate<T> extends infer R extends string[] ? R : [] : []);
|
|
8
8
|
declare function FromTemplateLiteral<T extends TTemplateLiteral>(T: T): FromTemplateLiteral<T>;
|
|
9
|
-
type FromUnion<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [...
|
|
9
|
+
type FromUnion<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [...TIndexPropertyKeys<L>, ...FromUnion<R>] : []);
|
|
10
10
|
declare function FromUnion<T extends TSchema[]>(T: T): FromUnion<T>;
|
|
11
11
|
type FromLiteral<T extends TLiteralValue> = (T extends PropertyKey ? [`${T}`] : []);
|
|
12
12
|
declare function FromLiteral<T extends TLiteralValue>(T: T): FromLiteral<T>;
|
|
13
|
-
export type
|
|
13
|
+
export type TIndexPropertyKeys<T extends TSchema> = (T extends TTemplateLiteral ? FromTemplateLiteral<T> : T extends TUnion<infer S> ? FromUnion<S> : T extends TLiteral<infer S> ? FromLiteral<S> : T extends TNumber ? ['[number]'] : T extends TInteger ? ['[number]'] : [
|
|
14
14
|
]);
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function IndexPropertyKeys<T extends TSchema>(T: T): TIndexPropertyKeys<T>;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.IndexPropertyKeys = void 0;
|
|
4
4
|
const index_1 = require("../template-literal/index");
|
|
5
5
|
const type_1 = require("../guard/type");
|
|
6
6
|
function FromTemplateLiteral(T) {
|
|
@@ -16,13 +16,13 @@ function FromTemplateLiteral(T) {
|
|
|
16
16
|
function FromUnion(T) {
|
|
17
17
|
const [L, ...R] = T;
|
|
18
18
|
return (T.length > 0
|
|
19
|
-
? [...
|
|
19
|
+
? [...IndexPropertyKeys(L), ...FromUnion(R)]
|
|
20
20
|
: []);
|
|
21
21
|
}
|
|
22
22
|
function FromLiteral(T) {
|
|
23
23
|
return ([T.toString()]);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function IndexPropertyKeys(T) {
|
|
26
26
|
return [...new Set(((0, type_1.TTemplateLiteral)(T) ? FromTemplateLiteral(T) :
|
|
27
27
|
(0, type_1.TUnion)(T) ? FromUnion(T.anyOf) :
|
|
28
28
|
(0, type_1.TLiteral)(T) ? FromLiteral(T.const) :
|
|
@@ -30,4 +30,4 @@ function IndexedPropertyKeys(T) {
|
|
|
30
30
|
(0, type_1.TInteger)(T) ? ['[number]'] :
|
|
31
31
|
[]))];
|
|
32
32
|
}
|
|
33
|
-
exports.
|
|
33
|
+
exports.IndexPropertyKeys = IndexPropertyKeys;
|
|
@@ -28,6 +28,6 @@ type FromKey<T extends TSchema, K extends PropertyKey> = (T extends TRecursive<i
|
|
|
28
28
|
declare function FromKey<T extends TSchema, K extends PropertyKey>(T: T, K: K): FromKey<T, K>;
|
|
29
29
|
type FromKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? [FromKey<T, L>, ...FromKeys<T, R>] : []);
|
|
30
30
|
declare function FromKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): FromKeys<T, K>;
|
|
31
|
-
export type
|
|
32
|
-
export declare function
|
|
31
|
+
export type TIndexResult<T extends TSchema, K extends PropertyKey[]> = (UnionResolve<FromKeys<T, K>>);
|
|
32
|
+
export declare function IndexResult<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): TIndexResult<T, K>;
|
|
33
33
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.IndexResult = void 0;
|
|
4
4
|
const index_1 = require("../never/index");
|
|
5
5
|
const index_2 = require("../intersect/index");
|
|
6
6
|
const index_3 = require("../union/index");
|
|
@@ -62,7 +62,7 @@ function FromKeys(T, K) {
|
|
|
62
62
|
? [FromKey(T, L), ...FromKeys(T, R)]
|
|
63
63
|
: []);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function IndexResult(T, K) {
|
|
66
66
|
return ((0, index_3.UnionResolve)(FromKeys(T, K)));
|
|
67
67
|
}
|
|
68
|
-
exports.
|
|
68
|
+
exports.IndexResult = IndexResult;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TSchema, SchemaOptions } from '../schema/index';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { type
|
|
2
|
+
import { type TIndexResult } from './indexed-result';
|
|
3
|
+
import { type TIndexPropertyKeys } from './indexed-property-keys';
|
|
4
|
+
import { type TIndexMappedResult } from './indexed-mapped-result';
|
|
5
5
|
import { TMappedKey } from '../mapped/index';
|
|
6
|
-
export type TIndex<T extends TSchema, K extends PropertyKey[]> =
|
|
7
|
-
export declare function Index<T extends TSchema, K extends TMappedKey>(T: T, K: K):
|
|
8
|
-
export declare function Index<T extends TSchema, K extends TSchema, I extends PropertyKey[] =
|
|
6
|
+
export type TIndex<T extends TSchema, K extends PropertyKey[]> = TIndexResult<T, K>;
|
|
7
|
+
export declare function Index<T extends TSchema, K extends TMappedKey>(T: T, K: K): TIndexMappedResult<T, K>;
|
|
8
|
+
export declare function Index<T extends TSchema, K extends TSchema, I extends PropertyKey[] = TIndexPropertyKeys<K>>(T: T, K: K, options?: SchemaOptions): TIndex<T, I>;
|
|
9
9
|
export declare function Index<T extends TSchema, K extends PropertyKey[]>(T: T, K: readonly [...K], options?: SchemaOptions): TIndex<T, K>;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Index = void 0;
|
|
4
4
|
const type_1 = require("../guard/type");
|
|
5
|
-
const
|
|
5
|
+
const indexed_result_1 = require("./indexed-result");
|
|
6
6
|
const indexed_property_keys_1 = require("./indexed-property-keys");
|
|
7
|
-
const
|
|
7
|
+
const indexed_mapped_result_1 = require("./indexed-mapped-result");
|
|
8
8
|
const type_2 = require("../clone/type");
|
|
9
9
|
function Index(T, K, options = {}) {
|
|
10
|
-
return ((0, type_1.TMappedKey)(K) ? (0, type_2.CloneType)((0,
|
|
11
|
-
(0, type_1.TSchema)(K) ? (0, type_2.CloneType)((0,
|
|
12
|
-
(0, type_2.CloneType)((0,
|
|
10
|
+
return ((0, type_1.TMappedKey)(K) ? (0, type_2.CloneType)((0, indexed_mapped_result_1.IndexMappedResult)(T, K), options) :
|
|
11
|
+
(0, type_1.TSchema)(K) ? (0, type_2.CloneType)((0, indexed_result_1.IndexResult)(T, (0, indexed_property_keys_1.IndexPropertyKeys)(K)), options) :
|
|
12
|
+
(0, type_2.CloneType)((0, indexed_result_1.IndexResult)(T, K), options));
|
|
13
13
|
}
|
|
14
14
|
exports.Index = Index;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TSchema, SchemaOptions } from '../schema/index';
|
|
2
|
+
import { TIntrinsic } from './intrinsic';
|
|
3
|
+
export type TCapitalize<T extends TSchema> = TIntrinsic<T, 'Capitalize'>;
|
|
4
|
+
export declare function Capitalize<T extends TSchema>(T: T, options?: SchemaOptions): TCapitalize<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Capitalize = void 0;
|
|
4
|
+
const intrinsic_1 = require("./intrinsic");
|
|
5
|
+
const type_1 = require("../clone/type");
|
|
6
|
+
function Capitalize(T, options = {}) {
|
|
7
|
+
return (0, type_1.CloneType)((0, intrinsic_1.Intrinsic)(T, 'Capitalize'), options);
|
|
8
|
+
}
|
|
9
|
+
exports.Capitalize = Capitalize;
|
|
@@ -14,4 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./capitalize"), exports);
|
|
18
|
+
__exportStar(require("./intrinsic-mapped-result"), exports);
|
|
17
19
|
__exportStar(require("./intrinsic"), exports);
|
|
20
|
+
__exportStar(require("./lowercase"), exports);
|
|
21
|
+
__exportStar(require("./uncapitalize"), exports);
|
|
22
|
+
__exportStar(require("./uppercase"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TProperties } from '../object/index';
|
|
2
|
+
import { type TMappedResult, type TMappedKey } from '../mapped/index';
|
|
3
|
+
import { type TIntrinsic, type IntrinsicMode } from './intrinsic';
|
|
4
|
+
import { TLiteral, TLiteralValue } from '../literal/index';
|
|
5
|
+
type MappedIntrinsicPropertyKey<K extends PropertyKey, M extends IntrinsicMode, P extends TLiteralValue = K extends TLiteralValue ? K : never> = {
|
|
6
|
+
[_ in K]: TIntrinsic<TLiteral<P>, M>;
|
|
7
|
+
};
|
|
8
|
+
declare function MappedIntrinsicPropertyKey<K extends PropertyKey, M extends IntrinsicMode>(K: K, M: M): MappedIntrinsicPropertyKey<K, M>;
|
|
9
|
+
type MappedIntrinsicPropertyKeys<K extends PropertyKey[], M extends IntrinsicMode> = (K extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? MappedIntrinsicPropertyKey<L, M> & MappedIntrinsicPropertyKeys<R, M> : {});
|
|
10
|
+
declare function MappedIntrinsicPropertyKeys<K extends PropertyKey[], M extends IntrinsicMode>(K: [...K], M: M): MappedIntrinsicPropertyKeys<K, M>;
|
|
11
|
+
type MappedIntrinsicProperties<K extends TMappedKey, M extends IntrinsicMode> = (MappedIntrinsicPropertyKeys<K['keys'], M>);
|
|
12
|
+
declare function MappedIntrinsicProperties<K extends TMappedKey, M extends IntrinsicMode>(T: K, M: M): MappedIntrinsicProperties<K, M>;
|
|
13
|
+
export type TIntrinsicMappedResult<K extends TMappedKey, M extends IntrinsicMode, P extends TProperties = MappedIntrinsicProperties<K, M>> = (TMappedResult<P>);
|
|
14
|
+
export declare function IntrinsicMappedResult<K extends TMappedKey, M extends IntrinsicMode, P extends TProperties = MappedIntrinsicProperties<K, M>>(T: K, M: M): TMappedResult<P>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntrinsicMappedResult = void 0;
|
|
4
|
+
const index_1 = require("../mapped/index");
|
|
5
|
+
const intrinsic_1 = require("./intrinsic");
|
|
6
|
+
const index_2 = require("../literal/index");
|
|
7
|
+
function MappedIntrinsicPropertyKey(K, M) {
|
|
8
|
+
return {
|
|
9
|
+
[K]: (0, intrinsic_1.Intrinsic)((0, index_2.Literal)(K), M)
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function MappedIntrinsicPropertyKeys(K, M) {
|
|
13
|
+
const [L, ...R] = K;
|
|
14
|
+
return (K.length > 0
|
|
15
|
+
? { ...MappedIntrinsicPropertyKey(L, M), ...MappedIntrinsicPropertyKeys(R, M) }
|
|
16
|
+
: {});
|
|
17
|
+
}
|
|
18
|
+
function MappedIntrinsicProperties(T, M) {
|
|
19
|
+
return MappedIntrinsicPropertyKeys(T['keys'], M);
|
|
20
|
+
}
|
|
21
|
+
function IntrinsicMappedResult(T, M) {
|
|
22
|
+
const P = MappedIntrinsicProperties(T, M);
|
|
23
|
+
return (0, index_1.MappedResult)(P);
|
|
24
|
+
}
|
|
25
|
+
exports.IntrinsicMappedResult = IntrinsicMappedResult;
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import type { TSchema
|
|
1
|
+
import type { TSchema } from '../schema/index';
|
|
2
2
|
import { type TTemplateLiteral, type TTemplateLiteralKind } from '../template-literal/index';
|
|
3
|
+
import { type TIntrinsicMappedResult } from './intrinsic-mapped-result';
|
|
3
4
|
import { type TLiteral, type TLiteralValue } from '../literal/index';
|
|
4
5
|
import { type TUnion } from '../union/index';
|
|
5
|
-
|
|
6
|
-
type
|
|
6
|
+
import { type TMappedKey } from '../mapped/index';
|
|
7
|
+
export type IntrinsicMode = 'Uppercase' | 'Lowercase' | 'Capitalize' | 'Uncapitalize';
|
|
8
|
+
type FromTemplateLiteral<T extends TTemplateLiteralKind[], M extends IntrinsicMode> = M extends IntrinsicMode ? T extends [infer L extends TTemplateLiteralKind, ...infer R extends TTemplateLiteralKind[]] ? [TIntrinsic<L, M>, ...FromTemplateLiteral<R, M>] : T : T;
|
|
7
9
|
declare function FromTemplateLiteral<T extends TTemplateLiteralKind[], M extends IntrinsicMode>(schema: TTemplateLiteral, mode: IntrinsicMode): FromTemplateLiteral<T, M>;
|
|
8
10
|
type FromLiteralValue<T, M extends IntrinsicMode> = (T extends string ? M extends 'Uncapitalize' ? Uncapitalize<T> : M extends 'Capitalize' ? Capitalize<T> : M extends 'Uppercase' ? Uppercase<T> : M extends 'Lowercase' ? Lowercase<T> : string : T);
|
|
9
11
|
declare function FromLiteralValue(value: TLiteralValue, mode: IntrinsicMode): string;
|
|
10
|
-
type FromRest<T extends TSchema[], M extends IntrinsicMode> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [
|
|
12
|
+
type FromRest<T extends TSchema[], M extends IntrinsicMode> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [TIntrinsic<L, M>, ...FromRest<R, M>] : [];
|
|
11
13
|
declare function FromRest<T extends TSchema[], M extends IntrinsicMode>(T: [...T], mode: M): FromRest<T, M>;
|
|
12
|
-
export type
|
|
13
|
-
export declare function
|
|
14
|
-
export
|
|
15
|
-
export declare function Uncapitalize<T extends TSchema>(T: T, options?: SchemaOptions): TUncapitalize<T>;
|
|
16
|
-
export type TUppercase<T extends TSchema> = IntrinsicResolve<T, 'Uppercase'>;
|
|
17
|
-
export declare function Uppercase<T extends TSchema>(T: T, options?: SchemaOptions): TUppercase<T>;
|
|
18
|
-
export type TLowercase<T extends TSchema> = IntrinsicResolve<T, 'Lowercase'>;
|
|
19
|
-
export declare function Lowercase<T extends TSchema>(T: T, options?: SchemaOptions): TLowercase<T>;
|
|
20
|
-
export type TCapitalize<T extends TSchema> = IntrinsicResolve<T, 'Capitalize'>;
|
|
21
|
-
export declare function Capitalize<T extends TSchema>(T: T, options?: SchemaOptions): TCapitalize<T>;
|
|
14
|
+
export type TIntrinsic<T extends TSchema, M extends IntrinsicMode> = T extends TMappedKey ? TIntrinsicMappedResult<T, M> : T extends TTemplateLiteral<infer S> ? TTemplateLiteral<FromTemplateLiteral<S, M>> : T extends TUnion<infer S> ? TUnion<FromRest<S, M>> : T extends TLiteral<infer S> ? TLiteral<FromLiteralValue<S, M>> : T;
|
|
15
|
+
export declare function Intrinsic<T extends TMappedKey, M extends IntrinsicMode>(schema: T, mode: M): TIntrinsicMappedResult<T, M>;
|
|
16
|
+
export declare function Intrinsic<T extends TSchema, M extends IntrinsicMode>(schema: T, mode: M): TIntrinsic<T, M>;
|
|
22
17
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Intrinsic = void 0;
|
|
4
4
|
const index_1 = require("../template-literal/index");
|
|
5
|
+
const intrinsic_mapped_result_1 = require("./intrinsic-mapped-result");
|
|
5
6
|
const index_2 = require("../literal/index");
|
|
6
7
|
const index_3 = require("../union/index");
|
|
7
8
|
const type_1 = require("../guard/type");
|
|
8
|
-
const type_2 = require("../clone/type");
|
|
9
9
|
function ApplyUncapitalize(value) {
|
|
10
10
|
const [first, rest] = [value.slice(0, 1), value.slice(1)];
|
|
11
11
|
return [first.toLowerCase(), rest].join('');
|
|
@@ -40,28 +40,13 @@ function FromLiteralValue(value, mode) {
|
|
|
40
40
|
}
|
|
41
41
|
function FromRest(T, mode) {
|
|
42
42
|
const [L, ...R] = T;
|
|
43
|
-
return (T.length > 0 ? [
|
|
43
|
+
return (T.length > 0 ? [Intrinsic(L, mode), ...FromRest(R, mode)] : []);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return ((0, type_1.
|
|
47
|
-
(0, type_1.
|
|
48
|
-
(0, type_1.
|
|
49
|
-
schema)
|
|
45
|
+
function Intrinsic(schema, mode) {
|
|
46
|
+
return ((0, type_1.TMappedKey)(schema) ? (0, intrinsic_mapped_result_1.IntrinsicMappedResult)(schema, mode) :
|
|
47
|
+
(0, type_1.TTemplateLiteral)(schema) ? FromTemplateLiteral(schema, mode) :
|
|
48
|
+
(0, type_1.TUnion)(schema) ? (0, index_3.Union)(FromRest(schema.anyOf, mode)) :
|
|
49
|
+
(0, type_1.TLiteral)(schema) ? (0, index_2.Literal)(FromLiteralValue(schema.const, mode)) :
|
|
50
|
+
schema);
|
|
50
51
|
}
|
|
51
|
-
exports.
|
|
52
|
-
function Uncapitalize(T, options = {}) {
|
|
53
|
-
return (0, type_2.CloneType)(IntrinsicResolve(T, 'Uncapitalize'), options);
|
|
54
|
-
}
|
|
55
|
-
exports.Uncapitalize = Uncapitalize;
|
|
56
|
-
function Uppercase(T, options = {}) {
|
|
57
|
-
return (0, type_2.CloneType)(IntrinsicResolve(T, 'Uppercase'), options);
|
|
58
|
-
}
|
|
59
|
-
exports.Uppercase = Uppercase;
|
|
60
|
-
function Lowercase(T, options = {}) {
|
|
61
|
-
return (0, type_2.CloneType)(IntrinsicResolve(T, 'Lowercase'), options);
|
|
62
|
-
}
|
|
63
|
-
exports.Lowercase = Lowercase;
|
|
64
|
-
function Capitalize(T, options = {}) {
|
|
65
|
-
return (0, type_2.CloneType)(IntrinsicResolve(T, 'Capitalize'), options);
|
|
66
|
-
}
|
|
67
|
-
exports.Capitalize = Capitalize;
|
|
52
|
+
exports.Intrinsic = Intrinsic;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TSchema, SchemaOptions } from '../schema/index';
|
|
2
|
+
import { TIntrinsic } from './intrinsic';
|
|
3
|
+
export type TLowercase<T extends TSchema> = TIntrinsic<T, 'Lowercase'>;
|
|
4
|
+
export declare function Lowercase<T extends TSchema>(T: T, options?: SchemaOptions): TLowercase<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Lowercase = void 0;
|
|
4
|
+
const intrinsic_1 = require("./intrinsic");
|
|
5
|
+
const type_1 = require("../clone/type");
|
|
6
|
+
function Lowercase(T, options = {}) {
|
|
7
|
+
return (0, type_1.CloneType)((0, intrinsic_1.Intrinsic)(T, 'Lowercase'), options);
|
|
8
|
+
}
|
|
9
|
+
exports.Lowercase = Lowercase;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TSchema, SchemaOptions } from '../schema/index';
|
|
2
|
+
import { TIntrinsic } from './intrinsic';
|
|
3
|
+
export type TUncapitalize<T extends TSchema> = TIntrinsic<T, 'Uncapitalize'>;
|
|
4
|
+
export declare function Uncapitalize<T extends TSchema>(T: T, options?: SchemaOptions): TUncapitalize<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Uncapitalize = void 0;
|
|
4
|
+
const intrinsic_1 = require("./intrinsic");
|
|
5
|
+
const type_1 = require("../clone/type");
|
|
6
|
+
function Uncapitalize(T, options = {}) {
|
|
7
|
+
return (0, type_1.CloneType)((0, intrinsic_1.Intrinsic)(T, 'Uncapitalize'), options);
|
|
8
|
+
}
|
|
9
|
+
exports.Uncapitalize = Uncapitalize;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TSchema, SchemaOptions } from '../schema/index';
|
|
2
|
+
import { TIntrinsic } from './intrinsic';
|
|
3
|
+
export type TUppercase<T extends TSchema> = TIntrinsic<T, 'Uppercase'>;
|
|
4
|
+
export declare function Uppercase<T extends TSchema>(T: T, options?: SchemaOptions): TUppercase<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Uppercase = void 0;
|
|
4
|
+
const intrinsic_1 = require("./intrinsic");
|
|
5
|
+
const type_1 = require("../clone/type");
|
|
6
|
+
function Uppercase(T, options = {}) {
|
|
7
|
+
return (0, type_1.CloneType)((0, intrinsic_1.Intrinsic)(T, 'Uppercase'), options);
|
|
8
|
+
}
|
|
9
|
+
exports.Uppercase = Uppercase;
|
|
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mapped-key"), exports);
|
|
18
|
+
__exportStar(require("./mapped-result"), exports);
|
|
17
19
|
__exportStar(require("./mapped"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TSchema } from '../schema/index';
|
|
2
|
+
import { Kind } from '../symbols/index';
|
|
3
|
+
export interface TMappedKey<T extends PropertyKey[] = PropertyKey[]> extends TSchema {
|
|
4
|
+
[Kind]: 'MappedKey';
|
|
5
|
+
static: T[number];
|
|
6
|
+
keys: T;
|
|
7
|
+
}
|
|
8
|
+
export declare function MappedKey<T extends PropertyKey[]>(T: [...T]): TMappedKey<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MappedKey = void 0;
|
|
4
|
+
const index_1 = require("../symbols/index");
|
|
5
|
+
function MappedKey(T) {
|
|
6
|
+
return {
|
|
7
|
+
[index_1.Kind]: 'MappedKey',
|
|
8
|
+
keys: T
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.MappedKey = MappedKey;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TSchema } from '../schema/index';
|
|
2
|
+
import type { TProperties } from '../object/index';
|
|
3
|
+
import { Kind } from '../symbols/index';
|
|
4
|
+
export interface TMappedResult<T extends TProperties = TProperties> extends TSchema {
|
|
5
|
+
[Kind]: 'MappedResult';
|
|
6
|
+
properties: T;
|
|
7
|
+
static: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare function MappedResult<T extends TProperties>(properties: T): TMappedResult<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MappedResult = void 0;
|
|
4
|
+
const index_1 = require("../symbols/index");
|
|
5
|
+
function MappedResult(properties) {
|
|
6
|
+
return {
|
|
7
|
+
[index_1.Kind]: 'MappedResult',
|
|
8
|
+
properties
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.MappedResult = MappedResult;
|
|
@@ -1,50 +1,43 @@
|
|
|
1
1
|
import type { TSchema } from '../schema/index';
|
|
2
|
-
import type { Ensure, Evaluate } from '../helpers/index';
|
|
3
|
-
import { IndexedPropertyKeys } from '../indexed/index';
|
|
4
|
-
import { Kind } from '../symbols/index';
|
|
2
|
+
import type { Ensure, Evaluate, Assert } from '../helpers/index';
|
|
5
3
|
import { type TArray } from '../array/index';
|
|
6
4
|
import { type TAsyncIterator } from '../async-iterator/index';
|
|
7
5
|
import { type TConstructor } from '../constructor/index';
|
|
8
6
|
import { type TFunction } from '../function/index';
|
|
7
|
+
import { type TIndexPropertyKeys } from '../indexed/index';
|
|
9
8
|
import { type TIntersect } from '../intersect/index';
|
|
10
9
|
import { type TIterator } from '../iterator/index';
|
|
11
10
|
import { type TLiteral, type TLiteralValue } from '../literal/index';
|
|
12
|
-
import { type TNever } from '../never/index';
|
|
13
11
|
import { type TObject, type TProperties, type ObjectOptions } from '../object/index';
|
|
14
12
|
import { type TOptional } from '../optional/index';
|
|
15
13
|
import { type TPromise } from '../promise/index';
|
|
16
14
|
import { type TReadonly } from '../readonly/index';
|
|
15
|
+
import { type TTuple } from '../tuple/index';
|
|
17
16
|
import { type TUnion } from '../union/index';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
keys: T;
|
|
22
|
-
}
|
|
23
|
-
export declare function MappedKey<T extends PropertyKey[]>(T: [...T]): TMappedKey<T>;
|
|
24
|
-
export type MappedFunction<K extends PropertyKey[], I = TMappedKey<K>> = (T: I) => TSchema;
|
|
25
|
-
type FromMappedResult<K extends PropertyKey, P extends TProperties> = (K extends keyof P ? FromMappedPropertyKey<K, P[K]> : TNever);
|
|
17
|
+
import { type TMappedResult } from './mapped-result';
|
|
18
|
+
import type { TMappedKey } from './mapped-key';
|
|
19
|
+
type FromMappedResult<K extends PropertyKey, P extends TProperties> = (K extends keyof P ? FromSchemaType<K, P[K]> : TMappedResult<P>);
|
|
26
20
|
declare function FromMappedResult<K extends PropertyKey, P extends TProperties>(K: K, P: P): FromMappedResult<K, P>;
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
type MappedKeyToMappedResultProperties<K extends PropertyKey, P extends PropertyKey[]> = (P extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? {
|
|
22
|
+
[_ in L]: TLiteral<Assert<L, TLiteralValue>>;
|
|
23
|
+
} & MappedKeyToMappedResultProperties<K, R> : {});
|
|
24
|
+
declare function MappedKeyToMappedResultProperties<K extends PropertyKey, P extends PropertyKey[]>(K: K, P: [...P]): MappedKeyToMappedResultProperties<K, P>;
|
|
25
|
+
type FromMappedKey<K extends PropertyKey, P extends PropertyKey[], R extends TProperties = MappedKeyToMappedResultProperties<K, P>> = (FromMappedResult<K, R>);
|
|
26
|
+
declare function FromMappedKey<K extends PropertyKey, P extends PropertyKey[]>(K: K, P: [...P]): FromMappedResult<K, MappedKeyToMappedResultProperties<K, P>>;
|
|
27
|
+
type FromRest<K extends PropertyKey, T extends TSchema[]> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [FromSchemaType<K, L>, ...FromRest<K, R>] : [];
|
|
30
28
|
declare function FromRest<K extends PropertyKey, T extends TSchema[]>(K: K, T: [...T]): FromRest<K, T>;
|
|
31
29
|
type FromProperties<K extends PropertyKey, T extends TProperties, R extends TProperties = Evaluate<{
|
|
32
|
-
[K2 in keyof T]:
|
|
30
|
+
[K2 in keyof T]: FromSchemaType<K, T[K2]>;
|
|
33
31
|
}>> = R;
|
|
34
32
|
declare function FromProperties<K extends PropertyKey, T extends TProperties>(K: K, T: T): FromProperties<K, T>;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
[_ in L]:
|
|
39
|
-
} &
|
|
40
|
-
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
export declare function MappedResult<T extends TProperties>(properties: T): TMappedResult<T>;
|
|
47
|
-
export type TMapped<K extends PropertyKey[], F extends MappedFunction<K>, R extends TProperties = Evaluate<FromMappedPropertyKeys<K, ReturnType<F>>>> = Ensure<TObject<R>>;
|
|
48
|
-
export declare function Mapped<K extends TSchema, I extends PropertyKey[] = IndexedPropertyKeys<K>, F extends MappedFunction<I> = MappedFunction<I>, R extends TMapped<I, F> = TMapped<I, F>>(key: K, map: F, options?: ObjectOptions): R;
|
|
49
|
-
export declare function Mapped<K extends PropertyKey[], F extends MappedFunction<K> = MappedFunction<K>, R extends TMapped<K, F> = TMapped<K, F>>(key: [...K], map: F, options?: ObjectOptions): R;
|
|
33
|
+
type FromSchemaType<K extends PropertyKey, T extends TSchema> = (T extends TReadonly<infer S> ? TReadonly<FromSchemaType<K, S>> : T extends TOptional<infer S> ? TOptional<FromSchemaType<K, S>> : T extends TMappedResult<infer P> ? FromMappedResult<K, P> : T extends TMappedKey<infer P> ? FromMappedKey<K, P> : T extends TConstructor<infer S extends TSchema[], infer R extends TSchema> ? TConstructor<FromRest<K, S>, FromSchemaType<K, R>> : T extends TFunction<infer S extends TSchema[], infer R extends TSchema> ? TFunction<FromRest<K, S>, FromSchemaType<K, R>> : T extends TAsyncIterator<infer S> ? TAsyncIterator<FromSchemaType<K, S>> : T extends TIterator<infer S> ? TIterator<FromSchemaType<K, S>> : T extends TIntersect<infer S> ? TIntersect<FromRest<K, S>> : T extends TUnion<infer S> ? TUnion<FromRest<K, S>> : T extends TTuple<infer S> ? TTuple<FromRest<K, S>> : T extends TObject<infer S> ? TObject<FromProperties<K, S>> : T extends TArray<infer S> ? TArray<FromSchemaType<K, S>> : T extends TPromise<infer S> ? TPromise<FromSchemaType<K, S>> : T);
|
|
34
|
+
declare function FromSchemaType<K extends PropertyKey, T extends TSchema>(K: K, T: T): FromSchemaType<K, T>;
|
|
35
|
+
type FromMappedFunctionReturnType<K extends PropertyKey[], T extends TSchema> = (K extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? {
|
|
36
|
+
[_ in L]: FromSchemaType<L, T>;
|
|
37
|
+
} & FromMappedFunctionReturnType<R, T> : {});
|
|
38
|
+
declare function FromMappedFunctionReturnType<K extends PropertyKey[], T extends TSchema>(K: [...K], T: T): FromMappedFunctionReturnType<K, T>;
|
|
39
|
+
export type TMappedFunction<K extends PropertyKey[], I = TMappedKey<K>> = (T: I) => TSchema;
|
|
40
|
+
export type TMapped<K extends PropertyKey[], F extends TMappedFunction<K>, R extends TProperties = Evaluate<FromMappedFunctionReturnType<K, ReturnType<F>>>> = Ensure<TObject<R>>;
|
|
41
|
+
export declare function Mapped<K extends TSchema, I extends PropertyKey[] = TIndexPropertyKeys<K>, F extends TMappedFunction<I> = TMappedFunction<I>, R extends TMapped<I, F> = TMapped<I, F>>(key: K, map: F, options?: ObjectOptions): R;
|
|
42
|
+
export declare function Mapped<K extends PropertyKey[], F extends TMappedFunction<K> = TMappedFunction<K>, R extends TMapped<K, F> = TMapped<K, F>>(key: [...K], map: F, options?: ObjectOptions): R;
|
|
50
43
|
export {};
|