typebox 1.1.26 → 1.1.28

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.
Files changed (157) hide show
  1. package/build/schema/static/properties.d.mts +27 -6
  2. package/build/schema/static/required.d.mts +1 -11
  3. package/build/schema/static/schema.d.mts +3 -2
  4. package/build/schema/static/static.d.mts +2 -2
  5. package/build/schema/static/~canonical.d.mts +7 -0
  6. package/build/type/action/awaited.d.mts +2 -2
  7. package/build/type/action/awaited.mjs +2 -3
  8. package/build/type/action/capitalize.d.mts +2 -2
  9. package/build/type/action/capitalize.mjs +2 -3
  10. package/build/type/action/conditional.d.mts +4 -2
  11. package/build/type/action/conditional.mjs +2 -2
  12. package/build/type/action/constructor-parameters.d.mts +2 -2
  13. package/build/type/action/constructor-parameters.mjs +2 -3
  14. package/build/type/action/evaluate.d.mts +2 -2
  15. package/build/type/action/evaluate.mjs +2 -3
  16. package/build/type/action/exclude.d.mts +2 -2
  17. package/build/type/action/exclude.mjs +2 -3
  18. package/build/type/action/extract.d.mts +2 -2
  19. package/build/type/action/extract.mjs +2 -3
  20. package/build/type/action/index.d.mts +1 -1
  21. package/build/type/action/index.mjs +1 -1
  22. package/build/type/action/indexed.d.mts +2 -2
  23. package/build/type/action/indexed.mjs +2 -3
  24. package/build/type/action/instance-type.d.mts +2 -2
  25. package/build/type/action/instance-type.mjs +2 -3
  26. package/build/type/action/interface.d.mts +2 -2
  27. package/build/type/action/interface.mjs +5 -3
  28. package/build/type/action/keyof.d.mts +2 -2
  29. package/build/type/action/keyof.mjs +2 -3
  30. package/build/type/action/lowercase.d.mts +2 -2
  31. package/build/type/action/lowercase.mjs +2 -3
  32. package/build/type/action/mapped.d.mts +4 -2
  33. package/build/type/action/mapped.mjs +2 -2
  34. package/build/type/action/non-nullable.d.mts +2 -2
  35. package/build/type/action/non-nullable.mjs +2 -3
  36. package/build/type/action/omit.d.mts +2 -2
  37. package/build/type/action/omit.mjs +2 -3
  38. package/build/type/action/options.d.mts +4 -5
  39. package/build/type/action/options.mjs +3 -4
  40. package/build/type/action/parameters.d.mts +2 -2
  41. package/build/type/action/parameters.mjs +2 -3
  42. package/build/type/action/partial.d.mts +3 -3
  43. package/build/type/action/partial.mjs +2 -3
  44. package/build/type/action/pick.d.mts +2 -2
  45. package/build/type/action/pick.mjs +2 -3
  46. package/build/type/action/readonly-object.d.mts +16 -0
  47. package/build/type/action/readonly-object.mjs +16 -0
  48. package/build/type/action/required.d.mts +2 -2
  49. package/build/type/action/required.mjs +2 -3
  50. package/build/type/action/return-type.d.mts +2 -2
  51. package/build/type/action/return-type.mjs +2 -3
  52. package/build/type/action/uncapitalize.d.mts +2 -2
  53. package/build/type/action/uncapitalize.mjs +2 -3
  54. package/build/type/action/uppercase.d.mts +2 -2
  55. package/build/type/action/uppercase.mjs +2 -3
  56. package/build/type/engine/awaited/instantiate.d.mts +4 -3
  57. package/build/type/engine/awaited/instantiate.mjs +9 -8
  58. package/build/type/engine/conditional/instantiate.d.mts +4 -2
  59. package/build/type/engine/conditional/instantiate.mjs +13 -9
  60. package/build/type/engine/constructor-parameters/instantiate.d.mts +6 -5
  61. package/build/type/engine/constructor-parameters/instantiate.mjs +13 -11
  62. package/build/type/engine/evaluate/instantiate.d.mts +3 -3
  63. package/build/type/engine/evaluate/instantiate.mjs +5 -10
  64. package/build/type/engine/exclude/instantiate.d.mts +4 -11
  65. package/build/type/engine/exclude/instantiate.mjs +7 -28
  66. package/build/type/engine/exclude/operation.d.mts +11 -0
  67. package/build/type/engine/exclude/operation.mjs +24 -0
  68. package/build/type/engine/extract/instantiate.d.mts +4 -11
  69. package/build/type/engine/extract/instantiate.mjs +7 -28
  70. package/build/type/engine/extract/operation.d.mts +11 -0
  71. package/build/type/engine/extract/operation.mjs +24 -0
  72. package/build/type/engine/index.d.mts +1 -1
  73. package/build/type/engine/index.mjs +1 -1
  74. package/build/type/engine/indexed/from-type.d.mts +11 -0
  75. package/build/type/engine/indexed/from-type.mjs +14 -0
  76. package/build/type/engine/indexed/instantiate.d.mts +5 -11
  77. package/build/type/engine/indexed/instantiate.mjs +8 -20
  78. package/build/type/engine/instance-type/instantiate.d.mts +4 -4
  79. package/build/type/engine/instance-type/instantiate.mjs +9 -8
  80. package/build/type/engine/instantiate.d.mts +4 -6
  81. package/build/type/engine/instantiate.mjs +9 -18
  82. package/build/type/engine/interface/instantiate.d.mts +6 -4
  83. package/build/type/engine/interface/instantiate.mjs +12 -8
  84. package/build/type/engine/intrinsics/instantiate.d.mts +12 -8
  85. package/build/type/engine/intrinsics/instantiate.mjs +28 -24
  86. package/build/type/engine/keyof/from-type.d.mts +15 -0
  87. package/build/type/engine/keyof/from-type.mjs +23 -0
  88. package/build/type/engine/keyof/instantiate.d.mts +4 -16
  89. package/build/type/engine/keyof/instantiate.mjs +8 -28
  90. package/build/type/engine/mapped/instantiate.d.mts +4 -19
  91. package/build/type/engine/mapped/instantiate.mjs +7 -42
  92. package/build/type/engine/mapped/mapped-operation.d.mts +22 -0
  93. package/build/type/engine/mapped/mapped-operation.mjs +42 -0
  94. package/build/type/engine/non-nullable/instantiate.d.mts +5 -6
  95. package/build/type/engine/non-nullable/instantiate.mjs +10 -10
  96. package/build/type/engine/omit/from-type.d.mts +12 -0
  97. package/build/type/engine/omit/from-type.mjs +18 -0
  98. package/build/type/engine/omit/instantiate.d.mts +4 -11
  99. package/build/type/engine/omit/instantiate.mjs +7 -22
  100. package/build/type/engine/options/instantiate.d.mts +4 -4
  101. package/build/type/engine/options/instantiate.mjs +8 -7
  102. package/build/type/engine/parameters/instantiate.d.mts +6 -5
  103. package/build/type/engine/parameters/instantiate.mjs +13 -11
  104. package/build/type/engine/partial/instantiate.d.mts +3 -3
  105. package/build/type/engine/partial/instantiate.mjs +7 -6
  106. package/build/type/engine/pick/from-type.d.mts +13 -0
  107. package/build/type/engine/pick/from-type.mjs +20 -0
  108. package/build/type/engine/pick/instantiate.d.mts +4 -12
  109. package/build/type/engine/pick/instantiate.mjs +7 -23
  110. package/build/type/engine/readonly-object/instantiate.d.mts +9 -0
  111. package/build/type/engine/readonly-object/instantiate.mjs +15 -0
  112. package/build/type/engine/record/instantiate.d.mts +3 -3
  113. package/build/type/engine/record/instantiate.mjs +8 -7
  114. package/build/type/engine/required/instantiate.d.mts +3 -3
  115. package/build/type/engine/required/instantiate.mjs +7 -6
  116. package/build/type/engine/return-type/instantiate.d.mts +5 -4
  117. package/build/type/engine/return-type/instantiate.mjs +12 -9
  118. package/build/type/engine/template-literal/encode.d.mts +4 -2
  119. package/build/type/engine/template-literal/encode.mjs +10 -3
  120. package/build/type/engine/template-literal/instantiate.d.mts +3 -3
  121. package/build/type/engine/template-literal/instantiate.mjs +7 -6
  122. package/build/type/script/mapping.d.mts +1 -1
  123. package/build/type/script/mapping.mjs +1 -1
  124. package/build/type/types/promise.d.mts +2 -1
  125. package/build/type/types/promise.mjs +2 -1
  126. package/build/type/types/record.d.mts +5 -5
  127. package/build/type/types/record.mjs +11 -6
  128. package/build/type/types/template-literal.d.mts +5 -3
  129. package/build/type/types/template-literal.mjs +10 -4
  130. package/build/typebox.d.mts +3 -3
  131. package/build/typebox.mjs +2 -2
  132. package/package.json +1 -1
  133. package/readme.md +1 -1
  134. package/build/schema/static/~non-readonly.d.mts +0 -7
  135. package/build/schema/static/~readonly.d.mts +0 -6
  136. package/build/schema/static/~readonly.mjs +0 -2
  137. package/build/type/action/readonly-type.d.mts +0 -11
  138. package/build/type/action/readonly-type.mjs +0 -12
  139. package/build/type/engine/readonly-type/instantiate.d.mts +0 -9
  140. package/build/type/engine/readonly-type/instantiate.mjs +0 -14
  141. /package/build/schema/static/{~non-readonly.mjs → ~canonical.mjs} +0 -0
  142. /package/build/type/engine/{readonly-type → readonly-object}/from-array.d.mts +0 -0
  143. /package/build/type/engine/{readonly-type → readonly-object}/from-array.mjs +0 -0
  144. /package/build/type/engine/{readonly-type → readonly-object}/from-cyclic.d.mts +0 -0
  145. /package/build/type/engine/{readonly-type → readonly-object}/from-cyclic.mjs +0 -0
  146. /package/build/type/engine/{readonly-type → readonly-object}/from-intersect.d.mts +0 -0
  147. /package/build/type/engine/{readonly-type → readonly-object}/from-intersect.mjs +0 -0
  148. /package/build/type/engine/{readonly-type → readonly-object}/from-object.d.mts +0 -0
  149. /package/build/type/engine/{readonly-type → readonly-object}/from-object.mjs +0 -0
  150. /package/build/type/engine/{readonly-type → readonly-object}/from-tuple.d.mts +0 -0
  151. /package/build/type/engine/{readonly-type → readonly-object}/from-tuple.mjs +0 -0
  152. /package/build/type/engine/{readonly-type → readonly-object}/from-type.d.mts +0 -0
  153. /package/build/type/engine/{readonly-type → readonly-object}/from-type.mjs +0 -0
  154. /package/build/type/engine/{readonly-type → readonly-object}/from-union.d.mts +0 -0
  155. /package/build/type/engine/{readonly-type → readonly-object}/from-union.mjs +0 -0
  156. /package/build/type/engine/{readonly-type → readonly-object}/index.d.mts +0 -0
  157. /package/build/type/engine/{readonly-type → readonly-object}/index.mjs +0 -0
