@tstdl/base 0.91.0-beta5 → 0.91.0-beta7

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.
@@ -15,9 +15,9 @@ export declare const authenticationApiDefinition: {
15
15
  resource: string;
16
16
  method: "POST";
17
17
  parameters: ObjectSchema<{
18
- subject: string;
19
- secret: string;
20
- data: unknown;
18
+ readonly subject: string;
19
+ readonly secret: string;
20
+ readonly data: unknown;
21
21
  }>;
22
22
  result: ObjectSchema<TokenPayload<import("type-fest").EmptyObject>>;
23
23
  credentials: true;
@@ -29,7 +29,7 @@ export declare const authenticationApiDefinition: {
29
29
  resource: string;
30
30
  method: "POST";
31
31
  parameters: ObjectSchema<{
32
- data: unknown;
32
+ readonly data: unknown;
33
33
  }>;
34
34
  result: ObjectSchema<TokenPayload<import("type-fest").EmptyObject>>;
35
35
  credentials: true;
@@ -41,8 +41,8 @@ export declare const authenticationApiDefinition: {
41
41
  resource: string;
42
42
  method: "POST";
43
43
  parameters: ObjectSchema<{
44
- subject: string;
45
- data: unknown;
44
+ readonly subject: string;
45
+ readonly data: unknown;
46
46
  }>;
47
47
  result: ObjectSchema<TokenPayload<import("type-fest").EmptyObject>>;
48
48
  credentials: true;
@@ -54,7 +54,7 @@ export declare const authenticationApiDefinition: {
54
54
  resource: string;
55
55
  method: "POST";
56
56
  parameters: ObjectSchema<{
57
- data: unknown;
57
+ readonly data: unknown;
58
58
  }>;
59
59
  result: ObjectSchema<TokenPayload<import("type-fest").EmptyObject>>;
60
60
  credentials: true;
@@ -75,8 +75,8 @@ export declare const authenticationApiDefinition: {
75
75
  resource: string;
76
76
  method: "POST";
77
77
  parameters: ObjectSchema<{
78
- subject: string;
79
- data: import("type-fest").EmptyObject;
78
+ readonly subject: string;
79
+ readonly data: import("type-fest").EmptyObject;
80
80
  }>;
81
81
  result: import("../schema/index.js").LiteralSchema<"ok">;
82
82
  };
@@ -84,8 +84,8 @@ export declare const authenticationApiDefinition: {
84
84
  resource: string;
85
85
  method: "POST";
86
86
  parameters: ObjectSchema<{
87
- token: string;
88
- newSecret: string;
87
+ readonly token: string;
88
+ readonly newSecret: string;
89
89
  }>;
90
90
  result: import("../schema/index.js").LiteralSchema<"ok">;
91
91
  };
@@ -93,7 +93,7 @@ export declare const authenticationApiDefinition: {
93
93
  resource: string;
94
94
  method: "POST";
95
95
  parameters: ObjectSchema<{
96
- secret: string;
96
+ readonly secret: string;
97
97
  }>;
98
98
  result: typeof SecretCheckResult;
99
99
  };
@@ -110,9 +110,9 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
110
110
  resource: string;
111
111
  method: "POST";
112
112
  parameters: ObjectSchema<{
113
- subject: string;
114
- secret: string;
115
- data: AuthenticationData;
113
+ readonly subject: string;
114
+ readonly secret: string;
115
+ readonly data: AuthenticationData;
116
116
  }>;
117
117
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
118
118
  credentials: true;
@@ -124,7 +124,7 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
124
124
  resource: string;
125
125
  method: "POST";
126
126
  parameters: ObjectSchema<{
127
- data: AuthenticationData;
127
+ readonly data: AuthenticationData;
128
128
  }>;
129
129
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
130
130
  credentials: true;
@@ -136,8 +136,8 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
136
136
  resource: string;
137
137
  method: "POST";
138
138
  parameters: ObjectSchema<{
139
- subject: string;
140
- data: AuthenticationData;
139
+ readonly subject: string;
140
+ readonly data: AuthenticationData;
141
141
  }>;
142
142
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
143
143
  credentials: true;
@@ -149,7 +149,7 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
149
149
  resource: string;
150
150
  method: "POST";
151
151
  parameters: ObjectSchema<{
152
- data: AuthenticationData;
152
+ readonly data: AuthenticationData;
153
153
  }>;
154
154
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
155
155
  credentials: true;
@@ -170,8 +170,8 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
170
170
  resource: string;
171
171
  method: "POST";
172
172
  parameters: ObjectSchema<{
173
- subject: string;
174
- data: AdditionalInitSecretResetData;
173
+ readonly subject: string;
174
+ readonly data: AdditionalInitSecretResetData;
175
175
  }>;
176
176
  result: import("../schema/index.js").LiteralSchema<"ok">;
177
177
  };
@@ -179,8 +179,8 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
179
179
  resource: string;
180
180
  method: "POST";
181
181
  parameters: ObjectSchema<{
182
- token: string;
183
- newSecret: string;
182
+ readonly token: string;
183
+ readonly newSecret: string;
184
184
  }>;
185
185
  result: import("../schema/index.js").LiteralSchema<"ok">;
186
186
  };
@@ -188,7 +188,7 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
188
188
  resource: string;
189
189
  method: "POST";
190
190
  parameters: ObjectSchema<{
191
- secret: string;
191
+ readonly secret: string;
192
192
  }>;
193
193
  result: typeof SecretCheckResult;
194
194
  };
@@ -203,9 +203,9 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
203
203
  resource: string;
204
204
  method: "POST";
205
205
  parameters: ObjectSchema<{
206
- subject: string;
207
- secret: string;
208
- data: AuthenticationData;
206
+ readonly subject: string;
207
+ readonly secret: string;
208
+ readonly data: AuthenticationData;
209
209
  }>;
210
210
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
211
211
  credentials: true;
@@ -217,7 +217,7 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
217
217
  resource: string;
218
218
  method: "POST";
219
219
  parameters: ObjectSchema<{
220
- data: AuthenticationData;
220
+ readonly data: AuthenticationData;
221
221
  }>;
222
222
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
223
223
  credentials: true;
@@ -229,8 +229,8 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
229
229
  resource: string;
230
230
  method: "POST";
231
231
  parameters: ObjectSchema<{
232
- subject: string;
233
- data: AuthenticationData;
232
+ readonly subject: string;
233
+ readonly data: AuthenticationData;
234
234
  }>;
235
235
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
236
236
  credentials: true;
@@ -242,7 +242,7 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
242
242
  resource: string;
243
243
  method: "POST";
244
244
  parameters: ObjectSchema<{
245
- data: AuthenticationData;
245
+ readonly data: AuthenticationData;
246
246
  }>;
247
247
  result: ObjectSchema<TokenPayload<AdditionalTokenPayload>>;
248
248
  credentials: true;
@@ -263,8 +263,8 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
263
263
  resource: string;
264
264
  method: "POST";
265
265
  parameters: ObjectSchema<{
266
- subject: string;
267
- data: AdditionalInitSecretResetData;
266
+ readonly subject: string;
267
+ readonly data: AdditionalInitSecretResetData;
268
268
  }>;
269
269
  result: import("../schema/index.js").LiteralSchema<"ok">;
270
270
  };
