@sinclair/typebox 0.32.0-dev-14 → 0.32.0-dev-15
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 +10 -10
- package/build/import/index.mjs +3 -3
- package/build/import/type/exclude/exclude-from-mapped-result.d.mts +13 -0
- package/build/import/type/exclude/exclude-from-mapped-result.mjs +14 -0
- package/build/import/type/exclude/exclude.d.mts +4 -1
- package/build/import/type/exclude/exclude.mjs +10 -4
- package/build/import/type/exclude/index.d.mts +1 -0
- package/build/import/type/exclude/index.mjs +1 -0
- package/build/import/type/extends/extends-from-mapped-key.d.mts +17 -0
- package/build/import/type/extends/extends-from-mapped-key.mjs +21 -0
- package/build/import/type/extends/extends-from-mapped-result.d.mts +13 -0
- package/build/import/type/extends/extends-from-mapped-result.mjs +14 -0
- 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 +2 -2
- package/build/import/type/extends/index.mjs +2 -2
- package/build/import/type/extract/extract-from-mapped-result.d.mts +13 -0
- package/build/import/type/extract/extract-from-mapped-result.mjs +14 -0
- package/build/import/type/extract/extract.d.mts +3 -0
- package/build/import/type/extract/extract.mjs +9 -3
- package/build/import/type/extract/index.d.mts +1 -0
- package/build/import/type/extract/index.mjs +1 -0
- package/build/import/type/indexed/index.d.mts +1 -1
- package/build/import/type/indexed/index.mjs +1 -1
- package/build/import/type/indexed/{indexed-mapped-result.d.mts → indexed-from-mapped-key.d.mts} +6 -6
- package/build/import/type/indexed/indexed-from-mapped-key.mjs +18 -0
- package/build/import/type/indexed/indexed-result.d.mts +2 -2
- package/build/import/type/indexed/indexed-result.mjs +3 -2
- package/build/import/type/indexed/indexed.d.mts +2 -2
- package/build/import/type/indexed/indexed.mjs +4 -4
- package/build/import/type/intrinsic/capitalize.mjs +1 -2
- package/build/import/type/intrinsic/index.d.mts +1 -1
- package/build/import/type/intrinsic/index.mjs +1 -1
- package/build/import/type/intrinsic/{intrinsic-mapped-result.d.mts → intrinsic-from-mapped-key.d.mts} +6 -5
- package/build/import/type/intrinsic/intrinsic-from-mapped-key.mjs +21 -0
- package/build/import/type/intrinsic/intrinsic.d.mts +6 -6
- package/build/import/type/intrinsic/intrinsic.mjs +8 -8
- package/build/import/type/intrinsic/lowercase.mjs +1 -2
- package/build/import/type/intrinsic/uncapitalize.mjs +1 -2
- package/build/import/type/intrinsic/uppercase.mjs +1 -2
- package/build/import/type/keyof/index.d.mts +1 -0
- package/build/import/type/keyof/index.mjs +1 -0
- package/build/import/type/keyof/keyof-from-mapped-result.d.mts +13 -0
- package/build/import/type/keyof/keyof-from-mapped-result.mjs +14 -0
- package/build/import/type/keyof/keyof.d.mts +3 -0
- package/build/import/type/keyof/keyof.mjs +9 -2
- package/build/import/type/omit/index.d.mts +1 -1
- package/build/import/type/omit/index.mjs +1 -1
- package/build/import/type/omit/omit-from-mapped-key.d.mts +15 -0
- package/build/import/type/omit/omit-from-mapped-key.mjs +20 -0
- package/build/import/type/omit/omit.d.mts +2 -2
- package/build/import/type/omit/omit.mjs +2 -2
- package/build/import/type/partial/index.d.mts +1 -0
- package/build/import/type/partial/index.mjs +1 -0
- package/build/import/type/partial/partial-from-mapped-result.d.mts +13 -0
- package/build/import/type/partial/partial-from-mapped-result.mjs +14 -0
- package/build/import/type/partial/partial.d.mts +5 -2
- package/build/import/type/partial/partial.mjs +11 -5
- package/build/import/type/pick/index.d.mts +1 -1
- package/build/import/type/pick/index.mjs +1 -1
- package/build/import/type/pick/pick-from-mapped-key.d.mts +15 -0
- package/build/import/type/pick/pick-from-mapped-key.mjs +20 -0
- package/build/import/type/pick/pick.d.mts +2 -2
- package/build/import/type/pick/pick.mjs +2 -2
- package/build/import/type/required/index.d.mts +1 -0
- package/build/import/type/required/index.mjs +1 -0
- package/build/import/type/required/required-from-mapped-result.d.mts +13 -0
- package/build/import/type/required/required-from-mapped-result.mjs +14 -0
- package/build/import/type/required/required.d.mts +5 -2
- package/build/import/type/required/required.mjs +11 -5
- package/build/import/type/type/json.d.mts +21 -16
- package/build/import/type/type/json.mjs +3 -3
- package/build/require/index.d.ts +10 -10
- package/build/require/index.js +5 -3
- package/build/require/type/exclude/exclude-from-mapped-result.d.ts +13 -0
- package/build/require/type/exclude/exclude-from-mapped-result.js +18 -0
- package/build/require/type/exclude/exclude.d.ts +4 -1
- package/build/require/type/exclude/exclude.js +9 -4
- package/build/require/type/exclude/index.d.ts +1 -0
- package/build/require/type/exclude/index.js +1 -0
- package/build/require/type/extends/extends-from-mapped-key.d.ts +17 -0
- package/build/require/type/extends/extends-from-mapped-key.js +25 -0
- package/build/require/type/extends/extends-from-mapped-result.d.ts +13 -0
- package/build/require/type/extends/extends-from-mapped-result.js +18 -0
- package/build/require/type/extends/extends.d.ts +4 -4
- package/build/require/type/extends/extends.js +4 -4
- package/build/require/type/extends/index.d.ts +2 -2
- package/build/require/type/extends/index.js +2 -2
- package/build/require/type/extract/extract-from-mapped-result.d.ts +13 -0
- package/build/require/type/extract/extract-from-mapped-result.js +18 -0
- package/build/require/type/extract/extract.d.ts +3 -0
- package/build/require/type/extract/extract.js +8 -2
- package/build/require/type/extract/index.d.ts +1 -0
- package/build/require/type/extract/index.js +1 -0
- package/build/require/type/indexed/index.d.ts +1 -1
- package/build/require/type/indexed/index.js +1 -1
- package/build/require/type/indexed/{indexed-mapped-result.d.ts → indexed-from-mapped-key.d.ts} +6 -6
- package/build/require/type/indexed/indexed-from-mapped-key.js +22 -0
- package/build/require/type/indexed/indexed-result.d.ts +2 -2
- package/build/require/type/indexed/indexed-result.js +11 -10
- package/build/require/type/indexed/indexed.d.ts +2 -2
- package/build/require/type/indexed/indexed.js +4 -4
- package/build/require/type/intrinsic/capitalize.js +1 -2
- package/build/require/type/intrinsic/index.d.ts +1 -1
- package/build/require/type/intrinsic/index.js +1 -1
- package/build/require/type/intrinsic/{intrinsic-mapped-result.d.ts → intrinsic-from-mapped-key.d.ts} +6 -5
- package/build/require/type/intrinsic/intrinsic-from-mapped-key.js +25 -0
- package/build/require/type/intrinsic/intrinsic.d.ts +6 -6
- package/build/require/type/intrinsic/intrinsic.js +8 -8
- package/build/require/type/intrinsic/lowercase.js +1 -2
- package/build/require/type/intrinsic/uncapitalize.js +1 -2
- package/build/require/type/intrinsic/uppercase.js +1 -2
- package/build/require/type/keyof/index.d.ts +1 -0
- package/build/require/type/keyof/index.js +1 -0
- package/build/require/type/keyof/keyof-from-mapped-result.d.ts +13 -0
- package/build/require/type/keyof/keyof-from-mapped-result.js +18 -0
- package/build/require/type/keyof/keyof.d.ts +3 -0
- package/build/require/type/keyof/keyof.js +9 -2
- package/build/require/type/omit/index.d.ts +1 -1
- package/build/require/type/omit/index.js +1 -1
- package/build/require/type/omit/omit-from-mapped-key.d.ts +15 -0
- package/build/require/type/omit/omit-from-mapped-key.js +24 -0
- package/build/require/type/omit/omit.d.ts +2 -2
- package/build/require/type/omit/omit.js +2 -2
- package/build/require/type/partial/index.d.ts +1 -0
- package/build/require/type/partial/index.js +1 -0
- package/build/require/type/partial/partial-from-mapped-result.d.ts +13 -0
- package/build/require/type/partial/partial-from-mapped-result.js +18 -0
- package/build/require/type/partial/partial.d.ts +5 -2
- package/build/require/type/partial/partial.js +10 -5
- package/build/require/type/pick/index.d.ts +1 -1
- package/build/require/type/pick/index.js +1 -1
- package/build/require/type/pick/pick-from-mapped-key.d.ts +15 -0
- package/build/require/type/pick/pick-from-mapped-key.js +24 -0
- package/build/require/type/pick/pick.d.ts +2 -2
- package/build/require/type/pick/pick.js +2 -2
- package/build/require/type/required/index.d.ts +1 -0
- package/build/require/type/required/index.js +1 -0
- package/build/require/type/required/required-from-mapped-result.d.ts +13 -0
- package/build/require/type/required/required-from-mapped-result.js +18 -0
- package/build/require/type/required/required.d.ts +5 -2
- package/build/require/type/required/required.js +10 -5
- package/build/require/type/type/json.d.ts +21 -16
- package/build/require/type/type/json.js +3 -3
- package/package.json +1 -1
- package/readme.md +79 -91
- package/build/import/type/extends/extends-mapped-result-from-result.d.mts +0 -13
- package/build/import/type/extends/extends-mapped-result-from-result.mjs +0 -14
- package/build/import/type/extends/extends-mapped-result.d.mts +0 -17
- package/build/import/type/extends/extends-mapped-result.mjs +0 -21
- package/build/import/type/indexed/indexed-mapped-result.mjs +0 -18
- package/build/import/type/intrinsic/intrinsic-mapped-result.mjs +0 -21
- package/build/import/type/omit/omit-mapped-result.d.mts +0 -15
- package/build/import/type/omit/omit-mapped-result.mjs +0 -20
- package/build/import/type/pick/pick-mapped-result.d.mts +0 -15
- package/build/import/type/pick/pick-mapped-result.mjs +0 -20
- package/build/require/type/extends/extends-mapped-result-from-result.d.ts +0 -13
- package/build/require/type/extends/extends-mapped-result-from-result.js +0 -18
- package/build/require/type/extends/extends-mapped-result.d.ts +0 -17
- package/build/require/type/extends/extends-mapped-result.js +0 -25
- package/build/require/type/indexed/indexed-mapped-result.js +0 -22
- package/build/require/type/intrinsic/intrinsic-mapped-result.js +0 -25
- package/build/require/type/omit/omit-mapped-result.d.ts +0 -15
- package/build/require/type/omit/omit-mapped-result.js +0 -24
- package/build/require/type/pick/pick-mapped-result.d.ts +0 -15
- package/build/require/type/pick/pick-mapped-result.js +0 -24
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TemplateLiteral, TemplateLiteralParseExact, IsTemplateLiteralFinite, TemplateLiteralGenerate } from '../template-literal/index.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { IntrinsicFromMappedKey } from './intrinsic-from-mapped-key.mjs';
|
|
3
3
|
import { Literal } from '../literal/index.mjs';
|
|
4
4
|
import { Union } from '../union/index.mjs';
|
|
5
5
|
import { TMappedKey as IsMappedKeyType, TTemplateLiteral as IsTemplateLiteralType, TUnion as IsUnionType, TLiteral as IsLiteralType } from '../guard/type.mjs';
|
|
@@ -17,7 +17,7 @@ function ApplyUppercase(value) {
|
|
|
17
17
|
function ApplyLowercase(value) {
|
|
18
18
|
return value.toLowerCase();
|
|
19
19
|
}
|
|
20
|
-
function FromTemplateLiteral(schema, mode) {
|
|
20
|
+
function FromTemplateLiteral(schema, mode, options) {
|
|
21
21
|
const expression = TemplateLiteralParseExact(schema.pattern);
|
|
22
22
|
const finite = IsTemplateLiteralFinite(expression);
|
|
23
23
|
if (!finite)
|
|
@@ -26,7 +26,7 @@ function FromTemplateLiteral(schema, mode) {
|
|
|
26
26
|
const literals = strings.map((value) => Literal(value));
|
|
27
27
|
const mapped = FromRest(literals, mode);
|
|
28
28
|
const union = Union(mapped);
|
|
29
|
-
return TemplateLiteral([union]);
|
|
29
|
+
return TemplateLiteral([union], options);
|
|
30
30
|
}
|
|
31
31
|
function FromLiteralValue(value, mode) {
|
|
32
32
|
return (typeof value === 'string' ? (mode === 'Uncapitalize' ? ApplyUncapitalize(value) :
|
|
@@ -39,10 +39,10 @@ function FromRest(T, mode) {
|
|
|
39
39
|
const [L, ...R] = T;
|
|
40
40
|
return (T.length > 0 ? [Intrinsic(L, mode), ...FromRest(R, mode)] : []);
|
|
41
41
|
}
|
|
42
|
-
export function Intrinsic(schema, mode) {
|
|
43
|
-
return (IsMappedKeyType(schema) ?
|
|
44
|
-
IsTemplateLiteralType(schema) ? FromTemplateLiteral(schema, mode) :
|
|
45
|
-
IsUnionType(schema) ? Union(FromRest(schema.anyOf, mode)) :
|
|
46
|
-
IsLiteralType(schema) ? Literal(FromLiteralValue(schema.const, mode)) :
|
|
42
|
+
export function Intrinsic(schema, mode, options = {}) {
|
|
43
|
+
return (IsMappedKeyType(schema) ? IntrinsicFromMappedKey(schema, mode, options) :
|
|
44
|
+
IsTemplateLiteralType(schema) ? FromTemplateLiteral(schema, mode, schema) :
|
|
45
|
+
IsUnionType(schema) ? Union(FromRest(schema.anyOf, mode), options) :
|
|
46
|
+
IsLiteralType(schema) ? Literal(FromLiteralValue(schema.const, mode), options) :
|
|
47
47
|
schema);
|
|
48
48
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SchemaOptions } from '../schema/index.mjs';
|
|
2
|
+
import type { TProperties } from '../object/index.mjs';
|
|
3
|
+
import { type TMappedResult } from '../mapped/index.mjs';
|
|
4
|
+
import { type TKeyOf } from './keyof.mjs';
|
|
5
|
+
type FromProperties<K extends TProperties> = ({
|
|
6
|
+
[K2 in keyof K]: TKeyOf<K[K2]>;
|
|
7
|
+
});
|
|
8
|
+
declare function FromProperties<K extends TProperties>(K: K, options: SchemaOptions): FromProperties<K>;
|
|
9
|
+
type FromMappedResult<K extends TMappedResult> = (FromProperties<K['properties']>);
|
|
10
|
+
declare function FromMappedResult<K extends TMappedResult>(K: K, options: SchemaOptions): FromMappedResult<K>;
|
|
11
|
+
export type TKeyOfFromMappedResult<T extends TMappedResult, P extends TProperties = FromMappedResult<T>> = (TMappedResult<P>);
|
|
12
|
+
export declare function KeyOfFromMappedResult<T extends TMappedResult, P extends TProperties = FromMappedResult<T>>(T: T, options: SchemaOptions): TMappedResult<P>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
+
import { KeyOf } from './keyof.mjs';
|
|
3
|
+
function FromProperties(K, options) {
|
|
4
|
+
return globalThis.Object.getOwnPropertyNames(K).reduce((Acc, K2) => {
|
|
5
|
+
return { ...Acc, [K2]: KeyOf(K[K2], options) };
|
|
6
|
+
}, {});
|
|
7
|
+
}
|
|
8
|
+
function FromMappedResult(K, options) {
|
|
9
|
+
return FromProperties(K.properties, options);
|
|
10
|
+
}
|
|
11
|
+
export function KeyOfFromMappedResult(T, options) {
|
|
12
|
+
const P = FromMappedResult(T, options);
|
|
13
|
+
return MappedResult(P);
|
|
14
|
+
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { TSchema } from '../schema/index.mjs';
|
|
2
2
|
import type { Ensure } from '../helpers/index.mjs';
|
|
3
|
+
import type { TMappedResult } from '../mapped/index.mjs';
|
|
3
4
|
import { type TLiteral, TLiteralValue } from '../literal/index.mjs';
|
|
4
5
|
import { type TNumber } from '../number/index.mjs';
|
|
5
6
|
import { type SchemaOptions } from '../schema/index.mjs';
|
|
6
7
|
import { KeyOfPropertyKeys } from './keyof-property-keys.mjs';
|
|
7
8
|
import { UnionResolve } from '../union/index.mjs';
|
|
9
|
+
import { type TKeyOfFromMappedResult } from './keyof-from-mapped-result.mjs';
|
|
8
10
|
type FromLiterals<T extends TLiteralValue[]> = (T extends [infer L extends TLiteralValue, ...infer R extends TLiteralValue[]] ? L extends '[number]' ? [TNumber, ...FromLiterals<R>] : [TLiteral<L>, ...FromLiterals<R>] : []);
|
|
9
11
|
declare function FromLiterals<T extends TLiteralValue[]>(T: [...T]): FromLiterals<T>;
|
|
10
12
|
export type TKeyOf<T extends TSchema> = (Ensure<UnionResolve<FromLiterals<KeyOfPropertyKeys<T>>>>);
|
|
13
|
+
export declare function KeyOf<T extends TMappedResult>(T: T, options?: SchemaOptions): TKeyOfFromMappedResult<T>;
|
|
11
14
|
export declare function KeyOf<T extends TSchema>(T: T, options?: SchemaOptions): TKeyOf<T>;
|
|
12
15
|
export {};
|
|
@@ -3,6 +3,8 @@ import { Number } from '../number/index.mjs';
|
|
|
3
3
|
import { KeyOfPropertyKeys } from './keyof-property-keys.mjs';
|
|
4
4
|
import { UnionResolve } from '../union/index.mjs';
|
|
5
5
|
import { CloneType } from '../clone/type.mjs';
|
|
6
|
+
import { KeyOfFromMappedResult } from './keyof-from-mapped-result.mjs';
|
|
7
|
+
import { TMappedResult as IsMappedResultType } from '../guard/type.mjs';
|
|
6
8
|
function FromLiterals(T) {
|
|
7
9
|
const [L, ...R] = T;
|
|
8
10
|
return (T.length > 0
|
|
@@ -12,6 +14,11 @@ function FromLiterals(T) {
|
|
|
12
14
|
: []);
|
|
13
15
|
}
|
|
14
16
|
export function KeyOf(T, options = {}) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
if (IsMappedResultType(T)) {
|
|
18
|
+
return KeyOfFromMappedResult(T, options);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const K = UnionResolve(FromLiterals(KeyOfPropertyKeys(T)));
|
|
22
|
+
return CloneType(K, options);
|
|
23
|
+
}
|
|
17
24
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './omit-mapped-
|
|
1
|
+
export * from './omit-from-mapped-key.mjs';
|
|
2
2
|
export * from './omit.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './omit-mapped-
|
|
1
|
+
export * from './omit-from-mapped-key.mjs';
|
|
2
2
|
export * from './omit.mjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
|
|
2
|
+
import type { TProperties } from '../object/index.mjs';
|
|
3
|
+
import { type TMappedResult, type TMappedKey } from '../mapped/index.mjs';
|
|
4
|
+
import { type TOmit } from './omit.mjs';
|
|
5
|
+
type FromPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
6
|
+
[_ in K]: TOmit<T, [K]>;
|
|
7
|
+
};
|
|
8
|
+
declare function FromPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K, options: SchemaOptions): FromPropertyKey<T, K>;
|
|
9
|
+
type FromPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? FromPropertyKey<T, LK> & FromPropertyKeys<T, RK> : {});
|
|
10
|
+
declare function FromPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K], options: SchemaOptions): FromPropertyKeys<T, K>;
|
|
11
|
+
type FromMappedKey<T extends TSchema, K extends TMappedKey> = (FromPropertyKeys<T, K['keys']>);
|
|
12
|
+
declare function FromMappedKey<T extends TSchema, K extends TMappedKey>(T: T, K: K, options: SchemaOptions): FromMappedKey<T, K>;
|
|
13
|
+
export type TOmitFromMappedKey<T extends TSchema, K extends TMappedKey, P extends TProperties = FromMappedKey<T, K>> = (TMappedResult<P>);
|
|
14
|
+
export declare function OmitFromMappedKey<T extends TSchema, K extends TMappedKey, P extends TProperties = FromMappedKey<T, K>>(T: T, K: K, options: SchemaOptions): TMappedResult<P>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
+
import { Omit } from './omit.mjs';
|
|
3
|
+
function FromPropertyKey(T, K, options) {
|
|
4
|
+
return {
|
|
5
|
+
[K]: Omit(T, [K], options)
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function FromPropertyKeys(T, K, options) {
|
|
9
|
+
const [LK, ...RK] = K;
|
|
10
|
+
return (K.length > 0
|
|
11
|
+
? { ...FromPropertyKey(T, LK, options), ...FromPropertyKeys(T, RK, options) }
|
|
12
|
+
: {});
|
|
13
|
+
}
|
|
14
|
+
function FromMappedKey(T, K, options) {
|
|
15
|
+
return FromPropertyKeys(T, K.keys, options);
|
|
16
|
+
}
|
|
17
|
+
export function OmitFromMappedKey(T, K, options) {
|
|
18
|
+
const P = FromMappedKey(T, K, options);
|
|
19
|
+
return MappedResult(P);
|
|
20
|
+
}
|
|
@@ -6,7 +6,7 @@ import { type TUnion } from '../union/index.mjs';
|
|
|
6
6
|
import { type TObject, type TProperties } from '../object/index.mjs';
|
|
7
7
|
import { type TIndexPropertyKeys } from '../indexed/index.mjs';
|
|
8
8
|
import { TMappedKey } from '../mapped/index.mjs';
|
|
9
|
-
import { type
|
|
9
|
+
import { type TOmitFromMappedKey } from './omit-from-mapped-key.mjs';
|
|
10
10
|
type FromIntersect<T extends TSchema[], K extends PropertyKey[]> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [OmitResolve<L, K>, ...FromIntersect<R, K>] : [];
|
|
11
11
|
declare function FromIntersect<T extends TSchema[], K extends PropertyKey[]>(T: T, K: K): FromIntersect<T, K>;
|
|
12
12
|
type FromUnion<T extends TSchema[], K extends PropertyKey[]> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [OmitResolve<L, K>, ...FromUnion<R, K>] : [];
|
|
@@ -16,7 +16,7 @@ declare function FromProperties<T extends TProperties, K extends PropertyKey[]>(
|
|
|
16
16
|
export type OmitResolve<T extends TProperties, K extends PropertyKey[]> = T extends TRecursive<infer S> ? TRecursive<OmitResolve<S, K>> : T extends TIntersect<infer S> ? TIntersect<FromIntersect<S, K>> : T extends TUnion<infer S> ? TUnion<FromUnion<S, K>> : T extends TObject<infer S> ? TObject<FromProperties<S, K>> : TObject<{}>;
|
|
17
17
|
export declare function OmitResolve<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): OmitResolve<T, K>;
|
|
18
18
|
export type TOmit<T extends TSchema, K extends PropertyKey[]> = OmitResolve<T, K>;
|
|
19
|
-
export declare function Omit<T extends TSchema, K extends TMappedKey>(T: T, K: K):
|
|
19
|
+
export declare function Omit<T extends TSchema, K extends TMappedKey>(T: T, K: K): TOmitFromMappedKey<T, K>;
|
|
20
20
|
export declare function Omit<T extends TSchema, K extends TSchema, I extends PropertyKey[] = TIndexPropertyKeys<K>>(T: T, K: K, options?: SchemaOptions): TOmit<T, I>;
|
|
21
21
|
export declare function Omit<T extends TSchema, K extends PropertyKey[]>(T: T, K: readonly [...K], options?: SchemaOptions): TOmit<T, K>;
|
|
22
22
|
export {};
|
|
@@ -5,7 +5,7 @@ import { IndexPropertyKeys } from '../indexed/index.mjs';
|
|
|
5
5
|
import { Discard } from '../discard/index.mjs';
|
|
6
6
|
import { TransformKind } from '../symbols/index.mjs';
|
|
7
7
|
import { CloneType } from '../clone/type.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { OmitFromMappedKey } from './omit-from-mapped-key.mjs';
|
|
9
9
|
import { TMappedKey as IsMappedKeyType, TIntersect as IsIntersectType, TUnion as IsUnionType, TObject as IsObjectType, TSchema as IsSchemaType } from '../guard/type.mjs';
|
|
10
10
|
function FromIntersect(T, K) {
|
|
11
11
|
return T.map((T) => OmitResolve(T, K));
|
|
@@ -30,7 +30,7 @@ export function OmitResolve(T, K) {
|
|
|
30
30
|
}
|
|
31
31
|
export function Omit(T, K, options = {}) {
|
|
32
32
|
if (IsMappedKeyType(K)) {
|
|
33
|
-
return
|
|
33
|
+
return OmitFromMappedKey(T, K, options);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
36
|
const I = IsSchemaType(K) ? IndexPropertyKeys(K) : K;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SchemaOptions } from '../schema/index.mjs';
|
|
2
|
+
import type { TProperties } from '../object/index.mjs';
|
|
3
|
+
import { type TMappedResult } from '../mapped/index.mjs';
|
|
4
|
+
import { type TPartial } from './partial.mjs';
|
|
5
|
+
type FromProperties<K extends TProperties> = ({
|
|
6
|
+
[K2 in keyof K]: TPartial<K[K2]>;
|
|
7
|
+
});
|
|
8
|
+
declare function FromProperties<K extends TProperties>(K: K, options: SchemaOptions): FromProperties<K>;
|
|
9
|
+
type FromMappedResult<K extends TMappedResult> = (FromProperties<K['properties']>);
|
|
10
|
+
declare function FromMappedResult<K extends TMappedResult>(K: K, options: SchemaOptions): FromMappedResult<K>;
|
|
11
|
+
export type TPartialFromMappedResult<T extends TMappedResult, P extends TProperties = FromMappedResult<T>> = (TMappedResult<P>);
|
|
12
|
+
export declare function PartialFromMappedResult<T extends TMappedResult, P extends TProperties = FromMappedResult<T>>(T: T, options: SchemaOptions): TMappedResult<P>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
+
import { Partial } from './partial.mjs';
|
|
3
|
+
function FromProperties(K, options) {
|
|
4
|
+
return globalThis.Object.getOwnPropertyNames(K).reduce((Acc, K2) => {
|
|
5
|
+
return { ...Acc, [K2]: Partial(K[K2], options) };
|
|
6
|
+
}, {});
|
|
7
|
+
}
|
|
8
|
+
function FromMappedResult(K, options) {
|
|
9
|
+
return FromProperties(K.properties, options);
|
|
10
|
+
}
|
|
11
|
+
export function PartialFromMappedResult(T, options) {
|
|
12
|
+
const P = FromMappedResult(T, options);
|
|
13
|
+
return MappedResult(P);
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
|
|
2
2
|
import type { Evaluate } from '../helpers/index.mjs';
|
|
3
|
+
import type { TMappedResult } from '../mapped/index.mjs';
|
|
3
4
|
import { type TReadonlyOptional } from '../readonly-optional/index.mjs';
|
|
4
5
|
import { type TOptional } from '../optional/index.mjs';
|
|
5
6
|
import { type TReadonly } from '../readonly/index.mjs';
|
|
@@ -7,6 +8,7 @@ import { type TRecursive } from '../recursive/index.mjs';
|
|
|
7
8
|
import { type TObject, type TProperties } from '../object/index.mjs';
|
|
8
9
|
import { type TIntersect } from '../intersect/index.mjs';
|
|
9
10
|
import { type TUnion } from '../union/index.mjs';
|
|
11
|
+
import { type TPartialFromMappedResult } from './partial-from-mapped-result.mjs';
|
|
10
12
|
type FromIntersect<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [PartialResolve<L>, ...FromIntersect<R>] : []);
|
|
11
13
|
declare function FromIntersect<T extends TSchema[]>(T: [...T]): FromIntersect<T>;
|
|
12
14
|
type FromUnion<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [PartialResolve<L>, ...FromUnion<R>] : []);
|
|
@@ -15,8 +17,9 @@ type FromProperties<T extends TProperties> = Evaluate<{
|
|
|
15
17
|
[K in keyof T]: T[K] extends (TReadonlyOptional<infer S>) ? TReadonlyOptional<S> : T[K] extends (TReadonly<infer S>) ? TReadonlyOptional<S> : T[K] extends (TOptional<infer S>) ? TOptional<S> : TOptional<T[K]>;
|
|
16
18
|
}>;
|
|
17
19
|
declare function FromProperties<T extends TProperties>(T: T): TProperties;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
type PartialResolve<T extends TSchema> = (T extends TRecursive<infer S> ? TRecursive<PartialResolve<S>> : T extends TIntersect<infer S> ? TIntersect<FromIntersect<S>> : T extends TUnion<infer S> ? TUnion<FromUnion<S>> : T extends TObject<infer S> ? TObject<FromProperties<S>> : TObject<{}>);
|
|
21
|
+
declare function PartialResolve<T extends TSchema>(T: T): PartialResolve<T>;
|
|
20
22
|
export type TPartial<T extends TSchema> = PartialResolve<T>;
|
|
23
|
+
export declare function Partial<T extends TMappedResult>(T: T, options?: SchemaOptions): TPartialFromMappedResult<T>;
|
|
21
24
|
export declare function Partial<T extends TSchema>(T: T, options?: SchemaOptions): TPartial<T>;
|
|
22
25
|
export {};
|
|
@@ -5,7 +5,8 @@ import { Union } from '../union/index.mjs';
|
|
|
5
5
|
import { Discard } from '../discard/index.mjs';
|
|
6
6
|
import { TransformKind } from '../symbols/index.mjs';
|
|
7
7
|
import { CloneType } from '../clone/type.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { PartialFromMappedResult } from './partial-from-mapped-result.mjs';
|
|
9
|
+
import { TMappedResult as IsMappedResultType, TIntersect as IsIntersectType, TUnion as IsUnionType, TObject as IsObjectType } from '../guard/type.mjs';
|
|
9
10
|
function FromIntersect(T) {
|
|
10
11
|
const [L, ...R] = T;
|
|
11
12
|
return (T.length > 0
|
|
@@ -23,14 +24,19 @@ function FromProperties(T) {
|
|
|
23
24
|
return { ...Acc, [K]: Optional(T[K]) };
|
|
24
25
|
}, {});
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
function PartialResolve(T) {
|
|
27
28
|
return (IsIntersectType(T) ? Intersect(FromIntersect(T.allOf)) :
|
|
28
29
|
IsUnionType(T) ? Union(FromUnion(T.anyOf)) :
|
|
29
30
|
IsObjectType(T) ? Object(FromProperties(T.properties)) :
|
|
30
31
|
Object({}));
|
|
31
32
|
}
|
|
32
33
|
export function Partial(T, options = {}) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
if (IsMappedResultType(T)) {
|
|
35
|
+
return PartialFromMappedResult(T, options);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const D = Discard(T, [TransformKind, '$id', 'required']);
|
|
39
|
+
const R = CloneType(PartialResolve(T), options);
|
|
40
|
+
return { ...D, ...R };
|
|
41
|
+
}
|
|
36
42
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './pick-mapped-
|
|
1
|
+
export * from './pick-from-mapped-key.mjs';
|
|
2
2
|
export * from './pick.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './pick-mapped-
|
|
1
|
+
export * from './pick-from-mapped-key.mjs';
|
|
2
2
|
export * from './pick.mjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
|
|
2
|
+
import type { TProperties } from '../object/index.mjs';
|
|
3
|
+
import { type TMappedResult, type TMappedKey } from '../mapped/index.mjs';
|
|
4
|
+
import { type TPick } from './pick.mjs';
|
|
5
|
+
type FromPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
6
|
+
[_ in K]: TPick<T, [K]>;
|
|
7
|
+
};
|
|
8
|
+
declare function FromPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K, options: SchemaOptions): FromPropertyKey<T, K>;
|
|
9
|
+
type FromPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? FromPropertyKey<T, LK> & FromPropertyKeys<T, RK> : {});
|
|
10
|
+
declare function FromPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K], options: SchemaOptions): FromPropertyKeys<T, K>;
|
|
11
|
+
type FromMappedKey<T extends TSchema, K extends TMappedKey> = (FromPropertyKeys<T, K['keys']>);
|
|
12
|
+
declare function FromMappedKey<T extends TSchema, K extends TMappedKey>(T: T, K: K, options: SchemaOptions): FromMappedKey<T, K>;
|
|
13
|
+
export type TPickFromMappedKey<T extends TSchema, K extends TMappedKey, P extends TProperties = FromMappedKey<T, K>> = (TMappedResult<P>);
|
|
14
|
+
export declare function PickFromMappedKey<T extends TSchema, K extends TMappedKey, P extends TProperties = FromMappedKey<T, K>>(T: T, K: K, options: SchemaOptions): TMappedResult<P>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
+
import { Pick } from './pick.mjs';
|
|
3
|
+
function FromPropertyKey(T, K, options) {
|
|
4
|
+
return {
|
|
5
|
+
[K]: Pick(T, [K], options)
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function FromPropertyKeys(T, K, options) {
|
|
9
|
+
const [LK, ...RK] = K;
|
|
10
|
+
return (K.length > 0
|
|
11
|
+
? { ...FromPropertyKey(T, LK, options), ...FromPropertyKeys(T, RK, options) }
|
|
12
|
+
: {});
|
|
13
|
+
}
|
|
14
|
+
function FromMappedKey(T, K, options) {
|
|
15
|
+
return FromPropertyKeys(T, K.keys, options);
|
|
16
|
+
}
|
|
17
|
+
export function PickFromMappedKey(T, K, options) {
|
|
18
|
+
const P = FromMappedKey(T, K, options);
|
|
19
|
+
return MappedResult(P);
|
|
20
|
+
}
|
|
@@ -6,7 +6,7 @@ import { type TUnion } from '../union/index.mjs';
|
|
|
6
6
|
import { type TObject, type TProperties } from '../object/index.mjs';
|
|
7
7
|
import { type TIndexPropertyKeys } from '../indexed/index.mjs';
|
|
8
8
|
import { TMappedKey } from '../mapped/index.mjs';
|
|
9
|
-
import { type
|
|
9
|
+
import { type TPickFromMappedKey } from './pick-from-mapped-key.mjs';
|
|
10
10
|
type FromIntersect<T extends TSchema[], K extends PropertyKey[]> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [PickResolve<L, K>, ...FromIntersect<R, K>] : [];
|
|
11
11
|
declare function FromIntersect<T extends TSchema[], K extends PropertyKey[]>(T: T, K: K): FromIntersect<T, K>;
|
|
12
12
|
type FromUnion<T extends TSchema[], K extends PropertyKey[]> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [PickResolve<L, K>, ...FromUnion<R, K>] : [];
|
|
@@ -16,7 +16,7 @@ declare function FromProperties<T extends TProperties, K extends PropertyKey[]>(
|
|
|
16
16
|
export type PickResolve<T extends TProperties, K extends PropertyKey[]> = T extends TRecursive<infer S> ? TRecursive<PickResolve<S, K>> : T extends TIntersect<infer S> ? TIntersect<FromIntersect<S, K>> : T extends TUnion<infer S> ? TUnion<FromUnion<S, K>> : T extends TObject<infer S> ? TObject<FromProperties<S, K>> : TObject<{}>;
|
|
17
17
|
export declare function PickResolve<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): PickResolve<T, K>;
|
|
18
18
|
export type TPick<T extends TSchema, K extends PropertyKey[]> = PickResolve<T, K>;
|
|
19
|
-
export declare function Pick<T extends TSchema, K extends TMappedKey>(T: T, K: K):
|
|
19
|
+
export declare function Pick<T extends TSchema, K extends TMappedKey>(T: T, K: K): TPickFromMappedKey<T, K>;
|
|
20
20
|
export declare function Pick<T extends TSchema, K extends TSchema, I extends PropertyKey[] = TIndexPropertyKeys<K>>(T: T, K: K, options?: SchemaOptions): TPick<T, I>;
|
|
21
21
|
export declare function Pick<T extends TSchema, K extends PropertyKey[]>(T: T, K: readonly [...K], options?: SchemaOptions): TPick<T, K>;
|
|
22
22
|
export {};
|
|
@@ -5,7 +5,7 @@ import { IndexPropertyKeys } from '../indexed/index.mjs';
|
|
|
5
5
|
import { Discard } from '../discard/index.mjs';
|
|
6
6
|
import { TransformKind } from '../symbols/index.mjs';
|
|
7
7
|
import { CloneType } from '../clone/type.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { PickFromMappedKey } from './pick-from-mapped-key.mjs';
|
|
9
9
|
import { TMappedKey as IsMappedKeyType, TIntersect as IsIntersectType, TUnion as IsUnionType, TObject as IsObjectType, TSchema as IsSchemaType, } from '../guard/type.mjs';
|
|
10
10
|
function FromIntersect(T, K) {
|
|
11
11
|
return T.map((T) => PickResolve(T, K));
|
|
@@ -26,7 +26,7 @@ export function PickResolve(T, K) {
|
|
|
26
26
|
}
|
|
27
27
|
export function Pick(T, K, options = {}) {
|
|
28
28
|
if (IsMappedKeyType(K)) {
|
|
29
|
-
return
|
|
29
|
+
return PickFromMappedKey(T, K, options);
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
const I = IsSchemaType(K) ? IndexPropertyKeys(K) : K;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SchemaOptions } from '../schema/index.mjs';
|
|
2
|
+
import type { TProperties } from '../object/index.mjs';
|
|
3
|
+
import { type TMappedResult } from '../mapped/index.mjs';
|
|
4
|
+
import { type TRequired } from './required.mjs';
|
|
5
|
+
type FromProperties<K extends TProperties> = ({
|
|
6
|
+
[K2 in keyof K]: TRequired<K[K2]>;
|
|
7
|
+
});
|
|
8
|
+
declare function FromProperties<K extends TProperties>(K: K, options: SchemaOptions): FromProperties<K>;
|
|
9
|
+
type FromMappedResult<K extends TMappedResult> = (FromProperties<K['properties']>);
|
|
10
|
+
declare function FromMappedResult<K extends TMappedResult>(K: K, options: SchemaOptions): FromMappedResult<K>;
|
|
11
|
+
export type TRequiredFromMappedResult<T extends TMappedResult, P extends TProperties = FromMappedResult<T>> = (TMappedResult<P>);
|
|
12
|
+
export declare function RequiredFromMappedResult<T extends TMappedResult, P extends TProperties = FromMappedResult<T>>(T: T, options: SchemaOptions): TMappedResult<P>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
+
import { Required } from './required.mjs';
|
|
3
|
+
function FromProperties(K, options) {
|
|
4
|
+
return globalThis.Object.getOwnPropertyNames(K).reduce((Acc, K2) => {
|
|
5
|
+
return { ...Acc, [K2]: Required(K[K2], options) };
|
|
6
|
+
}, {});
|
|
7
|
+
}
|
|
8
|
+
function FromMappedResult(K, options) {
|
|
9
|
+
return FromProperties(K.properties, options);
|
|
10
|
+
}
|
|
11
|
+
export function RequiredFromMappedResult(T, options) {
|
|
12
|
+
const P = FromMappedResult(T, options);
|
|
13
|
+
return MappedResult(P);
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
|
|
2
2
|
import type { Evaluate } from '../helpers/index.mjs';
|
|
3
|
+
import type { TMappedResult } from '../mapped/index.mjs';
|
|
3
4
|
import { type TReadonlyOptional } from '../readonly-optional/index.mjs';
|
|
4
5
|
import { type TOptional } from '../optional/index.mjs';
|
|
5
6
|
import { type TReadonly } from '../readonly/index.mjs';
|
|
@@ -7,6 +8,7 @@ import { type TRecursive } from '../recursive/index.mjs';
|
|
|
7
8
|
import { type TIntersect } from '../intersect/index.mjs';
|
|
8
9
|
import { type TUnion } from '../union/index.mjs';
|
|
9
10
|
import { type TObject, type TProperties } from '../object/index.mjs';
|
|
11
|
+
import { type TRequiredFromMappedResult } from './required-from-mapped-result.mjs';
|
|
10
12
|
type FromIntersect<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [RequiredResolve<L>, ...FromIntersect<R>] : []);
|
|
11
13
|
declare function FromIntersect<T extends TSchema[]>(T: [...T]): FromIntersect<T>;
|
|
12
14
|
type FromUnion<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [RequiredResolve<L>, ...FromUnion<R>] : []);
|
|
@@ -15,8 +17,9 @@ type FromProperties<T extends TProperties> = Evaluate<{
|
|
|
15
17
|
[K in keyof T]: T[K] extends (TReadonlyOptional<infer S>) ? TReadonly<S> : T[K] extends (TReadonly<infer S>) ? TReadonly<S> : T[K] extends (TOptional<infer S>) ? S : T[K];
|
|
16
18
|
}>;
|
|
17
19
|
declare function FromProperties<T extends TProperties>(T: T): TProperties;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
type RequiredResolve<T extends TSchema> = (T extends TRecursive<infer S> ? TRecursive<RequiredResolve<S>> : T extends TIntersect<infer S> ? TIntersect<FromIntersect<S>> : T extends TUnion<infer S> ? TUnion<FromUnion<S>> : T extends TObject<infer S> ? TObject<FromProperties<S>> : TObject<{}>);
|
|
21
|
+
declare function RequiredResolve<T extends TSchema>(T: T): RequiredResolve<T>;
|
|
20
22
|
export type TRequired<T extends TSchema> = RequiredResolve<T>;
|
|
23
|
+
export declare function Required<T extends TMappedResult>(T: T, options?: SchemaOptions): TRequiredFromMappedResult<T>;
|
|
21
24
|
export declare function Required<T extends TSchema>(T: T, options?: SchemaOptions): TRequired<T>;
|
|
22
25
|
export {};
|
|
@@ -4,7 +4,8 @@ import { Object } from '../object/index.mjs';
|
|
|
4
4
|
import { OptionalKind, TransformKind } from '../symbols/index.mjs';
|
|
5
5
|
import { CloneType } from '../clone/type.mjs';
|
|
6
6
|
import { Discard } from '../discard/index.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { RequiredFromMappedResult } from './required-from-mapped-result.mjs';
|
|
8
|
+
import { TMappedResult as IsMappedResultType, TIntersect as IsIntersectType, TUnion as IsUnionType, TObject as IsObjectType } from '../guard/type.mjs';
|
|
8
9
|
function FromIntersect(T) {
|
|
9
10
|
const [L, ...R] = T;
|
|
10
11
|
return (T.length > 0
|
|
@@ -22,14 +23,19 @@ function FromProperties(T) {
|
|
|
22
23
|
return { ...Acc, [K]: Discard(T[K], [OptionalKind]) };
|
|
23
24
|
}, {});
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
function RequiredResolve(T) {
|
|
26
27
|
return (IsIntersectType(T) ? Intersect(FromIntersect(T.allOf)) :
|
|
27
28
|
IsUnionType(T) ? Union(FromUnion(T.anyOf)) :
|
|
28
29
|
IsObjectType(T) ? Object(FromProperties(T.properties)) :
|
|
29
30
|
Object({}));
|
|
30
31
|
}
|
|
31
32
|
export function Required(T, options = {}) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (IsMappedResultType(T)) {
|
|
34
|
+
return RequiredFromMappedResult(T, options);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const D = Discard(T, [TransformKind, '$id', 'required']);
|
|
38
|
+
const R = CloneType(RequiredResolve(T), options);
|
|
39
|
+
return { ...D, ...R };
|
|
40
|
+
}
|
|
35
41
|
}
|