@@ -1,11 +1,32 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
+ import type { XRequired } from '../types/required.mjs';
2
3
  import type { XStaticSchema } from './schema.mjs';
3
- import type { XIsReadonly } from './~readonly.mjs';
4
- type XReadonlyOptionalProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>> = {
5
- readonly [Key in keyof Properties as XIsReadonly<Properties[Key]> extends true ? Key : never]?: XStaticSchema<Stack, Root, Properties[Key]>;
4
+ type XIsReadonly<Schema extends XSchema> = (Schema extends {
5
+ readOnly: true;
6
+ } ? true : Schema extends {
7
+ '~readonly': true;
8
+ } ? true : false);
9
+ type XRequiredArray<Schema extends XSchema, Result extends PropertyKey[] = Schema extends XRequired<infer Keys extends string[]> ? Keys : []> = Result;
10
+ type XReadonlyKeys<Properties extends Record<PropertyKey, XSchema>, ReadonlyProperties extends Record<PropertyKey, unknown> = {
11
+ [Key in keyof Properties as XIsReadonly<Properties[Key]> extends true ? Key : never]: unknown;
12
+ }, Result extends PropertyKey = keyof ReadonlyProperties> = Result;
13
+ type XRequiredKeys<Properties extends Record<PropertyKey, XSchema>, RequiredArray extends string[], Result extends PropertyKey = RequiredArray extends [] ? never : Extract<keyof Properties, RequiredArray[number]>> = Result;
14
+ type XUnknownKeys<Properties extends Record<PropertyKey, XSchema>, RequiredArray extends string[], Result extends PropertyKey = Exclude<RequiredArray[number], keyof Properties>> = Result;
15
+ type XOptionalKeys<Properties extends Record<PropertyKey, XSchema>, RequiredArray extends string[], Result extends PropertyKey = RequiredArray extends [] ? keyof Properties : Exclude<keyof Properties, RequiredArray[number]>> = Result;
16
+ type XReadonlyOptionalProperties<Stack extends string[], Root extends XSchema, OptionalKeys extends PropertyKey, Properties extends Record<PropertyKey, XSchema>> = {
17
+ readonly [Key in Extract<keyof Properties, OptionalKeys>]?: XStaticSchema<Stack, Root, Properties[Key]>;
6
18
  };
7
- type XOptionalProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>> = {
8
- [Key in keyof Properties as XIsReadonly<Properties[Key]> extends true ? never : Key]?: XStaticSchema<Stack, Root, Properties[Key]>;
19
+ type XReadonlyRequiredProperties<Stack extends string[], Root extends XSchema, RequiredKeys extends PropertyKey, Properties extends Record<PropertyKey, XSchema>> = {
20
+ readonly [Key in Extract<keyof Properties, RequiredKeys>]: XStaticSchema<Stack, Root, Properties[Key]>;
9
21
  };
10
- export type XStaticProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, ReadonlyOptional extends Record<PropertyKey, unknown> = XReadonlyOptionalProperties<Stack, Root, Properties>, Optional extends Record<PropertyKey, unknown> = XOptionalProperties<Stack, Root, Properties>, Result extends Record<PropertyKey, unknown> = ReadonlyOptional & Optional> = Result;
22
+ type XOptionalProperties<Stack extends string[], Root extends XSchema, OptionalKeys extends PropertyKey, Properties extends Record<PropertyKey, XSchema>> = {
23
+ [Key in Extract<keyof Properties, OptionalKeys>]?: XStaticSchema<Stack, Root, Properties[Key]>;
24
+ };
25
+ type XRequiredProperties<Stack extends string[], Root extends XSchema, RequiredKeys extends PropertyKey, Properties extends Record<PropertyKey, XSchema>> = {
26
+ [Key in Extract<keyof Properties, RequiredKeys>]: XStaticSchema<Stack, Root, Properties[Key]>;
27
+ };
28
+ type XUnknownProperties<UnknownKeys extends PropertyKey> = {
29
+ [Key in UnknownKeys]: unknown;
30
+ };
31
+ export type XStaticProperties<Stack extends string[], Root extends XSchema, Schema extends XSchema, Properties extends Record<PropertyKey, XSchema>, RequiredArray extends string[] = XRequiredArray<Schema>, ReadonlyKeys extends PropertyKey = XReadonlyKeys<Properties>, OptionalKeys extends PropertyKey = XOptionalKeys<Properties, RequiredArray>, RequiredKeys extends PropertyKey = XRequiredKeys<Properties, RequiredArray>, UnknownKeys extends PropertyKey = XUnknownKeys<Properties, RequiredArray>, ReadonlyOptionalProperties extends Record<PropertyKey, unknown> = XReadonlyOptionalProperties<Stack, Root, Extract<OptionalKeys, ReadonlyKeys>, Properties>, ReadonlyRequiredProperties extends Record<PropertyKey, unknown> = XReadonlyRequiredProperties<Stack, Root, Extract<RequiredKeys, ReadonlyKeys>, Properties>, OptionalProperties extends Record<PropertyKey, unknown> = XOptionalProperties<Stack, Root, Exclude<OptionalKeys, ReadonlyKeys>, Properties>, RequiredProperties extends Record<PropertyKey, unknown> = XRequiredProperties<Stack, Root, Exclude<RequiredKeys, ReadonlyKeys>, Properties>, UnknownProperties extends Record<PropertyKey, unknown> = XUnknownProperties<UnknownKeys>, Result extends Record<PropertyKey, unknown> = (ReadonlyOptionalProperties & ReadonlyRequiredProperties & OptionalProperties & RequiredProperties & UnknownProperties)> = Result;
11
32
  export {};
@@ -1,13 +1,3 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
2
  import type { XProperties } from '../types/properties.mjs';
3
- import type { XIsReadonly } from './~readonly.mjs';
4
- import type { XStaticSchema } from './schema.mjs';
5
- type XResolveProperties<Schema extends XSchema, Result extends Record<PropertyKey, XSchema> = (Schema extends XProperties<infer Properties extends Record<PropertyKey, XSchema>> ? Properties : {})> = Result;
6
- type XFromKey<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, Key extends string, Readonly extends boolean = Key extends keyof Properties ? XIsReadonly<Properties[Key]> : false, Value extends unknown = Key extends keyof Properties ? XStaticSchema<Stack, Root, Properties[Key]> : unknown, Result extends Record<PropertyKey, unknown> = (Readonly extends true ? {
7
- readonly [_ in Key]: Value;
8
- } : {
9
- [_ in Key]: Value;
10
- })> = Result;
11
- type XFromKeys<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, Keys extends string[], Result extends Record<PropertyKey, unknown> = {}> = (Keys extends [infer Left extends string, ...infer Right extends string[]] ? XFromKeys<Stack, Root, Properties, Right, Result & XFromKey<Stack, Root, Properties, Left>> : Result);
12
- export type XStaticRequired<Stack extends string[], Root extends XSchema, Schema extends XSchema, Keys extends string[], Properties extends Record<PropertyKey, XSchema> = XResolveProperties<Schema>, Result extends Record<PropertyKey, unknown> = XFromKeys<Stack, Root, Properties, Keys>> = Result;
13
- export {};
3
+ export type XStaticRequired<Stack extends string[], Root extends XSchema, Schema extends XSchema, Keys extends string[], Result extends Record<PropertyKey, unknown> = Schema extends XProperties ? {} : Record<Keys[number], unknown>> = Result;
@@ -34,12 +34,13 @@ type XFromKeywords<Stack extends string[], Root extends XSchema, Schema extends
34
34
  Schema extends XAllOf<infer Types extends XSchema[]> ? XStaticAllOf<Stack, Root, Types> : unknown,
35
35
  Schema extends XAnyOf<infer Types extends XSchema[]> ? XStaticAnyOf<Stack, Root, Types> : unknown,
36
36
  Schema extends XConst<infer Value extends unknown> ? XStaticConst<Value> : unknown,
37
- Schema extends XIf<infer Type extends XSchema> ? XStaticIf<Stack, Root, Schema, Type> : Schema extends XEnum<infer Values extends unknown[]> ? XStaticEnum<Values> : unknown,
37
+ Schema extends XIf<infer Type extends XSchema> ? XStaticIf<Stack, Root, Schema, Type> : unknown,
38
+ Schema extends XEnum<infer Values extends unknown[]> ? XStaticEnum<Values> : unknown,
38
39
  Schema extends XItems<infer Types extends XSchema[] | XSchema> ? XStaticItems<Stack, Root, Schema, Types> : unknown,
39
40
  Schema extends XOneOf<infer Types extends XSchema[]> ? XStaticOneOf<Stack, Root, Types> : unknown,
40
41
  Schema extends XPatternProperties<infer Properties extends Record<PropertyKey, XSchema>> ? XStaticPatternProperties<Stack, Root, Properties> : unknown,
41
42
  Schema extends XPrefixItems<infer Types extends XSchema[]> ? XStaticPrefixItems<Stack, Root, Schema, Types> : unknown,
42
- Schema extends XProperties<infer Properties extends Record<PropertyKey, XSchema>> ? XStaticProperties<Stack, Root, Properties> : unknown,
43
+ Schema extends XProperties<infer Properties extends Record<PropertyKey, XSchema>> ? XStaticProperties<Stack, Root, Schema, Properties> : unknown,
43
44
  Schema extends XRef<infer Ref extends string> ? XStaticRef<Stack, Root, Ref> : unknown,
44
45
  Schema extends XRequired<infer Keys extends string[]> ? XStaticRequired<Stack, Root, Schema, Keys> : unknown,
45
46
  Schema extends XType<infer TypeName extends string[] | string> ? XStaticType<TypeName> : unknown,
@@ -1,4 +1,4 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
- import type { XNonReadonly } from './~non-readonly.mjs';
2
+ import type { XCanonical } from './~canonical.mjs';
3
3
  import type { XStaticSchema } from './schema.mjs';
4
- export type XStatic<Value extends unknown, Schema extends XSchema = Value extends XSchema ? Value : {}, NonReadonly extends XSchema = XNonReadonly<Schema>, Result extends unknown = XStaticSchema<[], NonReadonly, NonReadonly>> = Result;
4
+ export type XStatic<Value extends unknown, Schema extends XSchema = Value extends XSchema ? Value : {}, Canonical extends XSchema = XCanonical<Schema>, Result extends unknown = XStaticSchema<[], Canonical, Canonical>> = Result;
@@ -0,0 +1,7 @@
1
+ type XCanonicalTuple<Value extends readonly unknown[]> = (Value extends [infer Left, ...infer Right extends unknown[]] ? [XCanonical<Left>, ...XCanonicalTuple<Right>] : []);
2
+ type XCanonicalArray<Value extends unknown, Result extends unknown[] = XCanonical<Value>[]> = Result;
3
+ type XCanonicalObject<Value extends object, Result extends Record<PropertyKey, unknown> = {
4
+ -readonly [Key in keyof Value]: XCanonical<Value[Key]>;
5
+ }> = Result;
6
+ export type XCanonical<Schema extends unknown> = (Schema extends readonly [...infer Schemas extends unknown[]] ? XCanonicalTuple<Schemas> : Schema extends readonly (infer Schema)[] ? XCanonicalArray<Schema> : Schema extends object ? XCanonicalObject<Schema> : Schema);
7
+ export {};
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TAwaitedAction } from '../engine/awaited/instantiate.mjs';
4
4
  /** Creates a deferred Awaited action. */
5
5
  export type TAwaitedDeferred<Type extends TSchema> = (TDeferred<'Awaited', [Type]>);
6
6
  /** Creates a deferred Awaited action. */
7
7
  export declare function AwaitedDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TAwaitedDeferred<Type>;
8
8
  /** Applies an Awaited action to a type. */
9
- export type TAwaited<Type extends TSchema> = (TInstantiate<{}, TAwaitedDeferred<Type>>);
9
+ export type TAwaited<Type extends TSchema> = (TAwaitedAction<Type>);
10
10
  /** Applies an Awaited action to a type. */
11
11
  export declare function Awaited<Type extends TSchema>(type: Type, options?: TSchemaOptions): TAwaited<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { AwaitedAction } from '../engine/awaited/instantiate.mjs';
5
4
  /** Creates a deferred Awaited action. */
6
5
  export function AwaitedDeferred(type, options = {}) {
7
6
  return Deferred('Awaited', [type], options);
8
7
  }
9
8
  /** Applies an Awaited action to a type. */
10
9
  export function Awaited(type, options = {}) {
11
- return Instantiate({}, AwaitedDeferred(type, options));
10
+ return AwaitedAction(type, options);
12
11
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TCapitalizeAction } from '../engine/intrinsics/instantiate.mjs';
4
4
  /** Creates a deferred Capitalize action. */
5
5
  export type TCapitalizeDeferred<Type extends TSchema> = (TDeferred<'Capitalize', [Type]>);
6
6
  /** Creates a deferred Capitalize action. */
7
7
  export declare function CapitalizeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TCapitalizeDeferred<Type>;
8
8
  /** Applies a Capitalize action to the given type. */
9
- export type TCapitalize<Type extends TSchema> = (TInstantiate<{}, TCapitalizeDeferred<Type>>);
9
+ export type TCapitalize<Type extends TSchema> = (TCapitalizeAction<Type>);
10
10
  /** Applies a Capitalize action to the given type. */
11
11
  export declare function Capitalize<Type extends TSchema>(type: Type, options?: TSchemaOptions): TCapitalize<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { CapitalizeAction } from '../engine/intrinsics/instantiate.mjs';
5
4
  /** Creates a deferred Capitalize action. */
6
5
  export function CapitalizeDeferred(type, options = {}) {
7
6
  return Deferred('Capitalize', [type], options);
8
7
  }
9
8
  /** Applies a Capitalize action to the given type. */
10
9
  export function Capitalize(type, options = {}) {
11
- return Instantiate({}, CapitalizeDeferred(type, options));
10
+ return CapitalizeAction(type, options);
12
11
  }
@@ -1,11 +1,13 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TConditionalAction } from '../engine/conditional/instantiate.mjs';
4
4
  /** Creates a deferred Conditional action. */