@@ -272,8 +272,8 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
272
272
  resource: string;
273
273
  method: "POST";
274
274
  parameters: ObjectSchema<{
275
- token: string;
276
- newSecret: string;
275
+ readonly token: string;
276
+ readonly newSecret: string;
277
277
  }>;
278
278
  result: import("../schema/index.js").LiteralSchema<"ok">;
279
279
  };
@@ -281,7 +281,7 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
281
281
  resource: string;
282
282
  method: "POST";
283
283
  parameters: ObjectSchema<{
284
- secret: string;
284
+ readonly secret: string;
285
285
  }>;
286
286
  result: typeof SecretCheckResult;
287
287
  };
@@ -19,8 +19,12 @@ export declare const mySchemaUsers: PgTableWithColumns<{
19
19
  driverParam: string;
20
20
  notNull: false;
21
21
  hasDefault: false;
22
+ isPrimaryKey: false;
23
+ isAutoincrement: false;
24
+ hasRuntimeDefault: false;
22
25
  enumValues: undefined;
23
26
  baseColumn: never;
27
+ generated: undefined;
24
28
  }, {}, {}>;
25
29
  name: import("drizzle-orm/pg-core").PgColumn<{
26
30
  name: "name";
@@ -31,8 +35,12 @@ export declare const mySchemaUsers: PgTableWithColumns<{
31
35
  driverParam: string;
32
36
  notNull: false;
33
37
  hasDefault: false;
38
+ isPrimaryKey: false;
39
+ isAutoincrement: false;
40
+ hasRuntimeDefault: false;
34
41
  enumValues: [string, ...string[]];
35
42
  baseColumn: never;
43
+ generated: undefined;
36
44
  }, {}, {}>;
37
45
  age: import("drizzle-orm/pg-core").PgColumn<{
38
46
  name: "";
@@ -43,8 +51,12 @@ export declare const mySchemaUsers: PgTableWithColumns<{
43
51
  driverParam: string | number;
44
52
  notNull: false;
45
53
  hasDefault: false;
54
+ isPrimaryKey: false;
55
+ isAutoincrement: false;
56
+ hasRuntimeDefault: false;
46
57
  enumValues: undefined;
47
58
  baseColumn: never;
59
+ generated: undefined;
48
60
  }, {}, {}>;
49
61
  color: import("drizzle-orm/pg-core").PgColumn<{
50
62
  name: "color";
@@ -55,8 +67,12 @@ export declare const mySchemaUsers: PgTableWithColumns<{
55
67
  driverParam: string;
56
68
  notNull: false;
57
69
  hasDefault: true;
70
+ isPrimaryKey: false;
71
+ isAutoincrement: false;
72
+ hasRuntimeDefault: false;
58
73
  enumValues: ["red", "green", "blue"];
59
74
  baseColumn: never;
75
+ generated: undefined;
60
76
  }, {}, {}>;
61
77
  };
62
78
  dialect: "pg";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.91.0-beta5",
3
+ "version": "0.91.0-beta7",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -111,7 +111,7 @@
111
111
  "luxon": "^3.4",
112
112
  "reflect-metadata": "^0.2",
113
113
  "rxjs": "^7.8",
114
- "type-fest": "4.21"
114
+ "type-fest": "4.22"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@mxssfd/typedoc-theme": "1.1",
@@ -0,0 +1,8 @@
1
+ import type { JsonPath } from '../../json-path/json-path.js';
2
+ import { type SchemaPropertyDecorator, type SchemaPropertyDecoratorOptions } from '../decorators/index.js';
3
+ import { Schema, type SchemaTestOptions, type SchemaTestResult } from '../schema.js';
4
+ export declare class FunctionSchema extends Schema<Function> {
5
+ _test(value: any, path: JsonPath, options: SchemaTestOptions): SchemaTestResult<Function>;
6
+ }
7
+ export declare function func(): FunctionSchema;
8
+ export declare function Function(options?: SchemaPropertyDecoratorOptions): SchemaPropertyDecorator;
@@ -0,0 +1,19 @@
1
+ import { SchemaError } from '../../schema/schema.error.js';
2
+ import { isFunction } from '../../utils/type-guards.js';
3
+ import { typeOf } from '../../utils/type-of.js';
4
+ import { Property } from '../decorators/index.js';
5
+ import { Schema } from '../schema.js';
6
+ export class FunctionSchema extends Schema {
7
+ _test(value, path, options) {
8
+ if (isFunction(value)) {
9
+ return { valid: true, value };
10
+ }
11
+ return { valid: false, error: SchemaError.expectedButGot('Function', typeOf(value), path, { fast: options.fastErrors }) };
12
+ }
13
+ }
14
+ export function func() {
15
+ return new FunctionSchema();
16
+ }
17
+ export function Function(options) {
18
+ return Property(func(), options);
19
+ }
@@ -5,6 +5,7 @@ export * from './boolean.js';
5
5
  export * from './date.js';
6
6
  export * from './defaulted.js';
7
7
  export * from './enumeration.js';
8
+ export * from './function.js';
8
9
  export * from './instance.js';
9
10
  export * from './literal.js';
10
11
  export * from './never.js';
@@ -5,6 +5,7 @@ export * from './boolean.js';
5
5
  export * from './date.js';
6
6
  export * from './defaulted.js';
7
7
  export * from './enumeration.js';
8
+ export * from './function.js';
8
9
  export * from './instance.js';
9
10
  export * from './literal.js';
10
11
  export * from './never.js';
@@ -34,44 +34,44 @@ export declare class ObjectSchema<T extends Record = Record> extends Schema<T> {
34
34
  constructor(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T>);
35
35
  _test(value: any, path: JsonPath, options: SchemaTestOptions): SchemaTestResult<T>;
36
36
  }
37
- export declare function object<K extends PropertyKey, V>(properties: Record<never>, options: ObjectSchemaOptions<Record<K, V>> & {
37
+ export declare function object<const K extends PropertyKey, const V>(properties: Record<never>, options: ObjectSchemaOptions<Record<K, V>> & {
38
38
  unknownProperties: SchemaTestable<V>;
39
39
  unknownPropertiesKey: SchemaTestable<K>;
40
40
  }): ObjectSchema<Record<K, V>>;
41
- export declare function object<K extends PropertyKey>(properties: Record<never>, options: ObjectSchemaOptions<Record<K, unknown>> & {
41
+ export declare function object<const K extends PropertyKey>(properties: Record<never>, options: ObjectSchemaOptions<Record<K, unknown>> & {
42
42
  unknownProperties?: undefined;
43
43
  unknownPropertiesKey: SchemaTestable<K>;
44
44
  }): ObjectSchema<Record<K, unknown>>;
45
- export declare function object<V>(properties: Record<never>, options: ObjectSchemaOptions<Record<PropertyKey, V>> & {
45
+ export declare function object<const V>(properties: Record<never>, options: ObjectSchemaOptions<Record<PropertyKey, V>> & {
46
46
  unknownProperties: SchemaTestable<V>;
47
47
  unknownPropertiesKey?: undefined;
48
48
  }): ObjectSchema<Record<PropertyKey, V>>;
49
- export declare function object<T extends Record, K extends PropertyKey, V>(properties: ObjectSchemaProperties<T>, options: ObjectSchemaOptions<T & Record<K, V>> & {
49
+ export declare function object<const T extends Record, const K extends PropertyKey, const V>(properties: ObjectSchemaProperties<T>, options: ObjectSchemaOptions<T & Record<K, V>> & {
50
50
  unknownProperties: SchemaTestable<V>;
51
51
  unknownPropertiesKey: SchemaTestable<K>;
52
52
  }): ObjectSchema<SimplifyObject<T & Record<K, V>>>;
53
- export declare function object<T extends Record, K extends PropertyKey>(properties: ObjectSchemaProperties<T>, options: ObjectSchemaOptions<T & Record<K, unknown>> & {
53
+ export declare function object<const T extends Record, const K extends PropertyKey>(properties: ObjectSchemaProperties<T>, options: ObjectSchemaOptions<T & Record<K, unknown>> & {
54
54
  unknownPropertiesKey: SchemaTestable<K>;
55
55
  }): ObjectSchema<SimplifyObject<T & Record<K, unknown>>>;
56
- export declare function object<T extends Record, V>(properties: ObjectSchemaProperties<T>, options: ObjectSchemaOptions<T & Record<PropertyKey, V>> & {
56
+ export declare function object<const T extends Record, const V>(properties: ObjectSchemaProperties<T>, options: ObjectSchemaOptions<T & Record<PropertyKey, V>> & {
57
57
  unknownProperties: SchemaTestable<V>;
58
58
  }): ObjectSchema<SimplifyObject<T & Record<PropertyKey, V>>>;
59
- export declare function object<T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T> & {
59
+ export declare function object<const T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T> & {
60
60
  unknownProperties?: undefined;
61
61
  unknownPropertiesKey?: undefined;
62
62
  }): ObjectSchema<T>;
63
- export declare function object<T extends Record, K extends PropertyKey, V>(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T, K, V>): ObjectSchema<SimplifyObject<T & Record<K, V>>>;
64
- export declare function explicitObject<T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T>): ObjectSchema<T>;
65
- export declare function record<K extends PropertyKey, V>(key: Schema<K>, value: Schema<V>, options?: TypedOmit<ObjectSchemaOptions<Record<K, V>>, 'unknownProperties' | 'unknownPropertiesKey'>): ObjectSchema<Record<K, V>>;
66
- export declare function assign<T1 extends Record, T2 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>): ObjectSchema<Merge<T1, T2>>;
67
- export declare function assign<T1 extends Record, T2 extends Record, T3 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>): ObjectSchema<Merge<Merge<T1, T2>, T3>>;
68
- export declare function assign<T1 extends Record, T2 extends Record, T3 extends Record, T4 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>, d: ObjectSchemaOrType<T4>): ObjectSchema<Merge<Merge<Merge<T1, T2>, T3>, T4>>;
69
- export declare function assign<T1 extends Record, T2 extends Record, T3 extends Record, T4 extends Record, T5 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>, d: ObjectSchemaOrType<T4>, e: ObjectSchemaOrType<T5>): ObjectSchema<Merge<Merge<Merge<Merge<T1, T2>, T3>, T4>, T5>>;
70
- export declare function assign<T1 extends Record, T2 extends Record, T3 extends Record, T4 extends Record, T5 extends Record, T6 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>, d: ObjectSchemaOrType<T4>, e: ObjectSchemaOrType<T5>, f: ObjectSchemaOrType<T6>): ObjectSchema<Merge<Merge<Merge<Merge<Merge<T1, T2>, T3>, T4>, T5>, T6>>;
71
- export declare function partial<T extends Record>(schema: ObjectSchemaOrType<T>): ObjectSchema<Partial<T>>;
72
- export declare function partial<T extends Record, K extends keyof T>(schema: ObjectSchemaOrType<T>, keys: OneOrMany<K>): ObjectSchema<PartialProperty<T, K>>;
73
- export declare function pick<T extends Record, K extends keyof T>(schemaOrType: ObjectSchemaOrType<T>, keys: OneOrMany<K>): ObjectSchema<SimplifyObject<Pick<T, K>>>;
74
- export declare function omit<T extends Record, K extends keyof T>(schemaOrType: ObjectSchemaOrType<T>, keys: OneOrMany<K>): ObjectSchema<SimplifyObject<Omit<T, K>>>;
63
+ export declare function object<const T extends Record, const K extends PropertyKey, const V>(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T, K, V>): ObjectSchema<SimplifyObject<T & Record<K, V>>>;
64
+ export declare function explicitObject<const T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectSchemaOptions<T>): ObjectSchema<T>;
65
+ export declare function record<const K extends PropertyKey, const V>(key: Schema<K>, value: Schema<V>, options?: TypedOmit<ObjectSchemaOptions<Record<K, V>>, 'unknownProperties' | 'unknownPropertiesKey'>): ObjectSchema<Record<K, V>>;
66
+ export declare function assign<const T1 extends Record, const T2 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>): ObjectSchema<Merge<T1, T2>>;
67
+ export declare function assign<const T1 extends Record, const T2 extends Record, const T3 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>): ObjectSchema<Merge<Merge<T1, T2>, T3>>;
68
+ export declare function assign<const T1 extends Record, const T2 extends Record, const T3 extends Record, const T4 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>, d: ObjectSchemaOrType<T4>): ObjectSchema<Merge<Merge<Merge<T1, T2>, T3>, T4>>;
69
+ export declare function assign<const T1 extends Record, const T2 extends Record, const T3 extends Record, const T4 extends Record, const T5 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>, d: ObjectSchemaOrType<T4>, e: ObjectSchemaOrType<T5>): ObjectSchema<Merge<Merge<Merge<Merge<T1, T2>, T3>, T4>, T5>>;
70
+ export declare function assign<const T1 extends Record, const T2 extends Record, const T3 extends Record, const T4 extends Record, const T5 extends Record, const T6 extends Record>(a: ObjectSchemaOrType<T1>, b: ObjectSchemaOrType<T2>, c: ObjectSchemaOrType<T3>, d: ObjectSchemaOrType<T4>, e: ObjectSchemaOrType<T5>, f: ObjectSchemaOrType<T6>): ObjectSchema<Merge<Merge<Merge<Merge<Merge<T1, T2>, T3>, T4>, T5>, T6>>;
71
+ export declare function partial<const T extends Record>(schema: ObjectSchemaOrType<T>): ObjectSchema<Partial<T>>;
72
+ export declare function partial<const T extends Record, const K extends keyof T>(schema: ObjectSchemaOrType<T>, keys: OneOrMany<K>): ObjectSchema<PartialProperty<T, K>>;
73
+ export declare function pick<const T extends Record, const K extends keyof T>(schemaOrType: ObjectSchemaOrType<T>, keys: OneOrMany<K>): ObjectSchema<SimplifyObject<Pick<T, K>>>;
74
+ export declare function omit<const T extends Record, const K extends keyof T>(schemaOrType: ObjectSchemaOrType<T>, keys: OneOrMany<K>): ObjectSchema<SimplifyObject<Omit<T, K>>>;
75
75
  export declare function getSchemaFromReflection<T extends Record>(type: AbstractConstructor<T>): Schema<T>;
76
76
  declare function _tryGetSchemaFromReflection<T extends Record>(type: AbstractConstructor<T>): Schema<T> | null;
77
77
  export declare function getObjectSchema<T extends Record>(schemaOrType: SchemaTestable<T>): ObjectSchema<T>;
@@ -8,14 +8,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { Singleton } from '../../injector/decorators.js';
11
- import { Union } from '../../schema/index.js';
11
+ import { func, Union } from '../../schema/index.js';
12
12
  import { TemplateField } from '../template.model.js';
13
13
  import { TemplateResolver } from '../template.resolver.js';
14
14
  export class StringTemplateField extends TemplateField {
15
15
  template;
16
16
  }
17
17
  __decorate([
18
- Union(String, Function),
18
+ Union(String, func()),
19
19
  __metadata("design:type", Object)
20
20
  ], StringTemplateField.prototype, "template", void 0);
21
21
  let StringTemplateResolver = class StringTemplateResolver extends TemplateResolver {