@duckmind/dm-darwin-arm64 0.36.8 → 0.37.0

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 (73) hide show
  1. package/dm +0 -0
  2. package/extensions/dm-subagents/package-lock.json +7 -7
  3. package/extensions/dm-tasks/node_modules/.package-lock.json +3 -3
  4. package/extensions/dm-tasks/node_modules/typebox/build/format/uuid.d.mts +2 -2
  5. package/extensions/dm-tasks/node_modules/typebox/build/format/uuid.mjs +3 -3
  6. package/extensions/dm-tasks/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  7. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  8. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  9. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  10. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  11. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  12. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  13. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  14. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  15. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  16. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  17. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  18. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  19. package/extensions/dm-tasks/node_modules/typebox/build/type/action/index.d.mts +6 -2
  20. package/extensions/dm-tasks/node_modules/typebox/build/type/action/index.mjs +6 -2
  21. package/extensions/dm-tasks/node_modules/typebox/build/type/action/module.d.mts +8 -7
  22. package/extensions/dm-tasks/node_modules/typebox/build/type/action/module.mjs +7 -6
  23. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  24. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  25. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  26. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  27. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  28. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  29. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/instantiate.d.mts +33 -16
  30. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/instantiate.mjs +61 -61
  31. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -7
  32. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/module/instantiate.mjs +16 -15
  33. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  34. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  35. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  36. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  37. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  38. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  39. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  40. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  41. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  42. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  43. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  44. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  45. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  46. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  47. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  48. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  49. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  50. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  51. package/extensions/dm-tasks/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  52. package/extensions/dm-tasks/node_modules/typebox/build/type/script/mapping.d.mts +68 -64
  53. package/extensions/dm-tasks/node_modules/typebox/build/type/script/mapping.mjs +64 -58
  54. package/extensions/dm-tasks/node_modules/typebox/build/type/script/parser.d.mts +29 -25
  55. package/extensions/dm-tasks/node_modules/typebox/build/type/script/parser.mjs +15 -13
  56. package/extensions/dm-tasks/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  57. package/extensions/dm-tasks/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  58. package/extensions/dm-tasks/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  59. package/extensions/dm-tasks/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  60. package/extensions/dm-tasks/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  61. package/extensions/dm-tasks/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  62. package/extensions/dm-tasks/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  63. package/extensions/dm-tasks/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  64. package/extensions/dm-tasks/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  65. package/extensions/dm-tasks/node_modules/typebox/package.json +25 -25
  66. package/extensions/dm-tasks/node_modules/typebox/readme.md +45 -62
  67. package/extensions/dm-tasks/package-lock.json +10 -10
  68. package/extensions/dm-ultradex/package-lock.json +13 -13
  69. package/package.json +1 -1
  70. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  71. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  72. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  73. package/extensions/dm-tasks/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
@@ -42,7 +42,7 @@ export type TIndexArray_0<Input extends string, Result extends unknown[] = []> =
42
42
  export type TIndexArray<Input extends string> = TIndexArray_0<Input> extends [infer _0 extends ([unknown, unknown, unknown] | [unknown, unknown])[], infer Input extends string] ? [S.TIndexArrayMapping<_0>, Input] : [];