5
5
  export type TConditionalDeferred<Left extends TSchema, Right extends TSchema, True extends TSchema, False extends TSchema> = (TDeferred<'Conditional', [Left, Right, True, False]>);
6
6
  /** Creates a deferred Conditional action. */
7
7
  export declare function ConditionalDeferred<Left extends TSchema, Right extends TSchema, True extends TSchema, False extends TSchema>(left: Left, right: Right, true_: True, false_: False, options?: TSchemaOptions): TConditionalDeferred<Left, Right, True, False>;
8
8
  /** Applies a Conditional action to the given types. */
9
- export type TConditional<Left extends TSchema, Right extends TSchema, True extends TSchema, False extends TSchema> = (TInstantiate<{}, TConditionalDeferred<Left, Right, True, False>>);
9
+ export type TConditional<Left extends TSchema, Right extends TSchema, True extends TSchema, False extends TSchema> = (TConditionalAction<{}, {
10
+ callstack: [];
11
+ }, Left, Right, True, False>);
10
12
  /** Applies a Conditional action to the given types. */
11
13
  export declare function Conditional<Left extends TSchema, Right extends TSchema, True extends TSchema, False extends TSchema>(left: Left, right: Right, true_: True, false_: False, options?: TSchemaOptions): TConditional<Left, Right, True, False>;
