@routier/core 0.1.0-rc.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assertions/index.d.ts +30 -0
- package/dist/assertions/index.js +92 -19
- package/dist/assertions/index.js.map +1 -1
- package/dist/capabilities/index.js +75 -105
- package/dist/capabilities/index.js.map +1 -1
- package/dist/codegen/blocks.test.d.ts +1 -0
- package/dist/codegen/handlers/SetHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/index.d.ts +1 -0
- package/dist/codegen/handlers/serialize/SerializeComputedHandler.d.ts +6 -0
- package/dist/codegen/handlers/set/SetComplexHandler.d.ts +6 -0
- package/dist/codegen/index.js +22 -36
- package/dist/codegen/index.js.map +1 -1
- package/dist/codegen/utils.test.d.ts +1 -0
- package/dist/collections/Changes.d.ts +2 -2
- package/dist/collections/IdSet.test.d.ts +1 -0
- package/dist/collections/TagCollection.contract.test.d.ts +1 -0
- package/dist/collections/TagCollection.d.ts +7 -7
- package/dist/collections/index.js +50 -93
- package/dist/collections/index.js.map +1 -1
- package/dist/errors/index.js +4 -15
- package/dist/errors/index.js.map +1 -1
- package/dist/expressions/constants.d.ts +2 -0
- package/dist/expressions/index.d.ts +2 -0
- package/dist/expressions/index.js +450 -114
- package/dist/expressions/index.js.map +1 -1
- package/dist/expressions/sql.d.ts +28 -0
- package/dist/expressions/sql.test.d.ts +1 -0
- package/dist/expressions/utils.d.ts +1 -2
- package/dist/index.js +3058 -2618
- package/dist/index.js.map +1 -1
- package/dist/performance/index.js +22 -22
- package/dist/performance/index.js.map +1 -1
- package/dist/pipeline/index.js +48 -60
- package/dist/pipeline/index.js.map +1 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.js +268 -937
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/query/Query.test.d.ts +1 -0
- package/dist/plugins/query/QueryOptionsCollection.d.ts +1 -0
- package/dist/plugins/translators/SqlTranslator.test.d.ts +1 -0
- package/dist/plugins/translators/TranslatedArrayValue.d.ts +3 -1
- package/dist/plugins/translators/TranslatedGroupValue.d.ts +3 -1
- package/dist/plugins/translators/TranslatedSingleValue.d.ts +3 -1
- package/dist/plugins/translators/TranslatedValues.test.d.ts +1 -0
- package/dist/plugins/translators/types.d.ts +8 -1
- package/dist/plugins/types.d.ts +6 -10
- package/dist/results/Result.d.ts +2 -2
- package/dist/results/Result.test.d.ts +1 -0
- package/dist/results/index.js +11 -26
- package/dist/results/index.js.map +1 -1
- package/dist/results/utils.test.d.ts +1 -0
- package/dist/schema/PropertyInfo.d.ts +5 -1
- package/dist/schema/SchemaDefinition.d.ts +35 -6
- package/dist/schema/communication/broadcast.test.d.ts +1 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +2115 -1513
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/property/base/SchemaBase.d.ts +3 -1
- package/dist/schema/property/modifiers/SchemaDeserialize.d.ts +5 -1
- package/dist/schema/property/modifiers/SchemaForeignKey.d.ts +15 -0
- package/dist/schema/property/modifiers/SchemaKey.d.ts +2 -0
- package/dist/schema/property/modifiers/SchemaNullable.d.ts +5 -1
- package/dist/schema/property/modifiers/SchemaOptional.d.ts +3 -1
- package/dist/schema/property/modifiers/SchemaTag.d.ts +27 -0
- package/dist/schema/property/modifiers/SchemaTracked.d.ts +5 -1
- package/dist/schema/property/modifiers/index.d.ts +2 -0
- package/dist/schema/property/types/SchemaArray.d.ts +2 -0
- package/dist/schema/property/types/SchemaBoolean.d.ts +2 -0
- package/dist/schema/property/types/SchemaDate.d.ts +2 -0
- package/dist/schema/property/types/SchemaNumber.d.ts +5 -1
- package/dist/schema/property/types/SchemaObject.d.ts +2 -0
- package/dist/schema/property/types/SchemaString.d.ts +5 -1
- package/dist/schema/types.d.ts +41 -29
- package/dist/schema/utils/standardJsonSchema.d.ts +90 -0
- package/dist/schema/utils/standardJsonSchema.test.d.ts +1 -0
- package/dist/types/index.js +0 -6
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/functions.d.ts +1 -1
- package/dist/utilities/index.js +213 -138
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/runtime.test.d.ts +1 -0
- package/dist/utilities/types.d.ts +17 -2
- package/dist/utilities/uuid.test.d.ts +1 -0
- package/package.json +2 -2
- package/readme.md +1 -1
- package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +0 -22
- package/dist/plugins/replication/ReplicationDbPlugin.d.ts +0 -22
- package/dist/plugins/replication/index.d.ts +0 -3
- package/dist/plugins/replication/types.d.ts +0 -4
- package/dist/schema/testSchemas.test.d.ts +0 -314
- /package/dist/{pipeline/WorkPipeline.test.d.ts → codegen/SlotPath.test.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultValue, FunctionBody, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
1
|
+
import { DefaultValue, ForeignKey, FunctionBody, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
2
2
|
export declare abstract class SchemaBase<T extends any, TModifiers extends SchemaModifiers> {
|
|
3
3
|
abstract instance: T;
|
|
4
4
|
modifiers: TModifiers;
|
|
@@ -11,6 +11,8 @@ export declare abstract class SchemaBase<T extends any, TModifiers extends Schem
|
|
|
11
11
|
isDistict: boolean;
|
|
12
12
|
indexes: string[];
|
|
13
13
|
fromPropertyName: string | null;
|
|
14
|
+
foreignKeyDefinition: ForeignKey<unknown> | null;
|
|
15
|
+
tags: string[];
|
|
14
16
|
injected: any;
|
|
15
17
|
defaultValue: DefaultValue<T> | null;
|
|
16
18
|
valueSerializer: PropertySerializer<T> | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { PropertyDeserializer, PropertySerializer, SchemaModifiers } from "../../types";
|
|
1
|
+
import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from "../../types";
|
|
2
2
|
import { SchemaBase } from "../base/SchemaBase";
|
|
3
|
+
import { SchemaDefault } from "./SchemaDefault";
|
|
3
4
|
import { SchemaFrom } from "./SchemaFrom";
|
|
5
|
+
import { SchemaOptional } from "./SchemaOptional";
|
|
4
6
|
import { SchemaSerialize } from "./SchemaSerialize";
|
|
5
7
|
export declare class SchemaDeserialize<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
6
8
|
instance: T;
|
|
@@ -8,4 +10,6 @@ export declare class SchemaDeserialize<T extends any, TModifiers extends SchemaM
|
|
|
8
10
|
constructor(deserializer: PropertyDeserializer<T>, current: SchemaBase<T, TModifiers>);
|
|
9
11
|
serialize(serializer: PropertySerializer<T>): SchemaSerialize<T, "serialize" | TModifiers>;
|
|
10
12
|
from(propertyName: string): SchemaFrom<T, TModifiers>;
|
|
13
|
+
optional(): SchemaOptional<T, "optional" | TModifiers>;
|
|
14
|
+
default<I = never>(value: DefaultValue<T | null, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
11
15
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SchemaBase } from "../base/SchemaBase";
|
|
2
|
+
import { SchemaIdentity } from "./SchemaIdentity";
|
|
3
|
+
import { SchemaDefault } from "./SchemaDefault";
|
|
4
|
+
import { CompiledSchema, DefaultValue, InferType, SchemaModifiers } from "../../types";
|
|
5
|
+
import { SchemaFrom } from "./SchemaFrom";
|
|
6
|
+
import { SchemaTag } from "./SchemaTag";
|
|
7
|
+
export declare class SchemaForeignKey<T extends any, TModifiers extends SchemaModifiers, K extends {}> extends SchemaBase<T, TModifiers> {
|
|
8
|
+
instance: T;
|
|
9
|
+
private _schemaForeignKey;
|
|
10
|
+
constructor(current: SchemaBase<T, TModifiers>, relatingSchema: CompiledSchema<K>, property: keyof InferType<CompiledSchema<K>>);
|
|
11
|
+
identity(): SchemaIdentity<T, "identity" | TModifiers>;
|
|
12
|
+
default<I = never>(value: DefaultValue<T, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
13
|
+
from(propertyName: string): SchemaFrom<T, TModifiers>;
|
|
14
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
15
|
+
}
|
|
@@ -3,6 +3,7 @@ import { SchemaIdentity } from "./SchemaIdentity";
|
|
|
3
3
|
import { SchemaDefault } from "./SchemaDefault";
|
|
4
4
|
import { DefaultValue, IdType, SchemaModifiers } from "../../types";
|
|
5
5
|
import { SchemaFrom } from "./SchemaFrom";
|
|
6
|
+
import { SchemaTag } from "./SchemaTag";
|
|
6
7
|
export declare class SchemaKey<T extends IdType, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
7
8
|
instance: T;
|
|
8
9
|
private _schemaKey;
|
|
@@ -10,4 +11,5 @@ export declare class SchemaKey<T extends IdType, TModifiers extends SchemaModifi
|
|
|
10
11
|
identity(): SchemaIdentity<T, "identity" | TModifiers>;
|
|
11
12
|
default<I = never>(value: DefaultValue<T, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
12
13
|
from(propertyName: string): SchemaFrom<T, TModifiers>;
|
|
14
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
13
15
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { SchemaModifiers } from "../../types";
|
|
1
|
+
import { DefaultValue, PropertyDeserializer, SchemaModifiers } from "../../types";
|
|
2
2
|
import { SchemaBase } from "../base/SchemaBase";
|
|
3
|
+
import { SchemaDefault } from "./SchemaDefault";
|
|
4
|
+
import { SchemaDeserialize } from "./SchemaDeserialize";
|
|
3
5
|
import { SchemaOptional } from "./SchemaOptional";
|
|
4
6
|
export declare class SchemaNullable<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
5
7
|
instance: T;
|
|
6
8
|
private _schemaNullable;
|
|
7
9
|
constructor(current: SchemaBase<T, TModifiers>);
|
|
8
10
|
optional(): SchemaOptional<T, "optional" | TModifiers>;
|
|
11
|
+
default<I = never>(value: DefaultValue<T | null, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
12
|
+
deserialize(deserializer: PropertyDeserializer<T | null>): SchemaDeserialize<T, "deserialize" | TModifiers>;
|
|
9
13
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { SchemaModifiers } from "../../types";
|
|
1
|
+
import { PropertyDeserializer, SchemaModifiers } from "../../types";
|
|
2
2
|
import { SchemaBase } from "../base/SchemaBase";
|
|
3
|
+
import { SchemaDeserialize } from "./SchemaDeserialize";
|
|
3
4
|
import { SchemaNullable } from "./SchemaNullable";
|
|
4
5
|
export declare class SchemaOptional<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
5
6
|
instance: T;
|
|
6
7
|
private _schemaOptional;
|
|
7
8
|
constructor(current: SchemaBase<T, TModifiers>);
|
|
8
9
|
nullable(): SchemaNullable<T, "nullable" | TModifiers>;
|
|
10
|
+
deserialize(deserializer: PropertyDeserializer<T | undefined>): SchemaDeserialize<T, "deserialize" | TModifiers>;
|
|
9
11
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from "../../types";
|
|
2
|
+
import { SchemaBase } from "../base/SchemaBase";
|
|
3
|
+
import { SchemaArray } from "../types";
|
|
4
|
+
import { SchemaDefault } from "./SchemaDefault";
|
|
5
|
+
import { SchemaDeserialize } from "./SchemaDeserialize";
|
|
6
|
+
import { SchemaDistinct } from "./SchemaDistinct";
|
|
7
|
+
import { SchemaFrom } from "./SchemaFrom";
|
|
8
|
+
import { SchemaIndex } from "./SchemaIndex";
|
|
9
|
+
import { SchemaNullable } from "./SchemaNullable";
|
|
10
|
+
import { SchemaOptional } from "./SchemaOptional";
|
|
11
|
+
import { SchemaReadonly } from "./SchemaReadonly";
|
|
12
|
+
import { SchemaSerialize } from "./SchemaSerialize";
|
|
13
|
+
export declare class SchemaTag<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
14
|
+
instance: T;
|
|
15
|
+
private _schemaTag;
|
|
16
|
+
constructor(tags: string[], current: SchemaBase<T, TModifiers>);
|
|
17
|
+
from(propertyName: string): SchemaFrom<T, TModifiers>;
|
|
18
|
+
optional(): SchemaOptional<T, "optional" | TModifiers>;
|
|
19
|
+
nullable(): SchemaNullable<T, "nullable" | TModifiers>;
|
|
20
|
+
default<I = never>(value: DefaultValue<T, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
21
|
+
readonly(): SchemaReadonly<T, "readonly" | TModifiers>;
|
|
22
|
+
deserialize(deserializer: PropertyDeserializer<T>): SchemaDeserialize<T, "deserialize" | TModifiers>;
|
|
23
|
+
serialize(serializer: PropertySerializer<T>): SchemaSerialize<T, "serialize" | TModifiers>;
|
|
24
|
+
array(): SchemaArray<this, TModifiers>;
|
|
25
|
+
index(...indexes: string[]): SchemaIndex<T, TModifiers>;
|
|
26
|
+
distinct(): SchemaDistinct<T, "distinct" | TModifiers>;
|
|
27
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { IdType, SchemaModifiers } from "../../types";
|
|
1
|
+
import { CompiledSchema, IdType, InferType, SchemaModifiers } from "../../types";
|
|
2
2
|
import { SchemaBase } from "../base/SchemaBase";
|
|
3
|
+
import { SchemaForeignKey } from "./SchemaForeignKey";
|
|
3
4
|
import { SchemaKey } from "./SchemaKey";
|
|
5
|
+
import { SchemaTag } from "./SchemaTag";
|
|
4
6
|
export declare class SchemaTracked<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
5
7
|
instance: T;
|
|
6
8
|
private _schemaTracked;
|
|
7
9
|
constructor(current: SchemaBase<T, TModifiers>);
|
|
8
10
|
key(): T extends IdType ? SchemaKey<T, TModifiers | "key"> : never;
|
|
11
|
+
foreignKey<K extends {}>(relatingSchema: CompiledSchema<K>, property: keyof InferType<CompiledSchema<K>>): SchemaForeignKey<T, TModifiers, K>;
|
|
12
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
9
13
|
}
|
|
@@ -7,6 +7,7 @@ import { SchemaSerialize } from '../modifiers/SchemaSerialize';
|
|
|
7
7
|
import { SchemaIndex } from "../modifiers/SchemaIndex";
|
|
8
8
|
import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
9
9
|
import { SchemaFrom } from "../modifiers/SchemaFrom";
|
|
10
|
+
import { SchemaTag } from "../modifiers/SchemaTag";
|
|
10
11
|
export declare class SchemaArray<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T[], TModifiers> {
|
|
11
12
|
instance: T[];
|
|
12
13
|
type: SchemaTypes;
|
|
@@ -20,4 +21,5 @@ export declare class SchemaArray<T extends any, TModifiers extends SchemaModifie
|
|
|
20
21
|
deserialize(deserializer: PropertyDeserializer<T[]>): SchemaDeserialize<T[], "deserialize" | TModifiers>;
|
|
21
22
|
serialize(serializer: PropertySerializer<T[]>): SchemaSerialize<T[], "serialize" | TModifiers>;
|
|
22
23
|
index(...indexes: string[]): SchemaIndex<T[], TModifiers>;
|
|
24
|
+
tag(...tags: string[]): SchemaTag<T[], TModifiers>;
|
|
23
25
|
}
|
|
@@ -9,6 +9,7 @@ import { SchemaNullable } from "../modifiers/SchemaNullable";
|
|
|
9
9
|
import { SchemaOptional } from "../modifiers/SchemaOptional";
|
|
10
10
|
import { SchemaReadonly } from "../modifiers/SchemaReadonly";
|
|
11
11
|
import { SchemaSerialize } from "../modifiers/SchemaSerialize";
|
|
12
|
+
import { SchemaTag } from "../modifiers/SchemaTag";
|
|
12
13
|
import { SchemaArray } from "./SchemaArray";
|
|
13
14
|
export declare class SchemaBoolean<T extends boolean, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
14
15
|
instance: T;
|
|
@@ -24,4 +25,5 @@ export declare class SchemaBoolean<T extends boolean, TModifiers extends SchemaM
|
|
|
24
25
|
array(): SchemaArray<this, TModifiers>;
|
|
25
26
|
index(...indexes: string[]): SchemaIndex<T, TModifiers>;
|
|
26
27
|
distinct(): SchemaDistinct<T, "distinct" | TModifiers>;
|
|
28
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
27
29
|
}
|
|
@@ -9,6 +9,7 @@ import { SchemaNullable } from "../modifiers/SchemaNullable";
|
|
|
9
9
|
import { SchemaOptional } from "../modifiers/SchemaOptional";
|
|
10
10
|
import { SchemaReadonly } from "../modifiers/SchemaReadonly";
|
|
11
11
|
import { SchemaSerialize } from "../modifiers/SchemaSerialize";
|
|
12
|
+
import { SchemaTag } from "../modifiers/SchemaTag";
|
|
12
13
|
import { SchemaArray } from "./SchemaArray";
|
|
13
14
|
export declare class SchemaDate<T extends Date, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
14
15
|
instance: T;
|
|
@@ -24,4 +25,5 @@ export declare class SchemaDate<T extends Date, TModifiers extends SchemaModifie
|
|
|
24
25
|
array(): SchemaArray<this, TModifiers>;
|
|
25
26
|
index(...indexes: string[]): SchemaIndex<T, TModifiers>;
|
|
26
27
|
distinct(): SchemaDistinct<T, "distinct" | TModifiers>;
|
|
28
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
27
29
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
1
|
+
import { CompiledSchema, DefaultValue, InferType, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
2
2
|
import { SchemaBase } from "../base/SchemaBase";
|
|
3
3
|
import { SchemaDefault } from "../modifiers/SchemaDefault";
|
|
4
4
|
import { SchemaDeserialize } from "../modifiers/SchemaDeserialize";
|
|
5
5
|
import { SchemaDistinct } from "../modifiers/SchemaDistinct";
|
|
6
|
+
import { SchemaForeignKey } from "../modifiers/SchemaForeignKey";
|
|
6
7
|
import { SchemaFrom } from "../modifiers/SchemaFrom";
|
|
7
8
|
import { SchemaIdentity } from "../modifiers/SchemaIdentity";
|
|
8
9
|
import { SchemaIndex } from "../modifiers/SchemaIndex";
|
|
@@ -11,6 +12,7 @@ import { SchemaNullable } from "../modifiers/SchemaNullable";
|
|
|
11
12
|
import { SchemaOptional } from "../modifiers/SchemaOptional";
|
|
12
13
|
import { SchemaReadonly } from "../modifiers/SchemaReadonly";
|
|
13
14
|
import { SchemaSerialize } from "../modifiers/SchemaSerialize";
|
|
15
|
+
import { SchemaTag } from "../modifiers/SchemaTag";
|
|
14
16
|
import { SchemaArray } from "./SchemaArray";
|
|
15
17
|
export declare class SchemaNumber<T extends number, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
16
18
|
instance: T;
|
|
@@ -21,6 +23,7 @@ export declare class SchemaNumber<T extends number, TModifiers extends SchemaMod
|
|
|
21
23
|
optional(): SchemaOptional<T, "optional" | TModifiers>;
|
|
22
24
|
nullable(): SchemaNullable<T, "nullable" | TModifiers>;
|
|
23
25
|
key(): SchemaKey<T, "key" | TModifiers>;
|
|
26
|
+
foreignKey<K extends {}>(relatingSchema: CompiledSchema<K>, property: keyof InferType<CompiledSchema<K>>): SchemaForeignKey<T, TModifiers, K>;
|
|
24
27
|
default<I = never>(value: DefaultValue<T, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
25
28
|
readonly(): SchemaReadonly<T, "readonly" | TModifiers>;
|
|
26
29
|
deserialize(deserializer: PropertyDeserializer<T>): SchemaDeserialize<T, "deserialize" | TModifiers>;
|
|
@@ -29,4 +32,5 @@ export declare class SchemaNumber<T extends number, TModifiers extends SchemaMod
|
|
|
29
32
|
array(): SchemaArray<this, TModifiers>;
|
|
30
33
|
index(...indexes: string[]): SchemaIndex<T, TModifiers>;
|
|
31
34
|
distinct(): SchemaDistinct<T, "distinct" | TModifiers>;
|
|
35
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
32
36
|
}
|
|
@@ -5,6 +5,7 @@ import { SchemaFrom } from "../modifiers/SchemaFrom";
|
|
|
5
5
|
import { SchemaIdentity } from "../modifiers/SchemaIdentity";
|
|
6
6
|
import { SchemaNullable } from "../modifiers/SchemaNullable";
|
|
7
7
|
import { SchemaOptional } from "../modifiers/SchemaOptional";
|
|
8
|
+
import { SchemaTag } from "../modifiers/SchemaTag";
|
|
8
9
|
import { SchemaArray } from "./SchemaArray";
|
|
9
10
|
export declare class SchemaObject<T extends {}, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
10
11
|
instance: T;
|
|
@@ -17,4 +18,5 @@ export declare class SchemaObject<T extends {}, TModifiers extends SchemaModifie
|
|
|
17
18
|
default<I = never>(value: DefaultValue<T, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
18
19
|
identity(): SchemaIdentity<T, "identity" | "readonly" | TModifiers>;
|
|
19
20
|
array(): SchemaArray<this, TModifiers>;
|
|
21
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
20
22
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
1
|
+
import { CompiledSchema, DefaultValue, InferType, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from "../../types";
|
|
2
2
|
import { SchemaBase } from "../base/SchemaBase";
|
|
3
3
|
import { SchemaDefault } from "../modifiers/SchemaDefault";
|
|
4
4
|
import { SchemaDeserialize } from "../modifiers/SchemaDeserialize";
|
|
5
5
|
import { SchemaDistinct } from "../modifiers/SchemaDistinct";
|
|
6
|
+
import { SchemaForeignKey } from "../modifiers/SchemaForeignKey";
|
|
6
7
|
import { SchemaFrom } from "../modifiers/SchemaFrom";
|
|
7
8
|
import { SchemaIdentity } from "../modifiers/SchemaIdentity";
|
|
8
9
|
import { SchemaIndex } from "../modifiers/SchemaIndex";
|
|
@@ -11,6 +12,7 @@ import { SchemaNullable } from "../modifiers/SchemaNullable";
|
|
|
11
12
|
import { SchemaOptional } from "../modifiers/SchemaOptional";
|
|
12
13
|
import { SchemaReadonly } from "../modifiers/SchemaReadonly";
|
|
13
14
|
import { SchemaSerialize } from "../modifiers/SchemaSerialize";
|
|
15
|
+
import { SchemaTag } from "../modifiers/SchemaTag";
|
|
14
16
|
import { SchemaArray } from "./SchemaArray";
|
|
15
17
|
export declare class SchemaString<T extends string, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {
|
|
16
18
|
instance: T;
|
|
@@ -21,6 +23,7 @@ export declare class SchemaString<T extends string, TModifiers extends SchemaMod
|
|
|
21
23
|
optional(): SchemaOptional<T, "optional" | TModifiers>;
|
|
22
24
|
nullable(): SchemaNullable<T, "nullable" | TModifiers>;
|
|
23
25
|
key(): SchemaKey<T, "key" | TModifiers>;
|
|
26
|
+
foreignKey<K extends {}>(relatingSchema: CompiledSchema<K>, property: keyof InferType<CompiledSchema<K>>): SchemaForeignKey<T, TModifiers, K>;
|
|
24
27
|
default<I = never>(value: DefaultValue<T, I>, injected?: I): SchemaDefault<T, I, "default" | TModifiers>;
|
|
25
28
|
readonly(): SchemaReadonly<T, "readonly" | TModifiers>;
|
|
26
29
|
deserialize(deserializer: PropertyDeserializer<T>): SchemaDeserialize<T, "deserialize" | TModifiers>;
|
|
@@ -29,4 +32,5 @@ export declare class SchemaString<T extends string, TModifiers extends SchemaMod
|
|
|
29
32
|
array(): SchemaArray<this, TModifiers>;
|
|
30
33
|
index(...indexes: string[]): SchemaIndex<T, TModifiers>;
|
|
31
34
|
distinct(): SchemaDistinct<T, "distinct" | TModifiers>;
|
|
35
|
+
tag(...tags: string[]): SchemaTag<T, TModifiers>;
|
|
32
36
|
}
|
package/dist/schema/types.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { SchemaDefinition } from "./SchemaDefinition";
|
|
2
|
-
import { SchemaBase } from "./property/base/SchemaBase";
|
|
3
|
-
import { SchemaArray } from "./property/types/SchemaArray";
|
|
4
|
-
import { SchemaObject } from "./property/types/SchemaObject";
|
|
5
|
-
import { PropertyInfo } from "./PropertyInfo";
|
|
6
|
-
import { DeepPartial } from "../types";
|
|
7
|
-
import { SchemaFunction } from "./table";
|
|
8
|
-
import { SchemaOptional } from "./property/modifiers";
|
|
1
|
+
import type { SchemaDefinition } from "./SchemaDefinition";
|
|
2
|
+
import type { SchemaBase } from "./property/base/SchemaBase";
|
|
3
|
+
import type { SchemaArray } from "./property/types/SchemaArray";
|
|
4
|
+
import type { SchemaObject } from "./property/types/SchemaObject";
|
|
5
|
+
import type { PropertyInfo } from "./PropertyInfo";
|
|
6
|
+
import type { DeepPartial } from "../types";
|
|
7
|
+
import type { SchemaFunction } from "./table";
|
|
8
|
+
import type { SchemaOptional } from "./property/modifiers";
|
|
9
|
+
import type { Branded } from "../utilities/types";
|
|
9
10
|
export type DefaultValue<T, I = never> = T | ((injected: I) => T);
|
|
10
|
-
export type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName:
|
|
11
|
+
export type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName: CollectionName) => TResult;
|
|
11
12
|
export type IdType = string | number;
|
|
13
|
+
export type ForeignKey<T extends {}> = {
|
|
14
|
+
schema: CompiledSchema<T>;
|
|
15
|
+
property: PropertyInfo<T>;
|
|
16
|
+
};
|
|
12
17
|
export declare enum SchemaTypes {
|
|
13
18
|
Array = "Array",
|
|
14
19
|
Boolean = "Boolean",
|
|
@@ -82,7 +87,7 @@ export interface ISchemaSubscription<T extends {}> extends Disposable {
|
|
|
82
87
|
send(changes: SubscriptionChanges<T>): void;
|
|
83
88
|
onMessage(callback: (changes: SubscriptionChanges<T>) => void): void;
|
|
84
89
|
}
|
|
85
|
-
type Enrich<TEntity extends {}> = {
|
|
90
|
+
export type Enrich<TEntity extends {}> = {
|
|
86
91
|
(entity: InferType<TEntity>, changeTrackingType: ChangeTrackingType): InferType<TEntity>;
|
|
87
92
|
(entity: InferCreateType<TEntity>, changeTrackingType: ChangeTrackingType): InferCreateType<TEntity>;
|
|
88
93
|
};
|
|
@@ -94,7 +99,11 @@ export type Preprocess<TEntity extends {}> = {
|
|
|
94
99
|
(entity: InferCreateType<TEntity>): InferType<TEntity>;
|
|
95
100
|
(entity: InferType<TEntity>): InferType<TEntity>;
|
|
96
101
|
};
|
|
102
|
+
export type SetProperties<TEntity extends {}> = (destination: InferType<TEntity> | InferCreateType<TEntity>, source: InferType<TEntity> | InferCreateType<TEntity>) => void;
|
|
97
103
|
export type CompiledSchemaCore<TEntity extends {}> = Omit<CompiledSchema<TEntity>, "createSubscription">;
|
|
104
|
+
export type CompiledSchemaWithMetadata<TEntity extends {}, TMetadata> = {
|
|
105
|
+
readonly metadata: TMetadata;
|
|
106
|
+
} & CompiledSchema<TEntity>;
|
|
98
107
|
/**
|
|
99
108
|
* Represents a fully compiled schema with all utilities and metadata for an entity type.
|
|
100
109
|
*/
|
|
@@ -129,6 +138,8 @@ export type CompiledSchema<TEntity extends {}> = {
|
|
|
129
138
|
compare: (a: InferType<TEntity>, fromDb: InferType<TEntity>) => boolean;
|
|
130
139
|
/** Deserializes an entity from storage format. */
|
|
131
140
|
deserialize: (entity: InferType<TEntity>) => InferType<TEntity>;
|
|
141
|
+
/** Sets 1 or many properties from the source object onto the destination object with change tracking. */
|
|
142
|
+
set: SetProperties<TEntity>;
|
|
132
143
|
/** Combines serializing and preparing an entity for saving. */
|
|
133
144
|
preprocess: Preprocess<TEntity>;
|
|
134
145
|
/** Combines deserializing and enriching an entity for selection. */
|
|
@@ -138,7 +149,7 @@ export type CompiledSchema<TEntity extends {}> = {
|
|
|
138
149
|
/** Unique id for the schema. */
|
|
139
150
|
id: SchemaId;
|
|
140
151
|
/** The name of the collection for this schema. */
|
|
141
|
-
collectionName:
|
|
152
|
+
collectionName: CollectionName;
|
|
142
153
|
/** Returns all IDs for the given entity (usually a single-element tuple). */
|
|
143
154
|
getIds: (entity: InferType<TEntity>) => [IdType];
|
|
144
155
|
/** Enriches the entity with change tracking or other metadata. */
|
|
@@ -158,7 +169,8 @@ export type CompiledSchema<TEntity extends {}> = {
|
|
|
158
169
|
};
|
|
159
170
|
export type PropertySerializer<T extends any> = (value: T) => string | number;
|
|
160
171
|
export type PropertyDeserializer<T extends any> = (value: string | number) => T;
|
|
161
|
-
export type SchemaId = number
|
|
172
|
+
export type SchemaId = Branded<number, "SchemaId">;
|
|
173
|
+
export type CollectionName = Branded<string, "CollectionName">;
|
|
162
174
|
export type SchemaModifiers = "default" | "deserialize" | "identity" | "key" | "nullable" | "optional" | "readonly" | "serialize" | "unmapped" | "computed" | "distinct";
|
|
163
175
|
type InferPrimitive<T> = T extends SchemaOptional<infer C, infer __> ? C extends (string | number | Date) ? C : {
|
|
164
176
|
[K in keyof C]: InferPrimitive<C[K]>;
|
|
@@ -168,6 +180,7 @@ type InferPrimitive<T> = T extends SchemaOptional<infer C, infer __> ? C extends
|
|
|
168
180
|
export type InferType<T> = T extends CompiledSchema<infer R> ? InferCompiledSchema<R> : T extends {} ? InferCompiledSchema<T> : T;
|
|
169
181
|
export type InferCreateType<T> = T extends CompiledSchema<infer R> ? InferCompiledCreateSchema<R> : T extends {} ? InferCompiledCreateSchema<T> : unknown;
|
|
170
182
|
export type InferMappedType<T> = T extends SchemaBase<infer K, infer __> ? InferType<K> : InferCompiledSchema<T>;
|
|
183
|
+
export type InferRoot<T> = T extends CompiledSchema<infer R> ? R : never;
|
|
171
184
|
type HasModifier<T, K extends keyof T, M extends SchemaModifiers> = T[K] extends SchemaBase<any, infer Mods> ? M extends Mods ? true : false : false;
|
|
172
185
|
type IsPlainProperty<T, K extends keyof T> = [
|
|
173
186
|
HasModifier<T, K, "readonly">,
|
|
@@ -178,21 +191,24 @@ type IsPlainProperty<T, K extends keyof T> = [
|
|
|
178
191
|
false,
|
|
179
192
|
false
|
|
180
193
|
] ? true : false;
|
|
181
|
-
type
|
|
194
|
+
type IsCreateExcluded<T, K extends keyof T> = [
|
|
182
195
|
HasModifier<T, K, "identity">,
|
|
183
|
-
HasModifier<T, K, "default">,
|
|
184
196
|
HasModifier<T, K, "computed">,
|
|
185
|
-
HasModifier<T, K, "unmapped"
|
|
186
|
-
HasModifier<T, K, "optional">,
|
|
187
|
-
HasModifier<T, K, "nullable">
|
|
197
|
+
HasModifier<T, K, "unmapped">
|
|
188
198
|
] extends [
|
|
189
199
|
false,
|
|
190
200
|
false,
|
|
191
|
-
false
|
|
192
|
-
|
|
201
|
+
false
|
|
202
|
+
] ? false : true;
|
|
203
|
+
type IsCreateOptional<T, K extends keyof T> = [
|
|
204
|
+
HasModifier<T, K, "optional">,
|
|
205
|
+
HasModifier<T, K, "default">
|
|
206
|
+
] extends [
|
|
193
207
|
false,
|
|
194
208
|
false
|
|
195
|
-
] ?
|
|
209
|
+
] ? false : true;
|
|
210
|
+
type IsCreateNullable<T, K extends keyof T> = HasModifier<T, K, "nullable"> extends true ? true : false;
|
|
211
|
+
type InferCreateProperty<T, K extends keyof T> = IsCreateNullable<T, K> extends true ? null | InferPrimitive<T[K]> : InferPrimitive<T[K]>;
|
|
196
212
|
type InferCompiledSchema<T> = CoalesceEmpty<{
|
|
197
213
|
[K in keyof T as IsPlainProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>;
|
|
198
214
|
}, {
|
|
@@ -202,15 +218,11 @@ type InferCompiledSchema<T> = CoalesceEmpty<{
|
|
|
202
218
|
}, {
|
|
203
219
|
[K in keyof T as HasModifier<T, K, "nullable"> extends true ? K : never]: null | InferPrimitive<T[K]>;
|
|
204
220
|
}>;
|
|
205
|
-
type InferCompiledCreateSchema<T> =
|
|
206
|
-
[K in keyof T as
|
|
207
|
-
}
|
|
208
|
-
[K in keyof T as
|
|
209
|
-
}
|
|
210
|
-
[K in keyof T as HasModifier<T, K, "default"> extends true ? K : never]?: InferPrimitive<T[K]>;
|
|
211
|
-
}, {
|
|
212
|
-
[K in keyof T as HasModifier<T, K, "nullable"> extends true ? K : never]: null | InferPrimitive<T[K]>;
|
|
213
|
-
}>;
|
|
221
|
+
type InferCompiledCreateSchema<T> = {
|
|
222
|
+
[K in keyof T as IsCreateExcluded<T, K> extends true ? never : IsCreateOptional<T, K> extends true ? K : never]?: InferCreateProperty<T, K>;
|
|
223
|
+
} & {
|
|
224
|
+
[K in keyof T as IsCreateExcluded<T, K> extends true ? never : IsCreateOptional<T, K> extends true ? never : K]: InferCreateProperty<T, K>;
|
|
225
|
+
};
|
|
214
226
|
type IsEmptyObject<T> = keyof T extends never ? true : false;
|
|
215
227
|
type CoalesceEmpty<T1 extends {}, T2 extends {}, T3 extends {}, T4 extends {}> = (IsEmptyObject<T1> extends true ? {} : T1) & (IsEmptyObject<T2> extends true ? {} : T2) & (IsEmptyObject<T3> extends true ? {} : T3) & (IsEmptyObject<T4> extends true ? {} : T4);
|
|
216
228
|
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { PropertyInfo } from '../PropertyInfo';
|
|
2
|
+
import { CompiledSchema, InferCreateType, InferType } from '../types';
|
|
3
|
+
import { SchemaDefinition } from '../SchemaDefinition';
|
|
4
|
+
/**
|
|
5
|
+
* Standard JSON Schema V1 interface types
|
|
6
|
+
* Based on https://standardschema.dev/json-schema
|
|
7
|
+
*/
|
|
8
|
+
export interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
9
|
+
readonly '~standard': StandardTypedV1.Props<Input, Output>;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace StandardTypedV1 {
|
|
12
|
+
interface Props<Input = unknown, Output = Input> {
|
|
13
|
+
readonly version: 1;
|
|
14
|
+
readonly vendor: string;
|
|
15
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
16
|
+
}
|
|
17
|
+
interface Types<Input = unknown, Output = Input> {
|
|
18
|
+
readonly input: Input;
|
|
19
|
+
readonly output: Output;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
|
|
23
|
+
readonly '~standard': StandardJSONSchemaV1.Props<Input, Output>;
|
|
24
|
+
}
|
|
25
|
+
export declare namespace StandardJSONSchemaV1 {
|
|
26
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
27
|
+
readonly jsonSchema: StandardJSONSchemaV1.Converter;
|
|
28
|
+
}
|
|
29
|
+
interface Converter {
|
|
30
|
+
readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
31
|
+
readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
32
|
+
}
|
|
33
|
+
type Target = 'draft-2020-12' | 'draft-07' | 'openapi-3.0' | ({} & string);
|
|
34
|
+
interface Options {
|
|
35
|
+
readonly target: Target;
|
|
36
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Converts a Routier PropertyInfo to a JSON Schema property definition.
|
|
41
|
+
*/
|
|
42
|
+
export declare function propertyInfoToJsonSchema(property: PropertyInfo<any>, target: StandardJSONSchemaV1.Target, visited?: Set<string>, useOutputType?: boolean): Record<string, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Converts a CompiledSchema to a JSON Schema object schema.
|
|
45
|
+
*/
|
|
46
|
+
export declare function compiledSchemaToJsonSchema<T extends {}>(compiledSchema: CompiledSchema<T>, target: StandardJSONSchemaV1.Target, useOutputType?: boolean): Record<string, unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* Creates Standard JSON Schema V1 props for a compiled schema.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createStandardJsonSchemaProps<T extends {}>(compiledSchema: CompiledSchema<T>): StandardJSONSchemaV1.Props<InferCreateType<T>, InferType<T>>;
|
|
51
|
+
/**
|
|
52
|
+
* Parses a JSON string containing a JSON Schema and rehydrates it into a Routier SchemaDefinition.
|
|
53
|
+
* This is a convenience wrapper around `rehydrateSchemaFromJsonSchema` that handles JSON parsing.
|
|
54
|
+
*
|
|
55
|
+
* @param jsonString - The JSON string containing the JSON Schema
|
|
56
|
+
* @param collectionName - The collection name for the schema (if not in x-routier metadata)
|
|
57
|
+
* @returns A SchemaDefinition that can be compiled
|
|
58
|
+
* @throws Error if the JSON string is invalid or doesn't contain a valid JSON Schema
|
|
59
|
+
*/
|
|
60
|
+
export declare function rehydrateSchemaFromJsonString(jsonString: string, collectionName?: string): SchemaDefinition<any>;
|
|
61
|
+
/**
|
|
62
|
+
* Rehydrates a JSON Schema back into a Routier SchemaDefinition.
|
|
63
|
+
* This parses the JSON Schema structure and reconstructs the schema using Routier's builder API.
|
|
64
|
+
*
|
|
65
|
+
* @param jsonSchema - The JSON Schema object to rehydrate
|
|
66
|
+
* @param collectionName - The collection name for the schema (if not in x-routier metadata)
|
|
67
|
+
* @returns A SchemaDefinition that can be compiled
|
|
68
|
+
*/
|
|
69
|
+
export declare function rehydrateSchemaFromJsonSchema(jsonSchema: Record<string, unknown>, collectionName?: string): SchemaDefinition<any>;
|
|
70
|
+
/**
|
|
71
|
+
* Attempts to extract type information from a compiled schema for better type inference.
|
|
72
|
+
*
|
|
73
|
+
* Note: TypeScript types are compile-time only, so we can't extract actual type information at runtime.
|
|
74
|
+
* The Standard JSON Schema spec allows libraries to advertise their inferred types via the `types` property,
|
|
75
|
+
* but this requires compile-time type information that isn't available at runtime.
|
|
76
|
+
*
|
|
77
|
+
* For proper type inference, consumers should use TypeScript's type system:
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const schema = s.define("users", { ... }).compile();
|
|
80
|
+
* type User = InferType<typeof schema>;
|
|
81
|
+
* type CreateUser = InferCreateType<typeof schema>;
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @param compiledSchema - The compiled schema to extract type info from
|
|
85
|
+
* @returns A description of the type names (for documentation purposes only)
|
|
86
|
+
*/
|
|
87
|
+
export declare function extractTypeInfo<T extends {}>(compiledSchema: CompiledSchema<T>): {
|
|
88
|
+
inputType: string;
|
|
89
|
+
outputType: string;
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// The require scope
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
|
|
4
|
-
/************************************************************************/
|
|
5
4
|
// webpack/runtime/make_namespace_object
|
|
6
5
|
(() => {
|
|
7
6
|
// define __esModule on exports
|
|
@@ -12,12 +11,7 @@ __webpack_require__.r = (exports) => {
|
|
|
12
11
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
13
12
|
};
|
|
14
13
|
})();
|
|
15
|
-
/************************************************************************/
|
|
16
14
|
var __webpack_exports__ = {};
|
|
17
|
-
|
|
18
|
-
/*!****************************!*\
|
|
19
|
-
!*** ./src/types/index.ts ***!
|
|
20
|
-
\****************************/
|
|
21
15
|
__webpack_require__.r(__webpack_exports__);
|
|
22
16
|
|
|
23
17
|
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/index.js","sources":["webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/types/index.ts"],"sourcesContent":["// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export type DeepPartial<T> = T extends object ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n} : T;\n\nexport type GenericFunction<T, R> = (value: T) => R;"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types/index.js","sources":["webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/types/index.ts"],"sourcesContent":["// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export type DeepPartial<T> = T extends object ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n} : T;\n\nexport type GenericFunction<T, R> = (value: T) => R;"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA,uDAAuD,iBAAiB;AACxE;AACA,gDAAgD,aAAa;AAC7D,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const noop: (...
|
|
1
|
+
export declare const noop: (..._args: any[]) => void;
|