@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,13 +0,0 @@
|
|
|
1
|
-
import type { TSchema } from '../schema/index.mjs';
|
|
2
|
-
import type { TProperties } from '../object/index.mjs';
|
|
3
|
-
import { type TMappedResult } from '../mapped/index.mjs';
|
|
4
|
-
import { type TExtends } from './extends.mjs';
|
|
5
|
-
type MappedResultExtendsPropertyKeys<K extends TProperties, U extends TSchema, L extends TSchema, R extends TSchema> = ({
|
|
6
|
-
[K2 in keyof K]: TExtends<K[K2], U, L, R>;
|
|
7
|
-
});
|
|
8
|
-
declare function MappedResultExtendsPropertyKeys<K extends TProperties, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedResultExtendsPropertyKeys<K, U, L, R>;
|
|
9
|
-
type MappedResultExtendsProperties<K extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema> = (MappedResultExtendsPropertyKeys<K['properties'], U, L, R>);
|
|
10
|
-
declare function MappedResultExtendsProperties<K extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedResultExtendsProperties<K, U, L, R>;
|
|
11
|
-
export type TExtendsMappedResultFromResult<T extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedResultExtendsProperties<T, U, L, R>> = (TMappedResult<P>);
|
|
12
|
-
export declare function ExtendsMappedResultFromResult<T extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedResultExtendsProperties<T, U, L, R>>(T: T, U: U, L: L, R: R): TMappedResult<P>;
|
|
13
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
-
import { Extends } from './extends.mjs';
|
|
3
|
-
function MappedResultExtendsPropertyKeys(K, U, L, R) {
|
|
4
|
-
return globalThis.Object.getOwnPropertyNames(K).reduce((Acc, K2) => {
|
|
5
|
-
return { ...Acc, [K2]: Extends(K[K2], U, L, R) };
|
|
6
|
-
}, {});
|
|
7
|
-
}
|
|
8
|
-
function MappedResultExtendsProperties(K, U, L, R) {
|
|
9
|
-
return MappedResultExtendsPropertyKeys(K.properties, U, L, R);
|
|
10
|
-
}
|
|
11
|
-
export function ExtendsMappedResultFromResult(T, U, L, R) {
|
|
12
|
-
const P = MappedResultExtendsProperties(T, U, L, R);
|
|
13
|
-
return MappedResult(P);
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { TSchema } from '../schema/index.mjs';
|
|
2
|
-
import type { TProperties } from '../object/index.mjs';
|
|
3
|
-
import type { Assert } from '../helpers/index.mjs';
|
|
4
|
-
import { type TMappedResult, type TMappedKey } from '../mapped/index.mjs';
|
|
5
|
-
import { TLiteral, TLiteralValue } from '../literal/index.mjs';
|
|
6
|
-
import { type TExtends } from './extends.mjs';
|
|
7
|
-
type MappedExtendsPropertyKey<K extends PropertyKey, U extends TSchema, L extends TSchema, R extends TSchema> = {
|
|
8
|
-
[_ in K]: TExtends<TLiteral<Assert<K, TLiteralValue>>, U, L, R>;
|
|
9
|
-
};
|
|
10
|
-
declare function MappedExtendsPropertyKey<K extends PropertyKey, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedExtendsPropertyKey<K, U, L, R>;
|
|
11
|
-
type MappedExtendsPropertyKeys<K extends PropertyKey[], U extends TSchema, L extends TSchema, R extends TSchema> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? MappedExtendsPropertyKey<LK, U, L, R> & MappedExtendsPropertyKeys<RK, U, L, R> : {});
|
|
12
|
-
declare function MappedExtendsPropertyKeys<K extends PropertyKey[], U extends TSchema, L extends TSchema, R extends TSchema>(K: [...K], U: U, L: L, R: R): MappedExtendsPropertyKeys<K, U, L, R>;
|
|
13
|
-
type MappedExtendsProperties<K extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema> = (MappedExtendsPropertyKeys<K['keys'], U, L, R>);
|
|
14
|
-
declare function MappedExtendsProperties<K extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedExtendsProperties<K, U, L, R>;
|
|
15
|
-
export type TExtendsMappedResult<T extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedExtendsProperties<T, U, L, R>> = (TMappedResult<P>);
|
|
16
|
-
export declare function ExtendsMappedResult<T extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedExtendsProperties<T, U, L, R>>(T: T, U: U, L: L, R: R): TMappedResult<P>;
|
|
17
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
-
import { Literal } from '../literal/index.mjs';
|
|
3
|
-
import { Extends } from './extends.mjs';
|
|
4
|
-
function MappedExtendsPropertyKey(K, U, L, R) {
|
|
5
|
-
return {
|
|
6
|
-
[K]: Extends(Literal(K), U, L, R)
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
function MappedExtendsPropertyKeys(K, U, L, R) {
|
|
10
|
-
const [LK, ...RK] = K;
|
|
11
|
-
return (K.length > 0
|
|
12
|
-
? { ...MappedExtendsPropertyKey(LK, U, L, R), ...MappedExtendsPropertyKeys(RK, U, L, R) }
|
|
13
|
-
: {});
|
|
14
|
-
}
|
|
15
|
-
function MappedExtendsProperties(K, U, L, R) {
|
|
16
|
-
return MappedExtendsPropertyKeys(K.keys, U, L, R);
|
|
17
|
-
}
|
|
18
|
-
export function ExtendsMappedResult(T, U, L, R) {
|
|
19
|
-
const P = MappedExtendsProperties(T, U, L, R);
|
|
20
|
-
return MappedResult(P);
|
|
21
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IndexResult } from './indexed-result.mjs';
|
|
2
|
-
import { MappedResult } from '../mapped/index.mjs';
|
|
3
|
-
function MappedIndexPropertyKey(T, K) {
|
|
4
|
-
return { [K]: IndexResult(T, [K]) };
|
|
5
|
-
}
|
|
6
|
-
function MappedIndexPropertyKeys(T, K) {
|
|
7
|
-
const [L, ...R] = K;
|
|
8
|
-
return (K.length > 0
|
|
9
|
-
? { ...MappedIndexPropertyKey(T, L), ...MappedIndexPropertyKeys(T, R) }
|
|
10
|
-
: {});
|
|
11
|
-
}
|
|
12
|
-
function MappedIndexProperties(T, K) {
|
|
13
|
-
return MappedIndexPropertyKeys(T, K.keys);
|
|
14
|
-
}
|
|
15
|
-
export function IndexMappedResult(T, K) {
|
|
16
|
-
const P = MappedIndexProperties(T, K);
|
|
17
|
-
return MappedResult(P);
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
-
import { Intrinsic } from './intrinsic.mjs';
|
|
3
|
-
import { Literal } from '../literal/index.mjs';
|
|
4
|
-
function MappedIntrinsicPropertyKey(K, M) {
|
|
5
|
-
return {
|
|
6
|
-
[K]: Intrinsic(Literal(K), M)
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
function MappedIntrinsicPropertyKeys(K, M) {
|
|
10
|
-
const [L, ...R] = K;
|
|
11
|
-
return (K.length > 0
|
|
12
|
-
? { ...MappedIntrinsicPropertyKey(L, M), ...MappedIntrinsicPropertyKeys(R, M) }
|
|
13
|
-
: {});
|
|
14
|
-
}
|
|
15
|
-
function MappedIntrinsicProperties(T, M) {
|
|
16
|
-
return MappedIntrinsicPropertyKeys(T['keys'], M);
|
|
17
|
-
}
|
|
18
|
-
export function IntrinsicMappedResult(T, M) {
|
|
19
|
-
const P = MappedIntrinsicProperties(T, M);
|
|
20
|
-
return MappedResult(P);
|
|
21
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TSchema } 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 MappedOmitPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
6
|
-
[_ in K]: TOmit<T, [K]>;
|
|
7
|
-
};
|
|
8
|
-
declare function MappedOmitPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K): MappedOmitPropertyKey<T, K>;
|
|
9
|
-
type MappedOmitPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? MappedOmitPropertyKey<T, LK> & MappedOmitPropertyKeys<T, RK> : {});
|
|
10
|
-
declare function MappedOmitPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): MappedOmitPropertyKeys<T, K>;
|
|
11
|
-
type MappedOmitProperties<T extends TSchema, K extends TMappedKey> = (MappedOmitPropertyKeys<T, K['keys']>);
|
|
12
|
-
declare function MappedOmitProperties<T extends TSchema, K extends TMappedKey>(T: T, K: K): MappedOmitProperties<T, K>;
|
|
13
|
-
export type TOmitMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedOmitProperties<T, K>> = (TMappedResult<P>);
|
|
14
|
-
export declare function OmitMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedOmitProperties<T, K>>(T: T, K: K): TMappedResult<P>;
|
|
15
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
-
import { Omit } from './omit.mjs';
|
|
3
|
-
function MappedOmitPropertyKey(T, K) {
|
|
4
|
-
return {
|
|
5
|
-
[K]: Omit(T, [K])
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
function MappedOmitPropertyKeys(T, K) {
|
|
9
|
-
const [LK, ...RK] = K;
|
|
10
|
-
return (K.length > 0
|
|
11
|
-
? { ...MappedOmitPropertyKey(T, LK), ...MappedOmitPropertyKeys(T, RK) }
|
|
12
|
-
: {});
|
|
13
|
-
}
|
|
14
|
-
function MappedOmitProperties(T, K) {
|
|
15
|
-
return MappedOmitPropertyKeys(T, K.keys);
|
|
16
|
-
}
|
|
17
|
-
export function OmitMappedResult(T, K) {
|
|
18
|
-
const P = MappedOmitProperties(T, K);
|
|
19
|
-
return MappedResult(P);
|
|
20
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TSchema } 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 MappedPickPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
6
|
-
[_ in K]: TPick<T, [K]>;
|
|
7
|
-
};
|
|
8
|
-
declare function MappedPickPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K): MappedPickPropertyKey<T, K>;
|
|
9
|
-
type MappedPickPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? MappedPickPropertyKey<T, LK> & MappedPickPropertyKeys<T, RK> : {});
|
|
10
|
-
declare function MappedPickPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): MappedPickPropertyKeys<T, K>;
|
|
11
|
-
type MappedPickProperties<T extends TSchema, K extends TMappedKey> = (MappedPickPropertyKeys<T, K['keys']>);
|
|
12
|
-
declare function MappedPickProperties<T extends TSchema, K extends TMappedKey>(T: T, K: K): MappedPickProperties<T, K>;
|
|
13
|
-
export type TPickMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedPickProperties<T, K>> = (TMappedResult<P>);
|
|
14
|
-
export declare function PickMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedPickProperties<T, K>>(T: T, K: K): TMappedResult<P>;
|
|
15
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { MappedResult } from '../mapped/index.mjs';
|
|
2
|
-
import { Pick } from './pick.mjs';
|
|
3
|
-
function MappedPickPropertyKey(T, K) {
|
|
4
|
-
return {
|
|
5
|
-
[K]: Pick(T, [K])
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
function MappedPickPropertyKeys(T, K) {
|
|
9
|
-
const [LK, ...RK] = K;
|
|
10
|
-
return (K.length > 0
|
|
11
|
-
? { ...MappedPickPropertyKey(T, LK), ...MappedPickPropertyKeys(T, RK) }
|
|
12
|
-
: {});
|
|
13
|
-
}
|
|
14
|
-
function MappedPickProperties(T, K) {
|
|
15
|
-
return MappedPickPropertyKeys(T, K.keys);
|
|
16
|
-
}
|
|
17
|
-
export function PickMappedResult(T, K) {
|
|
18
|
-
const P = MappedPickProperties(T, K);
|
|
19
|
-
return MappedResult(P);
|
|
20
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TSchema } from '../schema/index';
|
|
2
|
-
import type { TProperties } from '../object/index';
|
|
3
|
-
import { type TMappedResult } from '../mapped/index';
|
|
4
|
-
import { type TExtends } from './extends';
|
|
5
|
-
type MappedResultExtendsPropertyKeys<K extends TProperties, U extends TSchema, L extends TSchema, R extends TSchema> = ({
|
|
6
|
-
[K2 in keyof K]: TExtends<K[K2], U, L, R>;
|
|
7
|
-
});
|
|
8
|
-
declare function MappedResultExtendsPropertyKeys<K extends TProperties, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedResultExtendsPropertyKeys<K, U, L, R>;
|
|
9
|
-
type MappedResultExtendsProperties<K extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema> = (MappedResultExtendsPropertyKeys<K['properties'], U, L, R>);
|
|
10
|
-
declare function MappedResultExtendsProperties<K extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedResultExtendsProperties<K, U, L, R>;
|
|
11
|
-
export type TExtendsMappedResultFromResult<T extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedResultExtendsProperties<T, U, L, R>> = (TMappedResult<P>);
|
|
12
|
-
export declare function ExtendsMappedResultFromResult<T extends TMappedResult, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedResultExtendsProperties<T, U, L, R>>(T: T, U: U, L: L, R: R): TMappedResult<P>;
|
|
13
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExtendsMappedResultFromResult = void 0;
|
|
4
|
-
const index_1 = require("../mapped/index");
|
|
5
|
-
const extends_1 = require("./extends");
|
|
6
|
-
function MappedResultExtendsPropertyKeys(K, U, L, R) {
|
|
7
|
-
return globalThis.Object.getOwnPropertyNames(K).reduce((Acc, K2) => {
|
|
8
|
-
return { ...Acc, [K2]: (0, extends_1.Extends)(K[K2], U, L, R) };
|
|
9
|
-
}, {});
|
|
10
|
-
}
|
|
11
|
-
function MappedResultExtendsProperties(K, U, L, R) {
|
|
12
|
-
return MappedResultExtendsPropertyKeys(K.properties, U, L, R);
|
|
13
|
-
}
|
|
14
|
-
function ExtendsMappedResultFromResult(T, U, L, R) {
|
|
15
|
-
const P = MappedResultExtendsProperties(T, U, L, R);
|
|
16
|
-
return (0, index_1.MappedResult)(P);
|
|
17
|
-
}
|
|
18
|
-
exports.ExtendsMappedResultFromResult = ExtendsMappedResultFromResult;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { TSchema } from '../schema/index';
|
|
2
|
-
import type { TProperties } from '../object/index';
|
|
3
|
-
import type { Assert } from '../helpers/index';
|
|
4
|
-
import { type TMappedResult, type TMappedKey } from '../mapped/index';
|
|
5
|
-
import { TLiteral, TLiteralValue } from '../literal/index';
|
|
6
|
-
import { type TExtends } from './extends';
|
|
7
|
-
type MappedExtendsPropertyKey<K extends PropertyKey, U extends TSchema, L extends TSchema, R extends TSchema> = {
|
|
8
|
-
[_ in K]: TExtends<TLiteral<Assert<K, TLiteralValue>>, U, L, R>;
|
|
9
|
-
};
|
|
10
|
-
declare function MappedExtendsPropertyKey<K extends PropertyKey, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedExtendsPropertyKey<K, U, L, R>;
|
|
11
|
-
type MappedExtendsPropertyKeys<K extends PropertyKey[], U extends TSchema, L extends TSchema, R extends TSchema> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? MappedExtendsPropertyKey<LK, U, L, R> & MappedExtendsPropertyKeys<RK, U, L, R> : {});
|
|
12
|
-
declare function MappedExtendsPropertyKeys<K extends PropertyKey[], U extends TSchema, L extends TSchema, R extends TSchema>(K: [...K], U: U, L: L, R: R): MappedExtendsPropertyKeys<K, U, L, R>;
|
|
13
|
-
type MappedExtendsProperties<K extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema> = (MappedExtendsPropertyKeys<K['keys'], U, L, R>);
|
|
14
|
-
declare function MappedExtendsProperties<K extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema>(K: K, U: U, L: L, R: R): MappedExtendsProperties<K, U, L, R>;
|
|
15
|
-
export type TExtendsMappedResult<T extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedExtendsProperties<T, U, L, R>> = (TMappedResult<P>);
|
|
16
|
-
export declare function ExtendsMappedResult<T extends TMappedKey, U extends TSchema, L extends TSchema, R extends TSchema, P extends TProperties = MappedExtendsProperties<T, U, L, R>>(T: T, U: U, L: L, R: R): TMappedResult<P>;
|
|
17
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExtendsMappedResult = void 0;
|
|
4
|
-
const index_1 = require("../mapped/index");
|
|
5
|
-
const index_2 = require("../literal/index");
|
|
6
|
-
const extends_1 = require("./extends");
|
|
7
|
-
function MappedExtendsPropertyKey(K, U, L, R) {
|
|
8
|
-
return {
|
|
9
|
-
[K]: (0, extends_1.Extends)((0, index_2.Literal)(K), U, L, R)
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function MappedExtendsPropertyKeys(K, U, L, R) {
|
|
13
|
-
const [LK, ...RK] = K;
|
|
14
|
-
return (K.length > 0
|
|
15
|
-
? { ...MappedExtendsPropertyKey(LK, U, L, R), ...MappedExtendsPropertyKeys(RK, U, L, R) }
|
|
16
|
-
: {});
|
|
17
|
-
}
|
|
18
|
-
function MappedExtendsProperties(K, U, L, R) {
|
|
19
|
-
return MappedExtendsPropertyKeys(K.keys, U, L, R);
|
|
20
|
-
}
|
|
21
|
-
function ExtendsMappedResult(T, U, L, R) {
|
|
22
|
-
const P = MappedExtendsProperties(T, U, L, R);
|
|
23
|
-
return (0, index_1.MappedResult)(P);
|
|
24
|
-
}
|
|
25
|
-
exports.ExtendsMappedResult = ExtendsMappedResult;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IndexMappedResult = void 0;
|
|
4
|
-
const indexed_result_1 = require("./indexed-result");
|
|
5
|
-
const index_1 = require("../mapped/index");
|
|
6
|
-
function MappedIndexPropertyKey(T, K) {
|
|
7
|
-
return { [K]: (0, indexed_result_1.IndexResult)(T, [K]) };
|
|
8
|
-
}
|
|
9
|
-
function MappedIndexPropertyKeys(T, K) {
|
|
10
|
-
const [L, ...R] = K;
|
|
11
|
-
return (K.length > 0
|
|
12
|
-
? { ...MappedIndexPropertyKey(T, L), ...MappedIndexPropertyKeys(T, R) }
|
|
13
|
-
: {});
|
|
14
|
-
}
|
|
15
|
-
function MappedIndexProperties(T, K) {
|
|
16
|
-
return MappedIndexPropertyKeys(T, K.keys);
|
|
17
|
-
}
|
|
18
|
-
function IndexMappedResult(T, K) {
|
|
19
|
-
const P = MappedIndexProperties(T, K);
|
|
20
|
-
return (0, index_1.MappedResult)(P);
|
|
21
|
-
}
|
|
22
|
-
exports.IndexMappedResult = IndexMappedResult;
|
|
@@ -1,25 +0,0 @@
|
|
|
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,15 +0,0 @@
|
|
|
1
|
-
import type { TSchema } from '../schema/index';
|
|
2
|
-
import type { TProperties } from '../object/index';
|
|
3
|
-
import { type TMappedResult, type TMappedKey } from '../mapped/index';
|
|
4
|
-
import { type TOmit } from './omit';
|
|
5
|
-
type MappedOmitPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
6
|
-
[_ in K]: TOmit<T, [K]>;
|
|
7
|
-
};
|
|
8
|
-
declare function MappedOmitPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K): MappedOmitPropertyKey<T, K>;
|
|
9
|
-
type MappedOmitPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? MappedOmitPropertyKey<T, LK> & MappedOmitPropertyKeys<T, RK> : {});
|
|
10
|
-
declare function MappedOmitPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): MappedOmitPropertyKeys<T, K>;
|
|
11
|
-
type MappedOmitProperties<T extends TSchema, K extends TMappedKey> = (MappedOmitPropertyKeys<T, K['keys']>);
|
|
12
|
-
declare function MappedOmitProperties<T extends TSchema, K extends TMappedKey>(T: T, K: K): MappedOmitProperties<T, K>;
|
|
13
|
-
export type TOmitMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedOmitProperties<T, K>> = (TMappedResult<P>);
|
|
14
|
-
export declare function OmitMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedOmitProperties<T, K>>(T: T, K: K): TMappedResult<P>;
|
|
15
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OmitMappedResult = void 0;
|
|
4
|
-
const index_1 = require("../mapped/index");
|
|
5
|
-
const omit_1 = require("./omit");
|
|
6
|
-
function MappedOmitPropertyKey(T, K) {
|
|
7
|
-
return {
|
|
8
|
-
[K]: (0, omit_1.Omit)(T, [K])
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function MappedOmitPropertyKeys(T, K) {
|
|
12
|
-
const [LK, ...RK] = K;
|
|
13
|
-
return (K.length > 0
|
|
14
|
-
? { ...MappedOmitPropertyKey(T, LK), ...MappedOmitPropertyKeys(T, RK) }
|
|
15
|
-
: {});
|
|
16
|
-
}
|
|
17
|
-
function MappedOmitProperties(T, K) {
|
|
18
|
-
return MappedOmitPropertyKeys(T, K.keys);
|
|
19
|
-
}
|
|
20
|
-
function OmitMappedResult(T, K) {
|
|
21
|
-
const P = MappedOmitProperties(T, K);
|
|
22
|
-
return (0, index_1.MappedResult)(P);
|
|
23
|
-
}
|
|
24
|
-
exports.OmitMappedResult = OmitMappedResult;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TSchema } from '../schema/index';
|
|
2
|
-
import type { TProperties } from '../object/index';
|
|
3
|
-
import { type TMappedResult, type TMappedKey } from '../mapped/index';
|
|
4
|
-
import { type TPick } from './pick';
|
|
5
|
-
type MappedPickPropertyKey<T extends TSchema, K extends PropertyKey> = {
|
|
6
|
-
[_ in K]: TPick<T, [K]>;
|
|
7
|
-
};
|
|
8
|
-
declare function MappedPickPropertyKey<T extends TSchema, K extends PropertyKey>(T: T, K: K): MappedPickPropertyKey<T, K>;
|
|
9
|
-
type MappedPickPropertyKeys<T extends TSchema, K extends PropertyKey[]> = (K extends [infer LK extends PropertyKey, ...infer RK extends PropertyKey[]] ? MappedPickPropertyKey<T, LK> & MappedPickPropertyKeys<T, RK> : {});
|
|
10
|
-
declare function MappedPickPropertyKeys<T extends TSchema, K extends PropertyKey[]>(T: T, K: [...K]): MappedPickPropertyKeys<T, K>;
|
|
11
|
-
type MappedPickProperties<T extends TSchema, K extends TMappedKey> = (MappedPickPropertyKeys<T, K['keys']>);
|
|
12
|
-
declare function MappedPickProperties<T extends TSchema, K extends TMappedKey>(T: T, K: K): MappedPickProperties<T, K>;
|
|
13
|
-
export type TPickMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedPickProperties<T, K>> = (TMappedResult<P>);
|
|
14
|
-
export declare function PickMappedResult<T extends TSchema, K extends TMappedKey, P extends TProperties = MappedPickProperties<T, K>>(T: T, K: K): TMappedResult<P>;
|
|
15
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PickMappedResult = void 0;
|
|
4
|
-
const index_1 = require("../mapped/index");
|
|
5
|
-
const pick_1 = require("./pick");
|
|
6
|
-
function MappedPickPropertyKey(T, K) {
|
|
7
|
-
return {
|
|
8
|
-
[K]: (0, pick_1.Pick)(T, [K])
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function MappedPickPropertyKeys(T, K) {
|
|
12
|
-
const [LK, ...RK] = K;
|
|
13
|
-
return (K.length > 0
|
|
14
|
-
? { ...MappedPickPropertyKey(T, LK), ...MappedPickPropertyKeys(T, RK) }
|
|
15
|
-
: {});
|
|
16
|
-
}
|
|
17
|
-
function MappedPickProperties(T, K) {
|
|
18
|
-
return MappedPickPropertyKeys(T, K.keys);
|
|
19
|
-
}
|
|
20
|
-
function PickMappedResult(T, K) {
|
|
21
|
-
const P = MappedPickProperties(T, K);
|
|
22
|
-
return (0, index_1.MappedResult)(P);
|
|
23
|
-
}
|
|
24
|
-
exports.PickMappedResult = PickMappedResult;
|