@@ -1,12 +1,12 @@
1
1
  // deno-lint-ignore-file ban-types
2
2
  // deno-fmt-ignore-file
3
3
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
4
+ import { ConditionalAction } from '../engine/conditional/instantiate.mjs';
5
5
  /** Creates a deferred Conditional action. */
6
6
  export function ConditionalDeferred(left, right, true_, false_, options = {}) {
7
7
  return Deferred('Conditional', [left, right, true_, false_], options);
8
8
  }
9
9
  /** Applies a Conditional action to the given types. */
10
10
  export function Conditional(left, right, true_, false_, options = {}) {
11
- return Instantiate({}, ConditionalDeferred(left, right, true_, false_, options));
11
+ return ConditionalAction({}, { callstack: [] }, left, right, true_, false_, options);
12
12
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TConstructorParametersAction } from '../engine/constructor-parameters/instantiate.mjs';
4
4
  /** Creates a deferred ConstructorParameters action. */
5
5
  export type TConstructorParametersDeferred<Type extends TSchema> = (TDeferred<'ConstructorParameters', [Type]>);
6
6
  /** Creates a deferred ConstructorParameters action. */
7
7
  export declare function ConstructorParametersDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TConstructorParametersDeferred<Type>;
8
8
  /** Applies a ConstructorParameters action to a type. */