43
43
  export type TExtends<Input extends string> = ((Token.TConst<'extends', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExtendsMapping<_0>, Input] : [];
44
44
  export type TBase<Input extends string> = ((Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUndefined<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordInteger<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUnknown<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordAny<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNever<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordSymbol<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordVoid<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordThis<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTemplateLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TDependent<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Object_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Tuple_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Constructor_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Function_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Mapped_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericCall<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0>, Input] : [];
45
- export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (TJsonObject<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TWithMapping<_0>, Input] : [];
45
+ export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (TWithObject<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TWithMapping<_0>, Input] : [];
46
46
  export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? (TWith<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
47
47
  export type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> extends [infer _0, infer Input extends string] ? (TFactor<Input> extends [infer _1, infer Input extends string] ? (TExprTermTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTermTailMapping<_0>, Input] : [];
48
48
  export type TExprTerm<Input extends string> = (TFactor<Input> extends [infer _0, infer Input extends string] ? (TExprTermTail<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TExprTermMapping<_0>, Input] : [];
@@ -90,18 +90,20 @@ export type TMappedOptional<Input extends string> = ((Token.TConst<'+', Input> e
90
90
  export type TMappedAs<Input extends string> = ((Token.TConst<'as', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TMappedAsMapping<_0>, Input] : [];
91
91
  export type T_Mapped_<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TMappedReadonly<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'[', Input> extends [infer _2, infer Input extends string] ? (Token.TIdent<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'in', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? (TMappedAs<Input> extends [infer _6, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _7, infer Input extends string] ? (TMappedOptional<Input> extends [infer _8, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _9, infer Input extends string] ? (TType<Input> extends [infer _10, infer Input extends string] ? (TOptionalSemiColon<Input> extends [infer _11, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _12, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], Input] : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.T_Mapped_Mapping<_0>, Input] : [];
92
92
  export type TReference<Input extends string> = Token.TIdent<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TReferenceMapping<_0>, Input] : [];
93
- export type TJsonNumber<Input extends string> = Token.TNumber<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TJsonNumberMapping<_0>, Input] : [];
94
- export type TJsonBoolean<Input extends string> = (Token.TConst<'true', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Token.TConst<'false', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends 'true' | 'false', infer Input extends string] ? [S.TJsonBooleanMapping<_0>, Input] : [];
95
- export type TJsonString<Input extends string> = Token.TString<['\"', '\''], Input> extends [infer _0 extends string, infer Input extends string] ? [S.TJsonStringMapping<_0>, Input] : [];
96
- export type TJsonNull<Input extends string> = Token.TConst<'null', Input> extends [infer _0 extends 'null', infer Input extends string] ? [S.TJsonNullMapping<_0>, Input] : [];
97
- export type TJsonProperty<Input extends string> = (TPropertyKey<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _1, infer Input extends string] ? (TJson<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TJsonPropertyMapping<_0>, Input] : [];
98
- export type TJsonPropertyList_0<Input extends string, Result extends unknown[] = []> = (TJsonProperty<Input> extends [infer _0, infer Input extends string] ? (TPropertyDelimiter<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TJsonPropertyList_0<Input, [...Result, _0]> : [Result, Input];
99
- export type TJsonPropertyList<Input extends string> = (TJsonPropertyList_0<Input> extends [infer _0, infer Input extends string] ? (((TJsonProperty<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TJsonPropertyListMapping<_0>, Input] : [];
100
- export type TJsonObject<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TJsonPropertyList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TJsonObjectMapping<_0>, Input] : [];
101
- export type TJsonElementList_0<Input extends string, Result extends unknown[] = []> = (TJson<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TJsonElementList_0<Input, [...Result, _0]> : [Result, Input];
102
- export type TJsonElementList<Input extends string> = (TJsonElementList_0<Input> extends [infer _0, infer Input extends string] ? (((TJson<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TJsonElementListMapping<_0>, Input] : [];
103
- export type TJsonArray<Input extends string> = (Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (TJsonElementList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TJsonArrayMapping<_0>, Input] : [];
104
- export type TJson<Input extends string> = (TJsonNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TJsonBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TJsonString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TJsonNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TJsonObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TJsonArray<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TJsonMapping<_0>, Input] : [];
93
+ export type TWithBigInt<Input extends string> = Token.TBigInt<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TWithBigIntMapping<_0>, Input] : [];
94
+ export type TWithNumber<Input extends string> = Token.TNumber<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TWithNumberMapping<_0>, Input] : [];
95
+ export type TWithBoolean<Input extends string> = (Token.TConst<'true', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Token.TConst<'false', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends 'true' | 'false', infer Input extends string] ? [S.TWithBooleanMapping<_0>, Input] : [];
96
+ export type TWithString<Input extends string> = Token.TString<['\"', '\''], Input> extends [infer _0 extends string, infer Input extends string] ? [S.TWithStringMapping<_0>, Input] : [];
97
+ export type TWithNull<Input extends string> = Token.TConst<'null', Input> extends [infer _0 extends 'null', infer Input extends string] ? [S.TWithNullMapping<_0>, Input] : [];
98
+ export type TWithUndefined<Input extends string> = Token.TConst<'undefined', Input> extends [infer _0 extends 'undefined', infer Input extends string] ? [S.TWithUndefinedMapping<_0>, Input] : [];
99
+ export type TWithProperty<Input extends string> = (TPropertyKey<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _1, infer Input extends string] ? (TWithValue<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TWithPropertyMapping<_0>, Input] : [];
100
+ export type TWithPropertyList_0<Input extends string, Result extends unknown[] = []> = (TWithProperty<Input> extends [infer _0, infer Input extends string] ? (TPropertyDelimiter<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TWithPropertyList_0<Input, [...Result, _0]> : [Result, Input];
101
+ export type TWithPropertyList<Input extends string> = (TWithPropertyList_0<Input> extends [infer _0, infer Input extends string] ? (((TWithProperty<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TWithPropertyListMapping<_0>, Input] : [];
102
+ export type TWithObject<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TWithPropertyList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TWithObjectMapping<_0>, Input] : [];
103
+ export type TWithElementList_0<Input extends string, Result extends unknown[] = []> = (TWithValue<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TWithElementList_0<Input, [...Result, _0]> : [Result, Input];
104
+ export type TWithElementList<Input extends string> = (TWithElementList_0<Input> extends [infer _0, infer Input extends string] ? (((TWithValue<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TWithElementListMapping<_0>, Input] : [];
105
+ export type TWithArray<Input extends string> = (Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (TWithElementList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TWithArrayMapping<_0>, Input] : [];
106
+ export type TWithValue<Input extends string> = (TWithBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithUndefined<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithArray<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TWithValueMapping<_0>, Input] : [];
105
107
  export type TPatternBigInt<Input extends string> = Token.TConst<'-?(?:0|[1-9][0-9]*)n', Input> extends [infer _0 extends '-?(?:0|[1-9][0-9]*)n', infer Input extends string] ? [S.TPatternBigIntMapping<_0>, Input] : [];
106
108
  export type TPatternString<Input extends string> = Token.TConst<'.*', Input> extends [infer _0 extends '.*', infer Input extends string] ? [S.TPatternStringMapping<_0>, Input] : [];
107
109
  export type TPatternNumber<Input extends string> = Token.TConst<'-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?', Input> extends [infer _0 extends '-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?', infer Input extends string] ? [S.TPatternNumberMapping<_0>, Input] : [];
@@ -218,18 +220,20 @@ export declare const MappedOptional: (input: string) => [unknown, string] | [];
218
220
  export declare const MappedAs: (input: string) => [unknown, string] | [];
219
221
  export declare const _Mapped_: (input: string) => [unknown, string] | [];
220
222
  export declare const Reference: (input: string) => [unknown, string] | [];
221
- export declare const JsonNumber: (input: string) => [unknown, string] | [];
222
- export declare const JsonBoolean: (input: string) => [unknown, string] | [];
223
- export declare const JsonString: (input: string) => [unknown, string] | [];
224
- export declare const JsonNull: (input: string) => [unknown, string] | [];
225
- export declare const JsonProperty: (input: string) => [unknown, string] | [];
226
- export declare const JsonPropertyList_0: (input: string, result?: unknown[]) => [unknown[], string];
227
- export declare const JsonPropertyList: (input: string) => [unknown, string] | [];
228
- export declare const JsonObject: (input: string) => [unknown, string] | [];
229
- export declare const JsonElementList_0: (input: string, result?: unknown[]) => [unknown[], string];
230
- export declare const JsonElementList: (input: string) => [unknown, string] | [];
231
- export declare const JsonArray: (input: string) => [unknown, string] | [];
232
- export declare const Json: (input: string) => [unknown, string] | [];
223
+ export declare const WithBigInt: (input: string) => [unknown, string] | [];
224
+ export declare const WithNumber: (input: string) => [unknown, string] | [];
225
+ export declare const WithBoolean: (input: string) => [unknown, string] | [];
226
+ export declare const WithString: (input: string) => [unknown, string] | [];
227
+ export declare const WithNull: (input: string) => [unknown, string] | [];
228
+ export declare const WithUndefined: (input: string) => [unknown, string] | [];
229
+ export declare const WithProperty: (input: string) => [unknown, string] | [];
230
+ export declare const WithPropertyList_0: (input: string, result?: unknown[]) => [unknown[], string];
231
+ export declare const WithPropertyList: (input: string) => [unknown, string] | [];
232
+ export declare const WithObject: (input: string) => [unknown, string] | [];
233
+ export declare const WithElementList_0: (input: string, result?: unknown[]) => [unknown[], string];
234
+ export declare const WithElementList: (input: string) => [unknown, string] | [];
235
+ export declare const WithArray: (input: string) => [unknown, string] | [];
236
+ export declare const WithValue: (input: string) => [unknown, string] | [];
233
237
  export declare const PatternBigInt: (input: string) => [unknown, string] | [];
234
238
  export declare const PatternString: (input: string) => [unknown, string] | [];
235
239
  export declare const PatternNumber: (input: string) => [unknown, string] | [];
@@ -46,7 +46,7 @@ export const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', in
46
46
  export const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);
47
47
  export const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);
48
48
  export const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(_Tuple_(input), ([_0, input]) => [_0, input], () => If(_Constructor_(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(_Mapped_(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);
49
- export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(JsonObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);
49
+ export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(WithObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);
50
50
  export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);
51
51
  export const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);
52
52
  export const ExprTerm = (input) => If(If(Factor(input), ([_0, input]) => If(ExprTermTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0), input]);
@@ -94,18 +94,20 @@ export const MappedOptional = (input) => If(If(If(Token.Const('+', input), ([_0,
94
94
  export const MappedAs = (input) => If(If(If(Token.Const('as', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.MappedAsMapping(_0), input]);
95
95
  export const _Mapped_ = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Token.Const('[', input), ([_2, input]) => If(Token.Ident(input), ([_3, input]) => If(Token.Const('in', input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Token.Const(']', input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Token.Const(':', input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Token.Const('}', input), ([_12, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input]))))))))))))), ([_0, input]) => [S._Mapped_Mapping(_0), input]);
96
96
  export const Reference = (input) => If(Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0), input]);
97
- export const JsonNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.JsonNumberMapping(_0), input]);
98
- export const JsonBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.JsonBooleanMapping(_0), input]);
99
- export const JsonString = (input) => If(Token.String(['\"', '\''], input), ([_0, input]) => [S.JsonStringMapping(_0), input]);
100
- export const JsonNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.JsonNullMapping(_0), input]);
101
- export const JsonProperty = (input) => If(If(PropertyKey(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Json(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.JsonPropertyMapping(_0), input]);
102
- export const JsonPropertyList_0 = (input, result = []) => If(If(JsonProperty(input), ([_0, input]) => If(PropertyDelimiter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => JsonPropertyList_0(input, [...result, _0]), () => [result, input]);
103
- export const JsonPropertyList = (input) => If(If(JsonPropertyList_0(input), ([_0, input]) => If(If(If(JsonProperty(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.JsonPropertyListMapping(_0), input]);
104
- export const JsonObject = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(JsonPropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.JsonObjectMapping(_0), input]);
105
- export const JsonElementList_0 = (input, result = []) => If(If(Json(input), ([_0, input]) => If(Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => JsonElementList_0(input, [...result, _0]), () => [result, input]);
106
- export const JsonElementList = (input) => If(If(JsonElementList_0(input), ([_0, input]) => If(If(If(Json(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.JsonElementListMapping(_0), input]);
107
- export const JsonArray = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(JsonElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.JsonArrayMapping(_0), input]);
108
- export const Json = (input) => If(If(JsonNumber(input), ([_0, input]) => [_0, input], () => If(JsonBoolean(input), ([_0, input]) => [_0, input], () => If(JsonString(input), ([_0, input]) => [_0, input], () => If(JsonNull(input), ([_0, input]) => [_0, input], () => If(JsonObject(input), ([_0, input]) => [_0, input], () => If(JsonArray(input), ([_0, input]) => [_0, input], () => [])))))), ([_0, input]) => [S.JsonMapping(_0), input]);
97
+ export const WithBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.WithBigIntMapping(_0), input]);
98
+ export const WithNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.WithNumberMapping(_0), input]);
99
+ export const WithBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithBooleanMapping(_0), input]);
100
+ export const WithString = (input) => If(Token.String(['\"', '\''], input), ([_0, input]) => [S.WithStringMapping(_0), input]);
101
+ export const WithNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.WithNullMapping(_0), input]);
102
+ export const WithUndefined = (input) => If(Token.Const('undefined', input), ([_0, input]) => [S.WithUndefinedMapping(_0), input]);
103
+ export const WithProperty = (input) => If(If(PropertyKey(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(WithValue(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithPropertyMapping(_0), input]);
104
+ export const WithPropertyList_0 = (input, result = []) => If(If(WithProperty(input), ([_0, input]) => If(PropertyDelimiter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithPropertyList_0(input, [...result, _0]), () => [result, input]);
105
+ export const WithPropertyList = (input) => If(If(WithPropertyList_0(input), ([_0, input]) => If(If(If(WithProperty(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.WithPropertyListMapping(_0), input]);
106
+ export const WithObject = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(WithPropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithObjectMapping(_0), input]);
107
+ export const WithElementList_0 = (input, result = []) => If(If(WithValue(input), ([_0, input]) => If(Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithElementList_0(input, [...result, _0]), () => [result, input]);
108
+ export const WithElementList = (input) => If(If(WithElementList_0(input), ([_0, input]) => If(If(If(WithValue(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.WithElementListMapping(_0), input]);
109
+ export const WithArray = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(WithElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithArrayMapping(_0), input]);
110
+ export const WithValue = (input) => If(If(WithBigInt(input), ([_0, input]) => [_0, input], () => If(WithNumber(input), ([_0, input]) => [_0, input], () => If(WithBoolean(input), ([_0, input]) => [_0, input], () => If(WithString(input), ([_0, input]) => [_0, input], () => If(WithNull(input), ([_0, input]) => [_0, input], () => If(WithUndefined(input), ([_0, input]) => [_0, input], () => If(WithObject(input), ([_0, input]) => [_0, input], () => If(WithArray(input), ([_0, input]) => [_0, input], () => [])))))))), ([_0, input]) => [S.WithValueMapping(_0), input]);
109
111
  export const PatternBigInt = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)n', input), ([_0, input]) => [S.PatternBigIntMapping(_0), input]);
110
112
  export const PatternString = (input) => If(Token.Const('.*', input), ([_0, input]) => [S.PatternStringMapping(_0), input]);
111
113
  export const PatternNumber = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?', input), ([_0, input]) => [S.PatternNumberMapping(_0), input]);
@@ -1,16 +1,9 @@
1
1
  import { type TSchema } from './schema.mjs';
2
- /** Removes Immutable from the given type. */
3
- export type TImmutableRemove<Type extends TSchema, Result extends TSchema = Type extends TImmutable<infer Type extends TSchema> ? Type : Type> = Result;
4
- /** Removes Immutable from the given type. */
5
- export declare function ImmutableRemove<Type extends TSchema>(type: Type): TImmutableRemove<Type>;
6
- /** Adds Immutable to the given type. */
7
- export type TImmutableAdd<Type extends TSchema = TSchema> = ('~immutable' extends keyof Type ? Type : TImmutable<Type>);
8
- /** Adds Immutable to the given type. */
9
- export declare function ImmutableAdd<Type extends TSchema>(type: Type): TImmutableAdd<Type>;
2
+ import { type TAddImmutable } from '../action/_add_immutable.mjs';
10
3
  export type TImmutable<Type extends TSchema = TSchema> = (Type & {
11
4
  '~immutable': true;
12
5
  });
13
6
  /** Applies an Immutable modifier to the given type. */
14
- export declare function Immutable<Type extends TSchema>(type: Type): TImmutableAdd<Type>;
7
+ export declare function Immutable<Type extends TSchema>(type: Type): TAddImmutable<Type>;
15
8
  /** Returns true if the given value is a TImmutable */
16
9
  export declare function IsImmutable(value: unknown): value is TImmutable<TSchema>;
@@ -1,21 +1,13 @@
1
1
  // deno-fmt-ignore-file
2
- import { Memory } from '../../system/memory/index.mjs';
3
2
  import { Guard } from '../../guard/index.mjs';
4
3
  import { IsSchema } from './schema.mjs';
5
- /** Removes Immutable from the given type. */
6
- export function ImmutableRemove(type) {
7
- return Memory.Discard(type, ['~immutable']);
8
- }
9
- /** Adds Immutable to the given type. */
10
- export function ImmutableAdd(type) {
11
- return Memory.Update(type, { '~immutable': true }, {});
12
- }
4
+ import { AddImmutable } from '../action/_add_immutable.mjs';
13
5
  // ------------------------------------------------------------------
14
6
  // Factory
15
7
  // ------------------------------------------------------------------
16
8
  /** Applies an Immutable modifier to the given type. */
17
9
  export function Immutable(type) {
18
- return ImmutableAdd(type);
10
+ return AddImmutable(type);
19
11
  }
20
12
  // ------------------------------------------------------------------
21
13
  // Guard
@@ -1,16 +1,9 @@
1
1
  import { type TSchema } from './schema.mjs';
2
- /** Removes Optional from the given type. */
3
- export type TOptionalRemove<Type extends TSchema, Result extends TSchema = Type extends TOptional<infer Type extends TSchema> ? Type : Type> = Result;
4
- /** Removes Optional from the given type. */
5
- export declare function OptionalRemove<Type extends TSchema>(type: Type): TOptionalRemove<Type>;
6
- /** Adds Optional to the given type. */
7
- export type TOptionalAdd<Type extends TSchema = TSchema, Result extends TSchema = '~optional' extends keyof Type ? Type : TOptional<Type>> = Result;
8
- /** Adds Optional to the given type. */
9
- export declare function OptionalAdd<Type extends TSchema>(type: Type): TOptionalAdd<Type>;
2
+ import { type TAddOptional } from '../action/_add_optional.mjs';
10
3
  export type TOptional<Type extends TSchema = TSchema> = (Type & {
11
4
  '~optional': true;
12
5
  });
13
6
  /** Applies an Optional modifier to the given type. */
14
- export declare function Optional<Type extends TSchema>(type: Type): TOptionalAdd<Type>;
7
+ export declare function Optional<Type extends TSchema>(type: Type): TAddOptional<Type>;
15
8
  /** Returns true if the given value is TOptional */
16
9
  export declare function IsOptional(value: unknown): value is TOptional<TSchema>;
@@ -1,22 +1,13 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { Memory } from '../../system/memory/index.mjs';
4
3
  import { IsSchema } from './schema.mjs';
5
- /** Removes Optional from the given type. */
6
- export function OptionalRemove(type) {
7
- const result = Memory.Discard(type, ['~optional']);
8
- return result;
9
- }
10
- /** Adds Optional to the given type. */
11
- export function OptionalAdd(type) {
12
- return Memory.Update(type, { '~optional': true }, {});
13
- }
4
+ import { AddOptional } from '../action/_add_optional.mjs';
14
5
  // ------------------------------------------------------------------
15
6
  // Factory
16
7
  // ------------------------------------------------------------------
17
8
  /** Applies an Optional modifier to the given type. */
18
9
  export function Optional(type) {
19
- return OptionalAdd(type);
10
+ return AddOptional(type);
20
11
  }
21
12
  // ------------------------------------------------------------------
22
13
  // Guard
@@ -1,16 +1,9 @@
1
1
  import { type TSchema } from './schema.mjs';
2
- /** Removes a Readonly property modifier from the given type. */
3
- export type TReadonlyRemove<Type extends TSchema, Result extends TSchema = Type extends TReadonly<infer Type extends TSchema> ? Type : Type> = Result;
4
- /** Removes a Readonly property modifier from the given type. */
5
- export declare function ReadonlyRemove<Type extends TSchema>(type: Type): TReadonlyRemove<Type>;
6
- /** Adds a Readonly property modifier to the given type. */
7
- export type TReadonlyAdd<Type extends TSchema = TSchema> = ('~readonly' extends keyof Type ? Type : TReadonly<Type>);
8
- /** Adds a Readonly property modifier to the given type. */
9
- export declare function ReadonlyAdd<Type extends TSchema>(type: Type): TReadonlyAdd<Type>;
2
+ import { type TAddReadonly } from '../action/_add_readonly.mjs';
10
3
  export type TReadonly<Type extends TSchema = TSchema> = (Type & {
11
4
  '~readonly': true;
12
5
  });
13
6
  /** Applies an Readonly property modifier to the given type. */
14
- export declare function Readonly<Type extends TSchema>(type: Type): TReadonlyAdd<Type>;
7
+ export declare function Readonly<Type extends TSchema>(type: Type): TAddReadonly<Type>;
15
8
  /** Returns true if the given value is a TReadonly */
16
9
  export declare function IsReadonly(value: unknown): value is TReadonly<TSchema>;
@@ -1,21 +1,13 @@
1
1
  // deno-fmt-ignore-file
2
- import { Memory } from '../../system/memory/index.mjs';
3
2
  import { Guard } from '../../guard/index.mjs';
4
3
  import { IsSchema } from './schema.mjs';
5
- /** Removes a Readonly property modifier from the given type. */
6
- export function ReadonlyRemove(type) {
7
- return Memory.Discard(type, ['~readonly']);
8
- }
9
- /** Adds a Readonly property modifier to the given type. */
10
- export function ReadonlyAdd(type) {
11
- return Memory.Update(type, { '~readonly': true }, {});
12
- }
4
+ import { AddReadonly } from '../action/_add_readonly.mjs';
13
5
  // ------------------------------------------------------------------
14
6
  // Factory
15
7
  // ------------------------------------------------------------------
16
8
  /** Applies an Readonly property modifier to the given type. */
17
9
  export function Readonly(type) {
18
- return ReadonlyAdd(type);
10
+ return AddReadonly(type);
19
11
  }
20
12
  // ------------------------------------------------------------------
21
13
  // Guard
@@ -2,6 +2,7 @@ import { type TSchema, type TSchemaOptions } from './schema.mjs';
2
2
  /** Represents a deferred action. */
3
3
  export interface TDeferred<Action extends string = string, Types extends TSchema[] = TSchema[]> extends TSchema {
4
4
  '~kind': 'Deferred';
5
+ type: 'deferred';
5
6
  action: Action;
6
7
  parameters: Types;
7
8
  options: TSchemaOptions;
@@ -5,7 +5,7 @@ import { IsKind } from './schema.mjs';
5
5
  // ------------------------------------------------------------------
6
6
  /** Creates a Deferred action. */
7
7
  export function Deferred(action, parameters, options) {
8
- return Memory.Create({ '~kind': 'Deferred' }, { action, parameters, options }, {});
8
+ return Memory.Create({ '~kind': 'Deferred' }, { type: 'deferred', action, parameters, options }, {});
9
9
  }
10
10
  // ------------------------------------------------------------------
11
11
  // Guard
@@ -17,7 +17,7 @@ export function FromObject(context, type, value) {
17
17
  if (isUnassignableUndefined)
18
18
  continue;
19
19
  // Assign
20
- value[key] = FromType(context, type.properties[key], value[key]);
20
+ value[key] = propertyValue;
21
21
  }
22
22
  // return if not additional properties
23
23
  if (!IsAdditionalProperties(type) || Guard.IsBoolean(type.additionalProperties))
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.2.3",
4
+ "version": "1.2.8",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
@@ -16,34 +16,34 @@
16
16
  "types": "./build/index.d.mts",
17
17
  "module": "./build/index.mjs",
18
18
  "exports": {
19
- "./format": {
20
- "import": "./build/format/index.mjs",
21
- "default": "./build/format/index.mjs"
19
+ "./guard": {
20
+ "import": "./build/guard/index.mjs",
21
+ "default": "./build/guard/index.mjs"
22
22
  },
23
- "./type": {
24
- "import": "./build/type/index.mjs",
25
- "default": "./build/type/index.mjs"
23
+ "./system": {
24
+ "import": "./build/system/index.mjs",
25
+ "default": "./build/system/index.mjs"
26
26
  },
27
27
  "./schema": {
28
28
  "import": "./build/schema/index.mjs",
29
29
  "default": "./build/schema/index.mjs"
30
30
  },
31
+ "./format": {
32
+ "import": "./build/format/index.mjs",
33
+ "default": "./build/format/index.mjs"
34
+ },
31
35
  "./compile": {
32
36
  "import": "./build/compile/index.mjs",
33
37
  "default": "./build/compile/index.mjs"
34
38
  },
39
+ "./type": {
40
+ "import": "./build/type/index.mjs",
41
+ "default": "./build/type/index.mjs"
42
+ },
35
43
  "./value": {
36
44
  "import": "./build/value/index.mjs",
37
45
  "default": "./build/value/index.mjs"
38
46
  },
39
- "./guard": {
40
- "import": "./build/guard/index.mjs",
41
- "default": "./build/guard/index.mjs"
42
- },
43
- "./system": {
44
- "import": "./build/system/index.mjs",
45
- "default": "./build/system/index.mjs"
46
- },
47
47
  "./error": {
48
48
  "import": "./build/error/index.mjs",
49
49
  "default": "./build/error/index.mjs"
@@ -55,27 +55,27 @@
55
55
  },
56
56
  "typesVersions": {
57
57
  "*": {
58
- "format": [
59
- "./build/format/index.d.mts"
58
+ "guard": [
59
+ "./build/guard/index.d.mts"
60
60
  ],
61
- "type": [
62
- "./build/type/index.d.mts"
61
+ "system": [
62
+ "./build/system/index.d.mts"
63
63
  ],
64
64
  "schema": [
65
65
  "./build/schema/index.d.mts"
66
66
  ],
67
+ "format": [
68
+ "./build/format/index.d.mts"
69
+ ],
67
70
  "compile": [
68
71
  "./build/compile/index.d.mts"
69
72
  ],
73
+ "type": [
74
+ "./build/type/index.d.mts"
75
+ ],
70
76
  "value": [
71
77
  "./build/value/index.d.mts"
72
78
  ],
73
- "guard": [
74
- "./build/guard/index.d.mts"
75
- ],
76
- "system": [
77
- "./build/system/index.d.mts"
78
- ],
79
79
  "error": [
80
80
  "./build/error/index.d.mts"
81
81
  ],
@@ -73,7 +73,7 @@ License: MIT
73
73
 
74
74
  TypeBox types are JSON Schema fragments that compose into more complex types. The library offers a set of types used to construct JSON Schema compliant schematics as well as a set of extended types used to model constructs native to the JavaScript language. The schematics produced by TypeBox can be passed directly to any JSON Schema compliant validator.
75
75
 
76
- ## Example
76
+ ### Example
77
77
 
78
78
  The following creates a User type and infers with Static.
79
79
 
@@ -111,78 +111,61 @@ type User = Type.Static<typeof User> // type User = {
111
111
 
112
112
  ## Script
113
113
 
114
- [Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFonmXW32POvueHb6AygGMowMDH6Ne0mbLnNqQiADsAzvADecAKqrUUADQ69UbWAAmAQxjoAvnAC8iIgDpho8QAoABtThxgZRsoDEshdABRIOBCOA1Kf39gcwAuOHVRZQBzBLhbPwCg-VDw4304VDIbZXNVOCiYGKQ4uFz-ZUsQVDSMwKyjNoqQS2AAGx6YTKzW-3zcwjQy0wtrdCcIgDdLUYBXVYAeQYAFYCEAa33dfSMz1CQIDHrowgA+OAAyGcSjy1hgbf2AHkQDFLiYbncHk9Gq8Xrk4ZRvABKah0KTyDGYzGSABKqAwo1QQgkaKxZPJvEUKlUEEJLlGECyniuUCRiXZHM5XK5aPi3P5AsFgrR-gW3XwEGIACsiTA8AZBkKlcrOSK4GBsGg-qhVGk+SqDYa1UlUi0xWk8L1sng8grDfblca4B0unq4Ob8FasjbbHaHf7+U7UMMxm6PZbJn0fYqA7G4GrfTG4-61VBUABHHbANOmgDaSeT9qdeGS8q+hdjxZdqDLBYrKuLwZGoyo9cr9H8AF0622hWi5ko1LTUPTGcyTGYrDY2YXeT3ewK1eHJTLifL5wvuWqNRAtY0dXqN5vVR3Eskw0QLV6fX7jw3T+1OuKtOHr7aj3fEkGQ+MzZfPZG1p5B+n7xqeiagY6p5ppm2aoHmJbmHg3aQUq-aovQFJYdhLCSAIMDWKckg4SRFLUGKSyOM4aBuARjRCPsYpQiybxofQFEslR+qocKp7nukgH9CBoFqtWExTLePGBqeTahgJUzCZ+6GUBxE4rDYVHIDR+GEQxTGPCyk6rKxaKqfoRkaU43FSVufGml6kk2SeiTVgA-OJfSOU57JqrJozufJfSKXe6FAA) | [Example 2](https://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFonmXW32POvnb7k1ejbsJGj21AMYQAdgGd4AUWkxghOAF5ERAHQBJZaigYAhhNQAKANoBdADRwA3pThxgAEwBcWtNoDKMKGBpAHNzAEpKAF8Iyik5eABVWUMNb1Q9AyNTC0slFUI7R2c4aWMQVC9+dP9AkPDbYtQQY2AAG0qdGqDQiOjJGXk4JMMEsDdjGHRNKu0FADdjVoBXCYsZ-UmoZIkYK2KZgAVgCQBrc2GoexmAaVQkAHkMczzVJDCwhpdD41hgRfMZvcQKpzslLmltLcHk8XoR3hFrO9qHQhGI0eiMdxBAAlVAYVqoHaCTEk0mY-pyCAE7StCChC5hFxM5ks1lslkopzs7k83m8lEuQhoLx4CDEABWhJgeE+fLl8u5ArgYGwaF+qFkXi5Cp1uqVLncWrgQoq+HktWCeDgkVlurtfP1JTKpocxqIIvN3StNuK9r97MdTRa7UcbuFZoCXutvv9saZSp9caTLiVUFQAEclsA0544JYY8m-Y68O4ZXAC4W7cXSuUyxXKzri0G2lQG-6ldZ6225SjIhTZFT0rT6WDRuNJozk5yu93+fRBe78GLJTsZTPZ4r58rVYYVBqteuN2zHYbQyaPZGQt7bUee1uXDWXWHTXhPVfrTfb3OWc2Q67zxGFreoeX7xluiagQ6W5ppm2aoLmlglm4eCdpBUHRsSZJYdhnCCP4EzHJhOHEcR1AmkMYKpDM+EqBIAA8JoQBgFGGAAfPKKLkRcqTamhPJKqeb7BJ+fGskqj5eEJImicySq-pJl7BCBaG9mRRAsVAY6rFRnQwAR9GMcxFxaZM7FwJx6nGWM2maLxMliVugmKdJ9nmVuj4APwKRaLn2XJzRtF5cBCcpkG9kAA)
114
+ [Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFonmXW32POv3b7k0AdAGUAxlGBgYACjwC5eAJS9G3VWvXdqdOADkAhiFQBnMHpGpKIiADsj8ALJ6YACzgBeREWFiJ0gAaUcHCEaHAAaqgiMNAATO5wAN5wZABccNYAriDEqFAANHBIaZnZuXAAvoHBROGR0VAAzPEAogBuegA2GU6oADwRUbFwAGSJcABexVk5UBUAfFUh6AP1ACwt7V09-XXQTaNJAO5TpbPlC35KygAiqGjWACao1vD6hiZmFla28En2xq5yvF+KhvOJJFIknIBI4XBUCn4gosahFYKgyPEElUgpAjMAYMAbGkVtBVnlseloCBOsTdo1yUEghlWrTBlAYlVKkElnAAOKoHCoGBQJCYimtXIE8xGWlosgAbQAugzGcBHsBpScZkrOcjQrDcsBOmLGXADMRgM8YKy1iqgg9gBgMBkjKgbaS7XATJEMh09FB3VBVrruTV-kZXB4saaAOYCwzCop8+NCkWe6kwQ00uAG8SdXWXLT0ABKGReoHQxdQGA6dUJ1ko4ecAjA2DQsEtRgEccFiZbbclnYEEo70oE+NQIC7rYg7YJxhbEDxBJs-dng4XZEbALXc6HPYTIt3G67I6lC4nU+PHYX1ipnWv867W6bj-3Kb7M73C7PGovmavL8TwEZk303bcIzArsMyzDooIEB0nRdUEgJvZ8IObVCnwEGC8zgrCh3NS0Xngl8dwIhdcKNfCBzQgRvREX1-VIos4CEGAnA1OAAElrAwXJnnMShnWsKJ6zgKBnieKApHeZw0hBYQOKlXolggDAcwBOYFESKo5O7D8j1-aV5QABkVRdl3rAQtyCfSD1TJBh0HEzzIEO8oGpODbLgezDKc4zjDMizQJ8-SqIfRDnVdGy9J3CK4KIq1Yrs+Kejw+i0EYv0oFi8ogA) | [Example 2](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFonmXW32POv3b7k0AdACpejbuImTu1OnAByAQxCoAzmAUBjVJQB2S1eq1wAsgpgALOAG9KcOKjKRYcDRB0r4ANVQaY0AExwALyIRAIA8sQAVj4wABRWcGQAXKGCcgCuIMSoUHEAlAA0cEip-KgCmdm5BXAAvvm29o7Q8K7uXrHQAMzBaRUAogBuCgA2GWaoceUCAJI6MLkqsXEA2t6+AcUzkTG+CXAAXmVhVTl5+fX5ALr5jXYOTm1uHnAbflAALH0zw2MTi2mYXmiygy326y6UG62zCuxWiQA7id0llzrUGrdGnUZPQACKoNA6AAmqAW8n0ak02nar28sAcPzh0QRTUgKmAMGAblSpgsAne0E+hSaOmgIDGvLM5gFUJhTQyQyl-MFUH8lAalFp8AA4qgcKgYFAkEzBPD9jY7ENclytCoURUAIJQKAKJBxemLMhFJrAEnAO0OgTO13umZnGp3DWNbUmSZQYBjU0Vc3xS1wJTEYBkmDKmWq4VNYnADAYDLLPOyzZfEV2NQ+DKjBRQSsF6Nal7wYyqSwhHYsi1NADm+uURtKcD1BvHtbgEtBidGytyi-bogAShkFqB0OvUBhRrFuTpKN2VDKwNg0LBsyoBCPp8aBJeINeuaoBNab3aBJzUCA7xfN9b2fCAOS5NxnyvG0QLIU8eyg18YI-B8xyfIDkLvL9bQ-P8AMQ4CPzFKAJVGAjMIEOCzwvaCbxQ0dDXQ2j3ywmCfzwwDmJAxVyLou8qIQjC+IEecVzGXiWIEYtS3LCohMkgTzwkkDRITcT5JAzNswWZSP0UmikOE1TF10u96w0Rtm1MyjcTgABlGAzADOB5gwXIyS0Sgyx0XxjzgKAyVJPJlHPIMHKcjQAB5CDQCAMBMHsAD5LnTEKZVQxikE-NjVFWAAGa5QPA48bLsNL7wY8dsu-XKCoEYjSNKucEIyqrsIDWrCp4uCyoQ4zxOkstlia8r+rIrScxGvr4xM8zLKgGy6iAA)
115
115
 
116
- TypeBox includes a micro DSL for composing JSON Schema with TypeScript syntax. The DSL offers a full syntactic frontend to Type.* and supports many advanced type-level constructs such as Conditional, Mapped, Indexed, Infer, Generics, Distributed types and more. This feature is implemented symmetrically at runtime and statically via TypeScript Template Literal types.
116
+ TypeBox includes a syntax engine that can transform TypeScript declarations into JSON Schema. The engine is a full syntactic frontend to Type.* and supports many advanced type-level constructs such as Conditional, Mapped, Indexed, Infer, Generics, Distributed types and more. This feature is implemented symmetrically at runtime and statically via TypeScript Template Literal types.
117
117
 
118
118
  ### Example
119
119
 
120
- The following uses Script to parse a TypeScript definition module into JSON Schema.
120
+ The following uses Script to parse TypeScript declarations into JSON Schema.
121
121
 
122
122
  ```typescript
123
- import Type from 'typebox'
124
-
125
- // Script
126
-
127
- const { User, UserUpdate } = Type.Script(`
123
+ // Namespace
124
+ const Math = Type.Script(`
125
+ type Vector2 = { x: number, y: number }
126
+ type Vector3 = Evaluate<Vector2 & { z: number }>
127
+ type Vector4 = Evaluate<Vector3 & { w: number }>
128
+ `)
128
129
 
129
- interface Entity {
130
- id: string
130
+ // Dependent Namespace
131
+ const { Mesh } = Type.Script({ ...Math }, `
132
+ type Vertex = {
133
+ position: Vector4,
134
+ normal: Vector3,
135
+ uv: Vector2
131
136
  }
132
-
133
- interface User extends Entity {
134
- name: string,
135
- email: string
137
+ type Geometry = {
138
+ vertices: Vertex[],
139
+ indices: number[]
140
+ }
141
+ type Material = {
142
+ ambient: Vector4,
143
+ diffuse: Vector4,
144
+ specular: Vector4
145
+ }
146
+ type Mesh = {
147
+ geometry: Geometry,
148
+ material: Material
136
149
  }
137
-
138
- type UserUpdate = Evaluate<
139
- Pick<User, keyof Entity> &
140
- Partial<Omit<User, keyof Entity>>
141
- >
142
-
143
150
  `)
144
151
 
145
- // Reflect
146
-
147
- console.log(User) // {
148
- // type: 'object',
149
- // properties: {
150
- // id: { type: 'string' },
151
- // name: { type: 'string' },
152
- // email: { type: 'string' }
153
- // },
154
- // required: [
155
- // 'id',
156
- // 'name',
157
- // 'email'
158
- // ]
159
- // }
160
-
161
- console.log(UserUpdate) // {
162
- // type: 'object',
163
- // properties: {
164
- // id: { type: 'string' },
165
- // name: { type: 'string' },
166
- // email: { type: 'string' }
167
- // },
168
- // required: ['id']
169
- // }
170
-
171
- // Static
172
-
173
- type User = Type.Static<typeof User> // type User = {
174
- // id: string,
175
- // name: string,
176
- // email: string
177
- // }
178
-
179
- type UserUpdate = Type.Static<typeof UserUpdate> // type UserUpdate = {
180
- // id: string,
181
- // name?: string,
182
- // email?: string
183
- // }
184
-
185
-
152
+ // Runtime Reflection
153
+ Mesh.properties.geometry.properties.vertices.items.properties.position.properties.x
154
+ Mesh.properties.geometry.properties.vertices.items.properties.normal.properties.x
155
+ Mesh.properties.geometry.properties.vertices.items.properties.uv.properties.x
156
+ Mesh.properties.material.properties.diffuse.properties.x
157
+ Mesh.properties.material.properties.ambient.properties.x
158
+ Mesh.properties.material.properties.specular.properties.x
159
+
160
+ // Static Inference
161
+ function render(mesh: Type.Static<typeof Mesh>) {
162
+ mesh.geometry.vertices[0].position.x
163
+ mesh.geometry.vertices[0].normal.x
164
+ mesh.geometry.vertices[0].uv.x
165
+ mesh.material.diffuse.x
166
+ mesh.material.ambient.x
167
+ mesh.material.specular.x
168
+ }
186
169
  ```
187
170
 
188
171
  <a name="Schema"></a>