9
- export type TConstructorParameters<Type extends TSchema> = (TInstantiate<{}, TConstructorParametersDeferred<Type>>);
9
+ export type TConstructorParameters<Type extends TSchema> = (TConstructorParametersAction<Type>);
10
10
  /** Applies a ConstructorParameters action to a type. */
11
11
  export declare function ConstructorParameters<Type extends TSchema>(type: Type, options?: TSchemaOptions): TConstructorParameters<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { ConstructorParametersAction } from '../engine/constructor-parameters/instantiate.mjs';
5
4
  /** Creates a deferred ConstructorParameters action. */
6
5
  export function ConstructorParametersDeferred(type, options = {}) {
7
6
  return Deferred('ConstructorParameters', [type], options);
8
7
  }
9
8
  /** Applies a ConstructorParameters action to a type. */
10
9
  export function ConstructorParameters(type, options = {}) {
11
- return Instantiate({}, ConstructorParametersDeferred(type, options));
10
+ return ConstructorParametersAction(type, options);
12
11
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TEvaluateAction } from '../engine/evaluate/instantiate.mjs';
4
4
  /** Creates a deferred Evaluate action. */
5
5
  export type TEvaluateDeferred<Type extends TSchema> = (TDeferred<'Evaluate', [Type]>);
6
6
  /** Creates a deferred Evaluate action. */
7
7
  export declare function EvaluateDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TEvaluateDeferred<Type>;
8
8
  /** Applies an Evaluate action to a type. */
9
- export type TEvaluate<Type extends TSchema> = (TInstantiate<{}, TEvaluateDeferred<Type>>);
9
+ export type TEvaluate<Type extends TSchema> = (TEvaluateAction<Type>);
10
10
  /** Applies an Evaluate action to a type. */
11
11
  export declare function Evaluate<Type extends TSchema>(type: Type, options?: TSchemaOptions): TEvaluate<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { EvaluateAction } from '../engine/evaluate/instantiate.mjs';
5
4
  /** Creates a deferred Evaluate action. */
6
5
  export function EvaluateDeferred(type, options = {}) {
7
6
  return Deferred('Evaluate', [type], options);
8
7
  }
9
8
  /** Applies an Evaluate action to a type. */
10
9
  export function Evaluate(type, options = {}) {
11
- return Instantiate({}, EvaluateDeferred(type, options));
10
+ return EvaluateAction(type, options);
12
11
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TExcludeAction } from '../engine/exclude/instantiate.mjs';
4
4
  /** Creates a deferred Exclude action. */
5
5
  export type TExcludeDeferred<Left extends TSchema, Right extends TSchema> = (TDeferred<'Exclude', [Left, Right]>);
6
6
  /** Creates a deferred Exclude action. */
7
7
  export declare function ExcludeDeferred<Left extends TSchema, Right extends TSchema>(left: Left, right: Right, options?: TSchemaOptions): TExcludeDeferred<Left, Right>;
8
8
  /** Applies a Exclude action using the given types */
9
- export type TExclude<Left extends TSchema, Right extends TSchema> = (TInstantiate<{}, TExcludeDeferred<Left, Right>>);
9
+ export type TExclude<Left extends TSchema, Right extends TSchema> = (TExcludeAction<Left, Right>);
10
10
  /** Applies a Exclude action using the given types */
11
11
  export declare function Exclude<Left extends TSchema, Right extends TSchema>(left: Left, right: Right, options?: TSchemaOptions): TExclude<Left, Right>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { ExcludeAction } from '../engine/exclude/instantiate.mjs';
5
4
  /** Creates a deferred Exclude action. */
6
5
  export function ExcludeDeferred(left, right, options = {}) {
7
6
  return Deferred('Exclude', [left, right], options);
8
7
  }
9
8
  /** Applies a Exclude action using the given types */
10
9
  export function Exclude(left, right, options = {}) {
11
- return Instantiate({}, ExcludeDeferred(left, right, options));
10
+ return ExcludeAction(left, right, options);
12
11
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TExtractAction } from '../engine/extract/instantiate.mjs';
4
4
  /** Creates a deferred Extract action. */
5
5
  export type TExtractDeferred<Left extends TSchema, Right extends TSchema> = (TDeferred<'Extract', [Left, Right]>);
6
6
  /** Creates a deferred Extract action. */
7
7
  export declare function ExtractDeferred<Left extends TSchema, Right extends TSchema>(left: Left, right: Right, options?: TSchemaOptions): TExtractDeferred<Left, Right>;
8
8
  /** Applies an Extract action using the given types. */
9
- export type TExtract<Left extends TSchema, Right extends TSchema> = (TInstantiate<{}, TExtractDeferred<Left, Right>>);
9
+ export type TExtract<Left extends TSchema, Right extends TSchema> = (TExtractAction<Left, Right>);
10
10
  /** Applies an Extract action using the given types. */
11
11
  export declare function Extract<Left extends TSchema, Right extends TSchema>(left: Left, right: Right, options?: TSchemaOptions): TExtract<Left, Right>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { ExtractAction } from '../engine/extract/instantiate.mjs';
5
4
  /** Creates a deferred Extract action. */
6
5
  export function ExtractDeferred(left, right, options = {}) {
7
6
  return Deferred('Extract', [left, right], options);
8
7
  }
9
8
  /** Applies an Extract action using the given types. */
10
9
  export function Extract(left, right, options = {}) {
11
- return Instantiate({}, ExtractDeferred(left, right, options));
10
+ return ExtractAction(left, right, options);
12
11
  }
@@ -20,7 +20,7 @@ export * from './options.mjs';
20
20
  export * from './parameters.mjs';
21
21
  export * from './partial.mjs';
22
22
  export * from './pick.mjs';
23
- export * from './readonly-type.mjs';
23
+ export * from './readonly-object.mjs';
24
24
  export * from './required.mjs';
25
25
  export * from './return-type.mjs';
26
26
  export * from './uncapitalize.mjs';
@@ -20,7 +20,7 @@ export * from './options.mjs';
20
20
  export * from './parameters.mjs';
21
21
  export * from './partial.mjs';
22
22
  export * from './pick.mjs';
23
- export * from './readonly-type.mjs';
23
+ export * from './readonly-object.mjs';
24
24
  export * from './required.mjs';
25
25
  export * from './return-type.mjs';
26
26
  export * from './uncapitalize.mjs';
@@ -1,13 +1,13 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
3
  import { type TKeysToIndexer } from '../engine/helpers/keys-to-indexer.mjs';
4
- import { type TInstantiate } from '../engine/instantiate.mjs';
4
+ import { type TIndexAction } from '../engine/indexed/instantiate.mjs';
5
5
  /** Creates a deferred Index action. */
6
6
  export type TIndexDeferred<Type extends TSchema, Indexer extends TSchema> = (TDeferred<'Index', [Type, Indexer]>);
7
7
  /** Creates a deferred Index action. */
8
8
  export declare function IndexDeferred<Type extends TSchema, Indexer extends TSchema>(type: Type, indexer: Indexer, options?: TSchemaOptions): TIndexDeferred<Type, Indexer>;
9
9
  /** Applies a Index action using the given types. */
10
- export type TIndex<Type extends TSchema, Indexer extends TSchema> = (TInstantiate<{}, TIndexDeferred<Type, Indexer>>);
10
+ export type TIndex<Type extends TSchema, Indexer extends TSchema> = (TIndexAction<Type, Indexer>);
11
11
  /** Applies a Index action using the given types. */
12
12
  export declare function Index<Type extends TSchema, Indexer extends PropertyKey[]>(type: Type, indexer: readonly [...Indexer], options?: TSchemaOptions): TIndex<Type, TKeysToIndexer<Indexer>>;
13
13
  /** Applies a Index action using the given types. */
@@ -1,9 +1,8 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Guard } from '../../guard/index.mjs';
4
3
  import { Deferred } from '../types/deferred.mjs';
5
4
  import { KeysToIndexer } from '../engine/helpers/keys-to-indexer.mjs';
6
- import { Instantiate } from '../engine/instantiate.mjs';
5
+ import { IndexAction } from '../engine/indexed/instantiate.mjs';
7
6
  /** Creates a deferred Index action. */
8
7
  export function IndexDeferred(type, indexer, options = {}) {
9
8
  return Deferred('Index', [type, indexer], options);
@@ -11,5 +10,5 @@ export function IndexDeferred(type, indexer, options = {}) {
11
10
  /** Applies a Index action using the given types. */
12
11
  export function Index(type, indexer_or_keys, options = {}) {
13
12
  const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
14
- return Instantiate({}, IndexDeferred(type, indexer, options));
13
+ return IndexAction(type, indexer, options);
15
14
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TInstanceTypeAction } from '../engine/instance-type/instantiate.mjs';
4
4
  /** Creates a deferred InstanceType action. */
5
5
  export type TInstanceTypeDeferred<Type extends TSchema> = (TDeferred<'InstanceType', [Type]>);
6
6
  /** Creates a deferred InstanceType action. */
7
7
  export declare function InstanceTypeDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TInstanceTypeDeferred<Type>;
8
8
  /** Applies a InstanceType action to the given type. */
9
- export type TInstanceType<Type extends TSchema> = (TInstantiate<{}, TInstanceTypeDeferred<Type>>);
9
+ export type TInstanceType<Type extends TSchema> = (TInstanceTypeAction<Type>);
10
10
  /** Applies a InstanceType action to the given type. */
11
11
  export declare function InstanceType<Type extends TSchema>(type: Type, options?: TSchemaOptions): TInstanceType<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { InstanceTypeAction } from '../engine/instance-type/instantiate.mjs';
5
4
  /** Creates a deferred InstanceType action. */
6
5
  export function InstanceTypeDeferred(type, options = {}) {
7
6
  return Deferred('InstanceType', [type], options);
8
7
  }
9
8
  /** Applies a InstanceType action to the given type. */
10
9
  export function InstanceType(type, options = {}) {
11
- return Instantiate({}, InstanceTypeDeferred(type, options));
10
+ return InstanceTypeAction(type, options);
12
11
  }
@@ -1,7 +1,7 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TProperties } from '../types/properties.mjs';
3
3
  import { type TDeferred } from '../types/deferred.mjs';
4
- import { type TInstantiate } from '../engine/instantiate.mjs';
4
+ import { type TInterfaceAction } from '../engine/interface/instantiate.mjs';
5
5
  /** Creates a deferred Interface action. */
6
6
  export type TInterfaceDeferred<Heritage extends TSchema[] = TSchema[], Properties extends TProperties = TProperties> = (TDeferred<'Interface', [Heritage, Properties]>);
7
7
  /** Creates a deferred Interface action. */
@@ -9,6 +9,6 @@ export declare function InterfaceDeferred<Heritage extends TSchema[], Properties
9
9
  /** Returns true if this value is a deferred Interface action. */
10
10
  export declare function IsInterfaceDeferred(value: unknown): value is TInterfaceDeferred;
11
11
  /** Creates an Interface using the given heritage and properties. */
12
- export type TInterface<Heritage extends TSchema[], Properties extends TProperties> = (TInstantiate<{}, TInterfaceDeferred<Heritage, Properties>>);
12
+ export type TInterface<Heritage extends TSchema[], Properties extends TProperties> = (TInterfaceAction<Heritage, Properties>);
13
13
  /** Creates an Interface using the given heritage and properties. */
14
14
  export declare function Interface<Heritage extends TSchema[], Properties extends TProperties>(heritage: [...Heritage], properties: Properties, options?: TSchemaOptions): TInterface<Heritage, Properties>;
@@ -1,13 +1,15 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Guard } from '../../guard/index.mjs';
4
3
  import { IsSchema } from '../types/schema.mjs';
5
4
  import { Deferred } from '../types/deferred.mjs';
6
- import { Instantiate } from '../engine/instantiate.mjs';
5
+ import { InterfaceAction } from '../engine/interface/instantiate.mjs';
7
6
  /** Creates a deferred Interface action. */
8
7
  export function InterfaceDeferred(heritage, properties, options = {}) {
9
8
  return Deferred('Interface', [heritage, properties], options);
10
9
  }
10
+ // ------------------------------------------------------------------
11
+ // Guard
12
+ // ------------------------------------------------------------------
11
13
  /** Returns true if this value is a deferred Interface action. */
12
14
  export function IsInterfaceDeferred(value) {
13
15
  return IsSchema(value)
@@ -16,5 +18,5 @@ export function IsInterfaceDeferred(value) {
16
18
  }
17
19
  /** Creates an Interface using the given heritage and properties. */
18
20
  export function Interface(heritage, properties, options = {}) {
19
- return Instantiate({}, InterfaceDeferred(heritage, properties, options));
21
+ return InterfaceAction(heritage, properties, options);
20
22
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TKeyOfAction } from '../engine/keyof/instantiate.mjs';
4
4
  /** Creates a deferred KeyOf action. */
5
5
  export type TKeyOfDeferred<Type extends TSchema> = (TDeferred<'KeyOf', [Type]>);
6
6
  /** Creates a deferred KeyOf action. */
7
7
  export declare function KeyOfDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TKeyOfDeferred<Type>;
8
8
  /** Applies a KeyOf action to the given type. */
9
- export type TKeyOf<Type extends TSchema> = (TInstantiate<{}, TKeyOfDeferred<Type>>);
9
+ export type TKeyOf<Type extends TSchema> = (TKeyOfAction<Type>);
10
10
  /** Applies a KeyOf action to the given type. */
11
11
  export declare function KeyOf<Type extends TSchema>(type: Type, options?: TSchemaOptions): TKeyOf<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { KeyOfAction } from '../engine/keyof/instantiate.mjs';
5
4
  /** Creates a deferred KeyOf action. */
6
5
  export function KeyOfDeferred(type, options = {}) {
7
6
  return Deferred('KeyOf', [type], options);
8
7
  }
9
8
  /** Applies a KeyOf action to the given type. */
10
9
  export function KeyOf(type, options = {}) {
11
- return Instantiate({}, KeyOfDeferred(type, options));
10
+ return KeyOfAction(type, options);
12
11
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TLowercaseAction } from '../engine/intrinsics/instantiate.mjs';
4
4
  /** Creates a deferred Lowercase action. */
5
5
  export type TLowercaseDeferred<Type extends TSchema> = (TDeferred<'Lowercase', [Type]>);
6
6
  /** Creates a deferred Lowercase action. */
7
7
  export declare function LowercaseDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TLowercaseDeferred<Type>;
8
8
  /** Applies a Lowercase action to the given type. */
9
- export type TLowercase<Type extends TSchema> = (TInstantiate<{}, TLowercaseDeferred<Type>>);
9
+ export type TLowercase<Type extends TSchema> = (TLowercaseAction<Type>);
10
10
  /** Applies a Lowercase action to the given type. */
11
11
  export declare function Lowercase<Type extends TSchema>(type: Type, options?: TSchemaOptions): TLowercase<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { LowercaseAction } from '../engine/intrinsics/instantiate.mjs';
5
4
  /** Creates a deferred Lowercase action. */
6
5
  export function LowercaseDeferred(type, options = {}) {
7
6
  return Deferred('Lowercase', [type], options);
8
7
  }
9
8
  /** Applies a Lowercase action to the given type. */
10
9
  export function Lowercase(type, options = {}) {
11
- return Instantiate({}, LowercaseDeferred(type, options));
10
+ return LowercaseAction(type, options);
12
11
  }
@@ -1,12 +1,14 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TIdentifier } from '../types/identifier.mjs';
3
3
  import { type TDeferred } from '../types/deferred.mjs';
4
- import { type TInstantiate } from '../engine/instantiate.mjs';
4
+ import { type TMappedAction } from '../engine/mapped/instantiate.mjs';
5
5
  /** Creates a deferred Mapped action. */
6
6
  export type TMappedDeferred<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema> = (TDeferred<'Mapped', [Identifier, Type, As, Property]>);
7
7
  /** Creates a deferred Mapped action. */
8
8
  export declare function MappedDeferred<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema>(identifier: Identifier, type: Type, as: As, property: Property, options?: TSchemaOptions): TMappedDeferred<Identifier, Type, As, Property>;
9
9
  /** Applies a Mapped action using the given types. */
10
- export type TMapped<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema> = (TInstantiate<{}, TMappedDeferred<Identifier, Type, As, Property>>);
10
+ export type TMapped<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema> = (TMappedAction<{}, {
11
+ callstack: [];
12
+ }, Identifier, Type, As, Property>);
11
13
  /** Applies a Mapped action using the given types. */
12
14
  export declare function Mapped<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema>(identifier: Identifier, type: Type, as: As, property: Property, options?: TSchemaOptions): TMapped<Identifier, Type, As, Property>;
@@ -1,12 +1,12 @@
1
1
  // deno-lint-ignore-file ban-types
2
2
  // deno-fmt-ignore-file
3
3
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
4
+ import { MappedAction } from '../engine/mapped/instantiate.mjs';
5
5
  /** Creates a deferred Mapped action. */
6
6
  export function MappedDeferred(identifier, type, as, property, options = {}) {
7
7
  return Deferred('Mapped', [identifier, type, as, property], options);
8
8
  }
9
9
  /** Applies a Mapped action using the given types. */
10
10
  export function Mapped(identifier, type, as, property, options = {}) {
11
- return Instantiate({}, MappedDeferred(identifier, type, as, property, options));
11
+ return MappedAction({}, { callstack: [] }, identifier, type, as, property, options);
12
12
  }
@@ -1,11 +1,11 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
- import { type TInstantiate } from '../engine/instantiate.mjs';
3
+ import { type TNonNullableAction } from '../engine/non-nullable/instantiate.mjs';
4
4
  /** Creates a deferred NonNullable action. */
5
5
  export type TNonNullableDeferred<Type extends TSchema> = (TDeferred<'NonNullable', [Type]>);
6
6
  /** Creates a deferred NonNullable action. */
7
7
  export declare function NonNullableDeferred<Type extends TSchema>(type: Type, options?: TSchemaOptions): TNonNullableDeferred<Type>;
8
8
  /** Applies a NonNullable action to the given type. */
9
- export type TNonNullable<Type extends TSchema> = (TInstantiate<{}, TNonNullableDeferred<Type>>);
9
+ export type TNonNullable<Type extends TSchema> = (TNonNullableAction<Type>);
10
10
  /** Applies a NonNullable action to the given type. */
11
11
  export declare function NonNullable<Type extends TSchema>(type: Type, options?: TSchemaOptions): TNonNullable<Type>;
@@ -1,12 +1,11 @@
1
- // deno-lint-ignore-file ban-types
2
1
  // deno-fmt-ignore-file
3
2
  import { Deferred } from '../types/deferred.mjs';
4
- import { Instantiate } from '../engine/instantiate.mjs';
3
+ import { NonNullableAction } from '../engine/non-nullable/instantiate.mjs';
5
4
  /** Creates a deferred NonNullable action. */
6
5
  export function NonNullableDeferred(type, options = {}) {
7
6
  return Deferred('NonNullable', [type], options);
8
7
  }
9
8
  /** Applies a NonNullable action to the given type. */
10
9
  export function NonNullable(type, options = {}) {
11
- return Instantiate({}, NonNullableDeferred(type, options));
10
+ return NonNullableAction(type, options);
12
11
  }
@@ -1,13 +1,13 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
2
2
  import { type TDeferred } from '../types/deferred.mjs';
3
3
  import { type TKeysToIndexer } from '../engine/helpers/keys-to-indexer.mjs';
4
- import { type TInstantiate } from '../engine/instantiate.mjs';
4
+ import { type TOmitAction } from '../engine/omit/instantiate.mjs';
5
5
  /** Creates a deferred Omit action. */
6
6
  export type TOmitDeferred<Type extends TSchema, Indexer extends TSchema> = (TDeferred<'Omit', [Type, Indexer]>);
7
7
  /** Creates a deferred Omit action. */
8
8
  export declare function OmitDeferred<Type extends TSchema, Indexer extends TSchema>(type: Type, indexer: Indexer, options?: TSchemaOptions): TOmitDeferred<Type, Indexer>;
9
9
  /** Applies a Omit action using the given types. */
10
- export type TOmit<Type extends TSchema, Indexer extends TSchema> = (TInstantiate<{}, TOmitDeferred<Type, Indexer>>);
10
+ export type TOmit<Type extends TSchema, Indexer extends TSchema> = (TOmitAction<Type, Indexer>);
11
11
  /** Applies a Omit action using the given types. */
12
12
  export declare function Omit<Type extends TSchema, Indexer extends PropertyKey[]>(type: Type, indexer: readonly [...Indexer], options?: TSchemaOptions): TOmit<Type, TKeysToIndexer<Indexer>>;
13
13
  /** Applies a Omit action using the given types. */