@wecode-ai/weibo-openclaw-plugin 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +16 -0
- package/index.d.ts.map +1 -0
- package/index.js +62 -0
- package/index.js.map +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/compiler/compiler.d.ts +55 -0
- package/node_modules/@sinclair/typebox/build/cjs/compiler/compiler.js +670 -0
- package/node_modules/@sinclair/typebox/build/cjs/compiler/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/compiler/index.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/errors/errors.d.ts +91 -0
- package/node_modules/@sinclair/typebox/build/cjs/errors/errors.js +599 -0
- package/node_modules/@sinclair/typebox/build/cjs/errors/function.d.ts +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/errors/function.js +153 -0
- package/node_modules/@sinclair/typebox/build/cjs/errors/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/errors/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/index.d.ts +71 -0
- package/node_modules/@sinclair/typebox/build/cjs/index.js +97 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/index.js +39 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/guard.d.ts +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/guard.js +86 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/index.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/index.js +45 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/module.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/module.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/parse.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/parse.js +160 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/token.d.ts +8 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/token.js +230 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/types.d.ts +98 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/runtime/types.js +71 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/index.js +43 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/parse.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/parse.js +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/token.d.ts +108 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/token.js +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/types.d.ts +69 -0
- package/node_modules/@sinclair/typebox/build/cjs/parser/static/types.js +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/mapping.d.ts +167 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/mapping.js +491 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/parser.d.ts +162 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/parser.js +191 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/syntax.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/syntax/syntax.js +54 -0
- package/node_modules/@sinclair/typebox/build/cjs/system/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/system/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/system/policy.d.ts +29 -0
- package/node_modules/@sinclair/typebox/build/cjs/system/policy.js +58 -0
- package/node_modules/@sinclair/typebox/build/cjs/system/system.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/system/system.js +43 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/any/any.d.ts +8 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/any/any.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/any/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/any/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/argument/argument.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/argument/argument.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/argument/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/argument/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/array/array.d.ts +28 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/array/array.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/array/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/array/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/async-iterator/async-iterator.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/async-iterator/async-iterator.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/async-iterator/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/async-iterator/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/awaited/awaited.d.ts +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/awaited/awaited.js +41 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/awaited/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/awaited/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/bigint/bigint.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/bigint/bigint.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/bigint/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/bigint/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/boolean/boolean.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/boolean/boolean.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/boolean/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/boolean/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/clone/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/clone/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/clone/type.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/clone/type.js +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/clone/value.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/clone/value.js +73 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/composite/composite.d.ts +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/composite/composite.js +46 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/composite/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/composite/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/computed/computed.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/computed/computed.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/computed/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/computed/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/const/const.d.ts +27 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/const/const.js +58 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/const/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/const/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor/constructor.d.ts +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor/constructor.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor-parameters/constructor-parameters.d.ts +7 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor-parameters/constructor-parameters.js +44 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor-parameters/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/constructor-parameters/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/create/immutable.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/create/immutable.js +70 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/create/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/create/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/create/type.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/create/type.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/date/date.d.ts +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/date/date.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/date/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/date/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/discard/discard.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/discard/discard.js +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/discard/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/discard/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/enum/enum.d.ts +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/enum/enum.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/enum/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/enum/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/error/error.d.ts +4 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/error/error.js +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/error/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/error/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/exclude-from-mapped-result.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/exclude-from-mapped-result.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/exclude-from-template-literal.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/exclude-from-template-literal.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/exclude.d.ts +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/exclude.js +29 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/exclude/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-check.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-check.js +641 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-from-mapped-key.d.ts +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-from-mapped-key.js +29 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-from-mapped-result.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-from-mapped-result.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-undefined.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends-undefined.js +24 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/extends.js +27 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/index.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extends/index.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/extract-from-mapped-result.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/extract-from-mapped-result.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/extract-from-template-literal.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/extract-from-template-literal.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/extract.d.ts +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/extract.js +29 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/extract/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/function/function.d.ts +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/function/function.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/function/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/function/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/index.js +40 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/kind.d.ts +147 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/kind.js +320 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/type.d.ts +152 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/type.js +597 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/value.d.ts +34 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/guard/value.js +89 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/helpers/helpers.d.ts +42 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/helpers/helpers.js +8 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/helpers/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/helpers/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/index.d.ts +71 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/index.js +88 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/index.d.ts +4 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/index.js +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed-from-mapped-key.d.ts +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed-from-mapped-key.js +26 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed-from-mapped-result.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed-from-mapped-result.js +24 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed-property-keys.d.ts +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed-property-keys.js +36 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed.d.ts +52 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/indexed/indexed.js +98 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instance-type/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instance-type/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instance-type/instance-type.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instance-type/instance-type.js +44 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instantiate/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instantiate/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instantiate/instantiate.d.ts +50 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/instantiate/instantiate.js +153 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/integer/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/integer/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/integer/integer.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/integer/integer.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect-create.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect-create.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect-evaluated.d.ts +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect-evaluated.js +42 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect-type.d.ts +15 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect-type.js +4 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intersect/intersect.js +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/capitalize.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/capitalize.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/index.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/index.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/intrinsic-from-mapped-key.d.ts +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/intrinsic-from-mapped-key.js +30 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/intrinsic.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/intrinsic.js +68 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/lowercase.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/lowercase.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/uncapitalize.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/uncapitalize.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/uppercase.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/uppercase.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/iterator/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/iterator/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/iterator/iterator.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/iterator/iterator.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/index.d.ts +4 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/index.js +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof-from-mapped-result.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof-from-mapped-result.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof-property-entries.d.ts +7 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof-property-entries.js +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof-property-keys.d.ts +24 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof-property-keys.js +78 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof.d.ts +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/keyof/keyof.js +40 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/literal/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/literal/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/literal/literal.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/literal/literal.js +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/mapped-key.d.ts +8 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/mapped-key.js +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/mapped-result.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/mapped-result.js +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/mapped.d.ts +47 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/mapped/mapped.js +107 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/compute.d.ts +59 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/compute.js +205 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/infer.d.ts +49 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/infer.js +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/module.d.ts +27 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/module/module.js +38 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/never/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/never/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/never/never.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/never/never.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/not/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/not/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/not/not.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/not/not.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/null/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/null/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/null/null.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/null/null.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/number/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/number/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/number/number.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/number/number.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/object/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/object/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/object/object.d.ts +51 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/object/object.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/omit-from-mapped-key.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/omit-from-mapped-key.js +26 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/omit-from-mapped-result.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/omit-from-mapped-result.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/omit.d.ts +36 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/omit/omit.js +75 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/optional/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/optional/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/optional/optional-from-mapped-result.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/optional/optional-from-mapped-result.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/optional/optional.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/optional/optional.js +26 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/parameters/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/parameters/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/parameters/parameters.d.ts +7 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/parameters/parameters.js +44 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/partial/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/partial/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/partial/partial-from-mapped-result.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/partial/partial-from-mapped-result.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/partial/partial.d.ts +35 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/partial/partial.js +111 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/patterns/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/patterns/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/patterns/patterns.d.ts +8 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/patterns/patterns.js +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/pick-from-mapped-key.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/pick-from-mapped-key.js +28 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/pick-from-mapped-result.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/pick-from-mapped-result.js +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/pick.d.ts +36 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/pick/pick.js +70 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/promise/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/promise/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/promise/promise.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/promise/promise.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly/readonly-from-mapped-result.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly/readonly-from-mapped-result.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly/readonly.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly/readonly.js +26 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly-optional/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly-optional/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly-optional/readonly-optional.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/readonly-optional/readonly-optional.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/record/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/record/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/record/record.d.ts +71 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/record/record.js +123 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/recursive/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/recursive/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/recursive/recursive.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/recursive/recursive.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/ref/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/ref/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/ref/ref.d.ts +41 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/ref/ref.js +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/regexp/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/regexp/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/regexp/regexp.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/regexp/regexp.js +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/registry/format.d.ts +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/registry/format.js +35 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/registry/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/registry/index.js +39 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/registry/type.d.ts +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/registry/type.js +35 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/required/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/required/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/required/required-from-mapped-result.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/required/required-from-mapped-result.js +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/required/required.d.ts +35 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/required/required.js +110 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/rest/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/rest/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/rest/rest.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/rest/rest.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/return-type/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/return-type/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/return-type/return-type.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/return-type/return-type.js +44 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/schema/anyschema.d.ts +33 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/schema/anyschema.js +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/schema/index.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/schema/index.js +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/schema/schema.d.ts +29 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/schema/schema.js +4 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/sets/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/sets/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/sets/set.d.ts +28 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/sets/set.js +59 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/static/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/static/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/static/static.d.ts +39 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/static/static.js +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/string/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/string/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/string/string.d.ts +25 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/string/string.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbol/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbol/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbol/symbol.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbol/symbol.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbols/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbols/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbols/symbols.d.ts +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/symbols/symbols.js +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/finite.d.ts +19 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/finite.js +56 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/generate.d.ts +21 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/generate.js +60 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/index.d.ts +7 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/index.js +24 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/parse.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/parse.js +174 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/pattern.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/pattern.js +39 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/syntax.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/syntax.js +59 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/template-literal.d.ts +30 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/template-literal.js +17 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/union.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/template-literal/union.js +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/transform/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/transform/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/transform/transform.d.ts +30 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/transform/transform.js +47 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/tuple/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/tuple/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/tuple/tuple.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/tuple/tuple.js +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/index.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/index.js +51 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/javascript.d.ts +64 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/javascript.js +104 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/json.d.ts +208 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/json.js +226 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/type.d.ts +59 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/type/type.js +129 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/uint8array/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/uint8array/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/uint8array/uint8array.d.ts +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/uint8array/uint8array.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/undefined/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/undefined/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/undefined/undefined.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/undefined/undefined.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union-create.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union-create.js +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union-evaluated.d.ts +13 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union-evaluated.js +40 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union-type.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union-type.js +4 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/union/union.js +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unknown/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unknown/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unknown/unknown.d.ts +8 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unknown/unknown.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unsafe/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unsafe/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unsafe/unsafe.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/unsafe/unsafe.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/void/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/void/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/void/void.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/type/void/void.js +10 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/assert/assert.d.ts +15 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/assert/assert.js +55 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/assert/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/assert/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/cast/cast.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/cast/cast.js +241 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/cast/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/cast/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/check/check.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/check/check.js +476 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/check/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/check/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clean/clean.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clean/clean.js +149 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clean/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clean/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clone/clone.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clone/clone.js +60 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clone/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/clone/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/convert/convert.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/convert/convert.js +264 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/convert/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/convert/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/create/create.d.ts +11 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/create/create.js +474 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/create/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/create/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/decode/decode.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/decode/decode.js +14 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/decode/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/decode/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/default/default.d.ts +5 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/default/default.js +176 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/default/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/default/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/delta/delta.d.ts +32 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/delta/delta.js +178 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/delta/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/delta/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/deref/deref.d.ts +12 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/deref/deref.js +36 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/deref/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/deref/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/encode/encode.d.ts +6 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/encode/encode.js +15 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/encode/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/encode/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/equal/equal.d.ts +2 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/equal/equal.js +50 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/equal/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/equal/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/guard/guard.d.ts +74 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/guard/guard.js +195 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/guard/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/guard/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/hash/hash.d.ts +7 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/hash/hash.js +152 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/hash/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/hash/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/index.d.ts +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/index.js +53 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/mutate/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/mutate/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/mutate/mutate.d.ts +9 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/mutate/mutate.js +104 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/parse/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/parse/index.js +18 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/parse/parse.d.ts +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/parse/parse.js +87 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/pointer/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/pointer/index.js +38 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/pointer/pointer.d.ts +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/pointer/pointer.js +126 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/decode.d.ts +22 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/decode.js +214 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/encode.d.ts +23 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/encode.js +225 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/has.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/has.js +133 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/index.d.ts +3 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/transform/index.js +20 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/value/index.d.ts +1 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/value/index.js +38 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/value/value.d.ts +16 -0
- package/node_modules/@sinclair/typebox/build/cjs/value/value/value.js +39 -0
- package/node_modules/@sinclair/typebox/build/esm/compiler/compiler.d.mts +55 -0
- package/node_modules/@sinclair/typebox/build/esm/compiler/compiler.mjs +663 -0
- package/node_modules/@sinclair/typebox/build/esm/compiler/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/compiler/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/errors/errors.d.mts +91 -0
- package/node_modules/@sinclair/typebox/build/esm/errors/errors.mjs +592 -0
- package/node_modules/@sinclair/typebox/build/esm/errors/function.d.mts +21 -0
- package/node_modules/@sinclair/typebox/build/esm/errors/function.mjs +147 -0
- package/node_modules/@sinclair/typebox/build/esm/errors/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/errors/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/index.d.mts +71 -0
- package/node_modules/@sinclair/typebox/build/esm/index.mjs +80 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/guard.d.mts +23 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/guard.mjs +72 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/index.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/index.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/module.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/module.mjs +17 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/parse.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/parse.mjs +123 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/token.d.mts +8 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/token.mjs +223 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/types.d.mts +98 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/runtime/types.mjs +55 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/parse.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/parse.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/token.d.mts +108 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/token.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/types.d.mts +69 -0
- package/node_modules/@sinclair/typebox/build/esm/parser/static/types.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/mapping.d.mts +167 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/mapping.mjs +386 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/parser.d.mts +162 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/parser.mjs +78 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/syntax.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/syntax/syntax.mjs +16 -0
- package/node_modules/@sinclair/typebox/build/esm/system/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/system/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/system/policy.d.mts +29 -0
- package/node_modules/@sinclair/typebox/build/esm/system/policy.mjs +54 -0
- package/node_modules/@sinclair/typebox/build/esm/system/system.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/system/system.mjs +37 -0
- package/node_modules/@sinclair/typebox/build/esm/type/any/any.d.mts +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/any/any.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/any/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/any/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/argument/argument.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/argument/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/argument/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/array/array.d.mts +28 -0
- package/node_modules/@sinclair/typebox/build/esm/type/array/array.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/array/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/array/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/async-iterator/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/async-iterator/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.d.mts +14 -0
- package/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs +37 -0
- package/node_modules/@sinclair/typebox/build/esm/type/awaited/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/awaited/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/bigint/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/bigint/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/boolean/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/boolean/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/clone/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/clone/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/clone/type.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/clone/value.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs +36 -0
- package/node_modules/@sinclair/typebox/build/esm/type/composite/composite.d.mts +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs +42 -0
- package/node_modules/@sinclair/typebox/build/esm/type/composite/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/composite/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/computed/computed.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/computed/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/computed/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/const/const.d.mts +27 -0
- package/node_modules/@sinclair/typebox/build/esm/type/const/const.mjs +54 -0
- package/node_modules/@sinclair/typebox/build/esm/type/const/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/const/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.d.mts +23 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.d.mts +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/create/immutable.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs +33 -0
- package/node_modules/@sinclair/typebox/build/esm/type/create/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/create/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/create/type.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/create/type.mjs +15 -0
- package/node_modules/@sinclair/typebox/build/esm/type/date/date.d.mts +21 -0
- package/node_modules/@sinclair/typebox/build/esm/type/date/date.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/date/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/date/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/discard/discard.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/discard/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/discard/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/enum/enum.d.mts +14 -0
- package/node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/enum/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/enum/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/error/error.d.mts +4 -0
- package/node_modules/@sinclair/typebox/build/esm/type/error/error.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/error/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/error/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.d.mts +21 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs +25 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/exclude/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs +635 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.d.mts +14 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs +25 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.mjs +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs +23 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/index.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extends/index.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/extract.d.mts +21 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs +25 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/extract/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/function/function.d.mts +23 -0
- package/node_modules/@sinclair/typebox/build/esm/type/function/function.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/function/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/function/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/kind.d.mts +147 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs +235 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/type.d.mts +152 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs +509 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/value.d.mts +34 -0
- package/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs +70 -0
- package/node_modules/@sinclair/typebox/build/esm/type/helpers/helpers.d.mts +42 -0
- package/node_modules/@sinclair/typebox/build/esm/type/helpers/helpers.mjs +4 -0
- package/node_modules/@sinclair/typebox/build/esm/type/helpers/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/helpers/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/index.d.mts +71 -0
- package/node_modules/@sinclair/typebox/build/esm/type/index.mjs +71 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/index.d.mts +4 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/index.mjs +4 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.d.mts +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs +22 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.d.mts +14 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs +32 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.d.mts +52 -0
- package/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs +91 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instance-type/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instance-type/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instantiate/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instantiate/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.d.mts +50 -0
- package/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs +115 -0
- package/node_modules/@sinclair/typebox/build/esm/type/integer/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/integer/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/integer/integer.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.d.mts +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs +38 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-type.d.mts +15 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-type.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs +17 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/index.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/index.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.d.mts +14 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs +26 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs +64 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/iterator/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/iterator/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/index.d.mts +4 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/index.mjs +4 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.d.mts +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.mjs +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.d.mts +24 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs +73 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.d.mts +21 -0
- package/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs +35 -0
- package/node_modules/@sinclair/typebox/build/esm/type/literal/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/literal/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/literal/literal.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-key.d.mts +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-key.mjs +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.d.mts +47 -0
- package/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs +102 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/compute.d.mts +59 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs +166 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/infer.d.mts +49 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/infer.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/module.d.mts +27 -0
- package/node_modules/@sinclair/typebox/build/esm/type/module/module.mjs +32 -0
- package/node_modules/@sinclair/typebox/build/esm/type/never/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/never/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/never/never.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/not/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/not/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/not/not.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/not/not.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/null/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/null/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/null/null.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/null/null.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/number/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/number/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/number/number.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/number/number.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/object/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/object/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/object/object.d.mts +51 -0
- package/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs +22 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/omit.d.mts +36 -0
- package/node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs +71 -0
- package/node_modules/@sinclair/typebox/build/esm/type/optional/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/optional/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/optional/optional.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs +22 -0
- package/node_modules/@sinclair/typebox/build/esm/type/parameters/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/parameters/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.d.mts +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/partial/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/partial/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/partial/partial.d.mts +35 -0
- package/node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs +74 -0
- package/node_modules/@sinclair/typebox/build/esm/type/patterns/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/patterns/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.d.mts +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs +24 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/pick.d.mts +36 -0
- package/node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs +66 -0
- package/node_modules/@sinclair/typebox/build/esm/type/promise/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/promise/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/promise/promise.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs +22 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/record/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/record/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/record/record.d.mts +71 -0
- package/node_modules/@sinclair/typebox/build/esm/type/record/record.mjs +116 -0
- package/node_modules/@sinclair/typebox/build/esm/type/recursive/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/recursive/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs +15 -0
- package/node_modules/@sinclair/typebox/build/esm/type/ref/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/ref/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/ref/ref.d.mts +41 -0
- package/node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/regexp/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/regexp/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/registry/format.d.mts +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/registry/format.mjs +26 -0
- package/node_modules/@sinclair/typebox/build/esm/type/registry/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/registry/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/registry/type.d.mts +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/registry/type.mjs +26 -0
- package/node_modules/@sinclair/typebox/build/esm/type/required/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/required/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs +18 -0
- package/node_modules/@sinclair/typebox/build/esm/type/required/required.d.mts +35 -0
- package/node_modules/@sinclair/typebox/build/esm/type/required/required.mjs +73 -0
- package/node_modules/@sinclair/typebox/build/esm/type/rest/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/rest/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/rest/rest.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs +15 -0
- package/node_modules/@sinclair/typebox/build/esm/type/return-type/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/return-type/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/schema/anyschema.d.mts +33 -0
- package/node_modules/@sinclair/typebox/build/esm/type/schema/anyschema.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/schema/index.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/schema/index.mjs +2 -0
- package/node_modules/@sinclair/typebox/build/esm/type/schema/schema.d.mts +29 -0
- package/node_modules/@sinclair/typebox/build/esm/type/schema/schema.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/sets/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/sets/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/sets/set.d.mts +28 -0
- package/node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs +48 -0
- package/node_modules/@sinclair/typebox/build/esm/type/static/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/static/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/static/static.d.mts +39 -0
- package/node_modules/@sinclair/typebox/build/esm/type/static/static.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/string/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/string/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/string/string.d.mts +25 -0
- package/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbol/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbol/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbols/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbols/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.d.mts +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.d.mts +19 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs +49 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.d.mts +21 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs +53 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/index.d.mts +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/index.mjs +7 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs +167 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs +33 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs +55 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.d.mts +30 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/transform/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/transform/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/transform/transform.d.mts +30 -0
- package/node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs +40 -0
- package/node_modules/@sinclair/typebox/build/esm/type/tuple/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/tuple/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/index.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/javascript.d.mts +64 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/javascript.mjs +99 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/json.d.mts +208 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/json.mjs +221 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/type.d.mts +59 -0
- package/node_modules/@sinclair/typebox/build/esm/type/type/type.mjs +62 -0
- package/node_modules/@sinclair/typebox/build/esm/type/uint8array/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/uint8array/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.d.mts +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/undefined/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/undefined/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union-create.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs +5 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.d.mts +13 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs +36 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union-type.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union-type.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/union/union.mjs +10 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unknown/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unknown/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.d.mts +8 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unsafe/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unsafe/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/type/void/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/void/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/type/void/void.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/type/void/void.mjs +6 -0
- package/node_modules/@sinclair/typebox/build/esm/value/assert/assert.d.mts +15 -0
- package/node_modules/@sinclair/typebox/build/esm/value/assert/assert.mjs +49 -0
- package/node_modules/@sinclair/typebox/build/esm/value/assert/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/assert/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/cast/cast.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/value/cast/cast.mjs +235 -0
- package/node_modules/@sinclair/typebox/build/esm/value/cast/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/cast/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/check/check.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/value/check/check.mjs +470 -0
- package/node_modules/@sinclair/typebox/build/esm/value/check/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/check/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clean/clean.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clean/clean.mjs +145 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clean/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clean/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clone/clone.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clone/clone.mjs +56 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clone/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/clone/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/convert/convert.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/value/convert/convert.mjs +260 -0
- package/node_modules/@sinclair/typebox/build/esm/value/convert/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/convert/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/create/create.d.mts +11 -0
- package/node_modules/@sinclair/typebox/build/esm/value/create/create.mjs +468 -0
- package/node_modules/@sinclair/typebox/build/esm/value/create/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/create/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/decode/decode.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/value/decode/decode.mjs +10 -0
- package/node_modules/@sinclair/typebox/build/esm/value/decode/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/decode/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/default/default.d.mts +5 -0
- package/node_modules/@sinclair/typebox/build/esm/value/default/default.mjs +172 -0
- package/node_modules/@sinclair/typebox/build/esm/value/default/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/default/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/delta/delta.d.mts +32 -0
- package/node_modules/@sinclair/typebox/build/esm/value/delta/delta.mjs +171 -0
- package/node_modules/@sinclair/typebox/build/esm/value/delta/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/delta/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/deref/deref.d.mts +12 -0
- package/node_modules/@sinclair/typebox/build/esm/value/deref/deref.mjs +29 -0
- package/node_modules/@sinclair/typebox/build/esm/value/deref/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/deref/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/encode/encode.d.mts +6 -0
- package/node_modules/@sinclair/typebox/build/esm/value/encode/encode.mjs +11 -0
- package/node_modules/@sinclair/typebox/build/esm/value/encode/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/encode/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/equal/equal.d.mts +2 -0
- package/node_modules/@sinclair/typebox/build/esm/value/equal/equal.mjs +46 -0
- package/node_modules/@sinclair/typebox/build/esm/value/equal/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/equal/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/guard/guard.d.mts +74 -0
- package/node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs +158 -0
- package/node_modules/@sinclair/typebox/build/esm/value/guard/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/guard/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/hash/hash.d.mts +7 -0
- package/node_modules/@sinclair/typebox/build/esm/value/hash/hash.mjs +146 -0
- package/node_modules/@sinclair/typebox/build/esm/value/hash/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/hash/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/index.d.mts +20 -0
- package/node_modules/@sinclair/typebox/build/esm/value/index.mjs +32 -0
- package/node_modules/@sinclair/typebox/build/esm/value/mutate/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/mutate/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/mutate/mutate.d.mts +9 -0
- package/node_modules/@sinclair/typebox/build/esm/value/mutate/mutate.mjs +98 -0
- package/node_modules/@sinclair/typebox/build/esm/value/parse/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/parse/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/parse/parse.d.mts +22 -0
- package/node_modules/@sinclair/typebox/build/esm/value/parse/parse.mjs +81 -0
- package/node_modules/@sinclair/typebox/build/esm/value/pointer/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/pointer/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/pointer/pointer.d.mts +22 -0
- package/node_modules/@sinclair/typebox/build/esm/value/pointer/pointer.mjs +115 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/decode.d.mts +22 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/decode.mjs +207 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/encode.d.mts +23 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/encode.mjs +218 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/has.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/has.mjs +129 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/index.d.mts +3 -0
- package/node_modules/@sinclair/typebox/build/esm/value/transform/index.mjs +3 -0
- package/node_modules/@sinclair/typebox/build/esm/value/value/index.d.mts +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/value/index.mjs +1 -0
- package/node_modules/@sinclair/typebox/build/esm/value/value/value.d.mts +16 -0
- package/node_modules/@sinclair/typebox/build/esm/value/value/value.mjs +16 -0
- package/node_modules/@sinclair/typebox/compiler/package.json +4 -0
- package/node_modules/@sinclair/typebox/errors/package.json +4 -0
- package/node_modules/@sinclair/typebox/license +25 -0
- package/node_modules/@sinclair/typebox/package.json +116 -0
- package/node_modules/@sinclair/typebox/parser/package.json +4 -0
- package/node_modules/@sinclair/typebox/readme.md +1865 -0
- package/node_modules/@sinclair/typebox/syntax/package.json +4 -0
- package/node_modules/@sinclair/typebox/system/package.json +4 -0
- package/node_modules/@sinclair/typebox/type/package.json +4 -0
- package/node_modules/@sinclair/typebox/value/package.json +4 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +13 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +554 -0
- package/node_modules/ws/lib/websocket.js +1393 -0
- package/node_modules/ws/package.json +69 -0
- package/node_modules/ws/wrapper.mjs +8 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +6 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +6 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +51 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +632 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2990 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1798 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +138 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +448 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +183 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4538 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
- package/node_modules/zod/src/v4/core/util.ts +966 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/en.ts +119 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +116 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +49 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +116 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +6 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +15 -0
- package/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +6 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1272 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/node_modules/zod/v4/core/api.cjs +1222 -0
- package/node_modules/zod/v4/core/api.d.cts +304 -0
- package/node_modules/zod/v4/core/api.d.ts +304 -0
- package/node_modules/zod/v4/core/api.js +1082 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +83 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +76 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +213 -0
- package/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/node_modules/zod/v4/core/errors.js +182 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +6 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +166 -0
- package/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/node_modules/zod/v4/core/regexes.js +133 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2124 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/node_modules/zod/v4/core/schemas.js +2093 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/node_modules/zod/v4/core/util.cjs +710 -0
- package/node_modules/zod/v4/core/util.d.cts +199 -0
- package/node_modules/zod/v4/core/util.d.ts +199 -0
- package/node_modules/zod/v4/core/util.js +651 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/en.cjs +136 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +109 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +135 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +108 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +104 -0
- package/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/node_modules/zod/v4/locales/index.js +49 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +6 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +136 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +109 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +12 -0
- package/node_modules/zod/v4/mini/external.d.ts +12 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +6 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1046 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/node_modules/zod/v4/mini/schemas.js +925 -0
- package/node_modules/zod/v4/package.json +6 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +6 -0
- package/openclaw.plugin.json +12 -0
- package/package.json +11 -6
- package/skills/weibo-hot-search/SKILL.md +161 -0
- package/skills/weibo-search/SKILL.md +116 -0
- package/skills/weibo-status/SKILL.md +97 -0
- package/src/accounts.d.ts +10 -0
- package/src/accounts.d.ts.map +1 -0
- package/src/accounts.js +113 -0
- package/src/accounts.js.map +1 -0
- package/src/bot.d.ts +26 -0
- package/src/bot.d.ts.map +1 -0
- package/src/bot.js +385 -0
- package/src/bot.js.map +1 -0
- package/src/channel.d.ts +4 -0
- package/src/channel.d.ts.map +1 -0
- package/src/channel.js +317 -0
- package/src/channel.js.map +1 -0
- package/src/client.d.ts +51 -0
- package/src/client.d.ts.map +1 -0
- package/src/client.js +336 -0
- package/src/client.js.map +1 -0
- package/src/config-schema.d.ts +86 -0
- package/src/config-schema.d.ts.map +1 -0
- package/src/{config-schema.ts → config-schema.js} +19 -24
- package/src/config-schema.js.map +1 -0
- package/src/fingerprint.d.ts +4 -0
- package/src/fingerprint.d.ts.map +1 -0
- package/src/fingerprint.js +19 -0
- package/src/fingerprint.js.map +1 -0
- package/src/monitor.d.ts +13 -0
- package/src/monitor.d.ts.map +1 -0
- package/src/monitor.js +169 -0
- package/src/monitor.js.map +1 -0
- package/src/outbound-stream.d.ts +32 -0
- package/src/outbound-stream.d.ts.map +1 -0
- package/src/outbound-stream.js +184 -0
- package/src/outbound-stream.js.map +1 -0
- package/src/outbound.d.ts +3 -0
- package/src/outbound.d.ts.map +1 -0
- package/src/outbound.js +38 -0
- package/src/outbound.js.map +1 -0
- package/src/plugin-sdk-compat.d.ts +21 -0
- package/src/plugin-sdk-compat.d.ts.map +1 -0
- package/src/plugin-sdk-compat.js +47 -0
- package/src/plugin-sdk-compat.js.map +1 -0
- package/src/policy.d.ts +5 -0
- package/src/policy.d.ts.map +1 -0
- package/src/policy.js +6 -0
- package/src/policy.js.map +1 -0
- package/src/runtime.d.ts +4 -0
- package/src/runtime.d.ts.map +1 -0
- package/src/runtime.js +11 -0
- package/src/runtime.js.map +1 -0
- package/src/search-schema.d.ts +6 -0
- package/src/search-schema.d.ts.map +1 -0
- package/src/search-schema.js +5 -0
- package/src/search-schema.js.map +1 -0
- package/src/send.d.ts +14 -0
- package/src/send.d.ts.map +1 -0
- package/src/send.js +58 -0
- package/src/send.js.map +1 -0
- package/src/sim-page.d.ts +51 -0
- package/src/sim-page.d.ts.map +1 -0
- package/src/sim-page.js +72 -0
- package/src/sim-page.js.map +1 -0
- package/src/sim-store.d.ts +54 -0
- package/src/sim-store.d.ts.map +1 -0
- package/src/sim-store.js +117 -0
- package/src/sim-store.js.map +1 -0
- package/src/targets.d.ts +4 -0
- package/src/targets.d.ts.map +1 -0
- package/src/targets.js +15 -0
- package/src/targets.js.map +1 -0
- package/src/token.d.ts +27 -0
- package/src/token.d.ts.map +1 -0
- package/src/token.js +144 -0
- package/src/token.js.map +1 -0
- package/src/tools-config.d.ts +21 -0
- package/src/tools-config.d.ts.map +1 -0
- package/src/tools-config.js +42 -0
- package/src/tools-config.js.map +1 -0
- package/src/types.d.ts +76 -0
- package/src/types.d.ts.map +1 -0
- package/src/types.js +2 -0
- package/src/types.js.map +1 -0
- package/src/weibo-hot-search.d.ts +44 -0
- package/src/weibo-hot-search.d.ts.map +1 -0
- package/src/weibo-hot-search.js +215 -0
- package/src/weibo-hot-search.js.map +1 -0
- package/src/weibo-search.d.ts +71 -0
- package/src/weibo-search.d.ts.map +1 -0
- package/src/weibo-search.js +182 -0
- package/src/weibo-search.js.map +1 -0
- package/src/weibo-status.d.ts +61 -0
- package/src/weibo-status.d.ts.map +1 -0
- package/src/weibo-status.js +194 -0
- package/src/weibo-status.js.map +1 -0
- package/index.ts +0 -67
- package/src/accounts.ts +0 -134
- package/src/bot.ts +0 -486
- package/src/channel.ts +0 -391
- package/src/client.ts +0 -435
- package/src/fingerprint.ts +0 -25
- package/src/monitor.ts +0 -206
- package/src/outbound-stream.ts +0 -241
- package/src/outbound.ts +0 -49
- package/src/plugin-sdk-compat.ts +0 -82
- package/src/policy.ts +0 -10
- package/src/runtime.ts +0 -14
- package/src/search-schema.ts +0 -7
- package/src/send.ts +0 -80
- package/src/sim-page.ts +0 -140
- package/src/sim-store.ts +0 -186
- package/src/targets.ts +0 -14
- package/src/token.ts +0 -207
- package/src/tools-config.ts +0 -55
- package/src/types.ts +0 -95
- package/src/weibo-hot-search.ts +0 -345
- package/src/weibo-search.ts +0 -333
- package/src/weibo-status.ts +0 -341
|
@@ -0,0 +1,1865 @@
|
|
|
1
|
+
<div align='center'>
|
|
2
|
+
|
|
3
|
+
<h1>TypeBox 0.34.x</h1>
|
|
4
|
+
|
|
5
|
+
<p>Json Schema Type Builder with Static Type Resolution for TypeScript</p>
|
|
6
|
+
|
|
7
|
+
<img src="https://raw.githubusercontent.com/sinclairzx81/typebox-legacy/refs/heads/main/typebox.png" />
|
|
8
|
+
|
|
9
|
+
<br />
|
|
10
|
+
<br />
|
|
11
|
+
|
|
12
|
+
[](https://badge.fury.io/js/%40sinclair%2Ftypebox)
|
|
13
|
+
[](https://www.npmjs.com/package/%40sinclair%2Ftypebox)
|
|
14
|
+
[](https://github.com/sinclairzx81/typebox/actions/workflows/build.yml)
|
|
15
|
+
[](https://opensource.org/licenses/MIT)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<a name="Install"></a>
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
$ npm install @sinclair/typebox # TypeBox-Legacy | 0.34.x
|
|
25
|
+
|
|
26
|
+
$ npm install typebox # TypeBox | 1.0.x
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { Type, type Static } from '@sinclair/typebox'
|
|
33
|
+
|
|
34
|
+
const T = Type.Object({ // const T = {
|
|
35
|
+
x: Type.Number(), // type: 'object',
|
|
36
|
+
y: Type.Number(), // required: ['x', 'y', 'z'],
|
|
37
|
+
z: Type.Number() // properties: {
|
|
38
|
+
}) // x: { type: 'number' },
|
|
39
|
+
// y: { type: 'number' },
|
|
40
|
+
// z: { type: 'number' }
|
|
41
|
+
// }
|
|
42
|
+
// }
|
|
43
|
+
|
|
44
|
+
type T = Static<typeof T> // type T = {
|
|
45
|
+
// x: number,
|
|
46
|
+
// y: number,
|
|
47
|
+
// z: number
|
|
48
|
+
// }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
<a name="Overview"></a>
|
|
53
|
+
|
|
54
|
+
## Overview
|
|
55
|
+
|
|
56
|
+
> ⚠️ TypeBox versions (pre-1.0) will continue active maintenance through 2026 and beyond. This repository services as the OIDC publishing environment for the `@sinclair/typebox` package scope on NPM. For TypeBox versions 1.0 and above, refer to https://github.com/sinclairzx81/typebox
|
|
57
|
+
|
|
58
|
+
TypeBox is a runtime type builder that creates in-memory Json Schema objects that infer as TypeScript types. The schematics produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox offers a unified type that can be statically checked by TypeScript and runtime asserted using standard Json Schema validation.
|
|
59
|
+
|
|
60
|
+
This library is designed to allow Json Schema to compose similar to how types compose within TypeScript's type system. It can be used as a simple tool to build up complex schematics or integrated into REST and RPC services to help validate data received over the wire.
|
|
61
|
+
|
|
62
|
+
License MIT
|
|
63
|
+
|
|
64
|
+
## Contents
|
|
65
|
+
- [Install](#install)
|
|
66
|
+
- [Overview](#overview)
|
|
67
|
+
- [Usage](#usage)
|
|
68
|
+
- [Types](#types)
|
|
69
|
+
- [Json](#types-json)
|
|
70
|
+
- [JavaScript](#types-javascript)
|
|
71
|
+
- [Options](#types-options)
|
|
72
|
+
- [Properties](#types-properties)
|
|
73
|
+
- [Generics](#types-generics)
|
|
74
|
+
- [Recursive](#types-recursive)
|
|
75
|
+
- [Modules](#types-modules)
|
|
76
|
+
- [Template Literal](#types-template-literal)
|
|
77
|
+
- [Indexed](#types-indexed)
|
|
78
|
+
- [Mapped](#types-mapped)
|
|
79
|
+
- [Conditional](#types-conditional)
|
|
80
|
+
- [Transform](#types-transform)
|
|
81
|
+
- [Guard](#types-guard)
|
|
82
|
+
- [Unsafe](#types-unsafe)
|
|
83
|
+
- [Values](#values)
|
|
84
|
+
- [Assert](#values-assert)
|
|
85
|
+
- [Create](#values-create)
|
|
86
|
+
- [Clone](#values-clone)
|
|
87
|
+
- [Check](#values-check)
|
|
88
|
+
- [Convert](#values-convert)
|
|
89
|
+
- [Default](#values-default)
|
|
90
|
+
- [Clean](#values-clean)
|
|
91
|
+
- [Cast](#values-cast)
|
|
92
|
+
- [Decode](#values-decode)
|
|
93
|
+
- [Encode](#values-decode)
|
|
94
|
+
- [Parse](#values-parse)
|
|
95
|
+
- [Equal](#values-equal)
|
|
96
|
+
- [Hash](#values-hash)
|
|
97
|
+
- [Diff](#values-diff)
|
|
98
|
+
- [Patch](#values-patch)
|
|
99
|
+
- [Errors](#values-errors)
|
|
100
|
+
- [Mutate](#values-mutate)
|
|
101
|
+
- [Pointer](#values-pointer)
|
|
102
|
+
- [Syntax](#syntax)
|
|
103
|
+
- [Create](#syntax-create)
|
|
104
|
+
- [Parameters](#syntax-parameters)
|
|
105
|
+
- [Generics](#syntax-generics)
|
|
106
|
+
- [Options](#syntax-options)
|
|
107
|
+
- [NoInfer](#syntax-no-infer)
|
|
108
|
+
- [TypeRegistry](#typeregistry)
|
|
109
|
+
- [Type](#typeregistry-type)
|
|
110
|
+
- [Format](#typeregistry-format)
|
|
111
|
+
- [TypeCheck](#typecheck)
|
|
112
|
+
- [Ajv](#typecheck-ajv)
|
|
113
|
+
- [TypeCompiler](#typecheck-typecompiler)
|
|
114
|
+
- [TypeMap](#typemap)
|
|
115
|
+
- [Usage](#typemap-usage)
|
|
116
|
+
- [TypeSystem](#typesystem)
|
|
117
|
+
- [Policies](#typesystem-policies)
|
|
118
|
+
- [Error Function](#error-function)
|
|
119
|
+
- [Workbench](#workbench)
|
|
120
|
+
- [Codegen](#codegen)
|
|
121
|
+
- [Ecosystem](#ecosystem)
|
|
122
|
+
- [Benchmark](#benchmark)
|
|
123
|
+
- [Compile](#benchmark-compile)
|
|
124
|
+
- [Validate](#benchmark-validate)
|
|
125
|
+
- [Compression](#benchmark-compression)
|
|
126
|
+
- [Contribute](#contribute)
|
|
127
|
+
|
|
128
|
+
<a name="usage"></a>
|
|
129
|
+
|
|
130
|
+
## Usage
|
|
131
|
+
|
|
132
|
+
The following shows general usage.
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
import { Type, type Static } from '@sinclair/typebox'
|
|
136
|
+
|
|
137
|
+
//--------------------------------------------------------------------------------------------
|
|
138
|
+
//
|
|
139
|
+
// Let's say you have the following type ...
|
|
140
|
+
//
|
|
141
|
+
//--------------------------------------------------------------------------------------------
|
|
142
|
+
|
|
143
|
+
type T = {
|
|
144
|
+
id: string,
|
|
145
|
+
name: string,
|
|
146
|
+
timestamp: number
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
//--------------------------------------------------------------------------------------------
|
|
150
|
+
//
|
|
151
|
+
// ... you can express this type in the following way.
|
|
152
|
+
//
|
|
153
|
+
//--------------------------------------------------------------------------------------------
|
|
154
|
+
|
|
155
|
+
const T = Type.Object({ // const T = {
|
|
156
|
+
id: Type.String(), // type: 'object',
|
|
157
|
+
name: Type.String(), // properties: {
|
|
158
|
+
timestamp: Type.Integer() // id: {
|
|
159
|
+
}) // type: 'string'
|
|
160
|
+
// },
|
|
161
|
+
// name: {
|
|
162
|
+
// type: 'string'
|
|
163
|
+
// },
|
|
164
|
+
// timestamp: {
|
|
165
|
+
// type: 'integer'
|
|
166
|
+
// }
|
|
167
|
+
// },
|
|
168
|
+
// required: [
|
|
169
|
+
// 'id',
|
|
170
|
+
// 'name',
|
|
171
|
+
// 'timestamp'
|
|
172
|
+
// ]
|
|
173
|
+
// }
|
|
174
|
+
|
|
175
|
+
//--------------------------------------------------------------------------------------------
|
|
176
|
+
//
|
|
177
|
+
// ... then infer back to the original static type this way.
|
|
178
|
+
//
|
|
179
|
+
//--------------------------------------------------------------------------------------------
|
|
180
|
+
|
|
181
|
+
type T = Static<typeof T> // type T = {
|
|
182
|
+
// id: string,
|
|
183
|
+
// name: string,
|
|
184
|
+
// timestamp: number
|
|
185
|
+
// }
|
|
186
|
+
|
|
187
|
+
//--------------------------------------------------------------------------------------------
|
|
188
|
+
//
|
|
189
|
+
// ... or use the type to parse JavaScript values.
|
|
190
|
+
//
|
|
191
|
+
//--------------------------------------------------------------------------------------------
|
|
192
|
+
|
|
193
|
+
import { Value } from '@sinclair/typebox/value'
|
|
194
|
+
|
|
195
|
+
const R = Value.Parse(T, value) // const R: {
|
|
196
|
+
// id: string,
|
|
197
|
+
// name: string,
|
|
198
|
+
// timestamp: number
|
|
199
|
+
// }
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
<a name='types'></a>
|
|
203
|
+
|
|
204
|
+
## Types
|
|
205
|
+
|
|
206
|
+
TypeBox types are Json Schema fragments that compose into more complex types. Each fragment is structured such that any Json Schema compliant validator can runtime assert a value the same way TypeScript will statically assert a type. TypeBox offers a set of Json Types which are used to create Json Schema compliant schematics as well as a JavaScript type set used to create schematics for constructs native to JavaScript.
|
|
207
|
+
|
|
208
|
+
<a name='types-json'></a>
|
|
209
|
+
|
|
210
|
+
### Json Types
|
|
211
|
+
|
|
212
|
+
The following table lists the supported Json types. These types are fully compatible with the Json Schema Draft 7 specification.
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┐
|
|
216
|
+
│ TypeBox │ TypeScript │ Json Schema │
|
|
217
|
+
│ │ │ │
|
|
218
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
219
|
+
│ const T = Type.Any() │ type T = any │ const T = { } │
|
|
220
|
+
│ │ │ │
|
|
221
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
222
|
+
│ const T = Type.Unknown() │ type T = unknown │ const T = { } │
|
|
223
|
+
│ │ │ │
|
|
224
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
225
|
+
│ const T = Type.String() │ type T = string │ const T = { │
|
|
226
|
+
│ │ │ type: 'string' │
|
|
227
|
+
│ │ │ } │
|
|
228
|
+
│ │ │ │
|
|
229
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
230
|
+
│ const T = Type.Number() │ type T = number │ const T = { │
|
|
231
|
+
│ │ │ type: 'number' │
|
|
232
|
+
│ │ │ } │
|
|
233
|
+
│ │ │ │
|
|
234
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
235
|
+
│ const T = Type.Integer() │ type T = number │ const T = { │
|
|
236
|
+
│ │ │ type: 'integer' │
|
|
237
|
+
│ │ │ } │
|
|
238
|
+
│ │ │ │
|
|
239
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
240
|
+
│ const T = Type.Boolean() │ type T = boolean │ const T = { │
|
|
241
|
+
│ │ │ type: 'boolean' │
|
|
242
|
+
│ │ │ } │
|
|
243
|
+
│ │ │ │
|
|
244
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
245
|
+
│ const T = Type.Null() │ type T = null │ const T = { │
|
|
246
|
+
│ │ │ type: 'null' │
|
|
247
|
+
│ │ │ } │
|
|
248
|
+
│ │ │ │
|
|
249
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
250
|
+
│ const T = Type.Literal(42) │ type T = 42 │ const T = { │
|
|
251
|
+
│ │ │ const: 42, │
|
|
252
|
+
│ │ │ type: 'number' │
|
|
253
|
+
│ │ │ } │
|
|
254
|
+
│ │ │ │
|
|
255
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
256
|
+
│ const T = Type.Array( │ type T = number[] │ const T = { │
|
|
257
|
+
│ Type.Number() │ │ type: 'array', │
|
|
258
|
+
│ ) │ │ items: { │
|
|
259
|
+
│ │ │ type: 'number' │
|
|
260
|
+
│ │ │ } │
|
|
261
|
+
│ │ │ } │
|
|
262
|
+
│ │ │ │
|
|
263
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
264
|
+
│ const T = Type.Object({ │ type T = { │ const T = { │
|
|
265
|
+
│ x: Type.Number(), │ x: number, │ type: 'object', │
|
|
266
|
+
│ y: Type.Number() │ y: number │ required: ['x', 'y'], │
|
|
267
|
+
│ }) │ } │ properties: { │
|
|
268
|
+
│ │ │ x: { │
|
|
269
|
+
│ │ │ type: 'number' │
|
|
270
|
+
│ │ │ }, │
|
|
271
|
+
│ │ │ y: { │
|
|
272
|
+
│ │ │ type: 'number' │
|
|
273
|
+
│ │ │ } │
|
|
274
|
+
│ │ │ } │
|
|
275
|
+
│ │ │ } │
|
|
276
|
+
│ │ │ │
|
|
277
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
278
|
+
│ const T = Type.Tuple([ │ type T = [number, number] │ const T = { │
|
|
279
|
+
│ Type.Number(), │ │ type: 'array', │
|
|
280
|
+
│ Type.Number() │ │ items: [{ │
|
|
281
|
+
│ ]) │ │ type: 'number' │
|
|
282
|
+
│ │ │ }, { │
|
|
283
|
+
│ │ │ type: 'number' │
|
|
284
|
+
│ │ │ }], │
|
|
285
|
+
│ │ │ additionalItems: false, │
|
|
286
|
+
│ │ │ minItems: 2, │
|
|
287
|
+
│ │ │ maxItems: 2 │
|
|
288
|
+
│ │ │ } │
|
|
289
|
+
│ │ │ │
|
|
290
|
+
│ │ │ │
|
|
291
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
292
|
+
│ enum Foo { │ enum Foo { │ const T = { │
|
|
293
|
+
│ A, │ A, │ anyOf: [{ │
|
|
294
|
+
│ B │ B │ type: 'number', │
|
|
295
|
+
│ } │ } │ const: 0 │
|
|
296
|
+
│ │ │ }, { │
|
|
297
|
+
│ const T = Type.Enum(Foo) │ type T = Foo │ type: 'number', │
|
|
298
|
+
│ │ │ const: 1 │
|
|
299
|
+
│ │ │ }] │
|
|
300
|
+
│ │ │ } │
|
|
301
|
+
│ │ │ │
|
|
302
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
303
|
+
│ const T = Type.Const({ │ type T = { │ const T = { │
|
|
304
|
+
│ x: 1, │ readonly x: 1, │ type: 'object', │
|
|
305
|
+
│ y: 2, │ readonly y: 2 │ required: ['x', 'y'], │
|
|
306
|
+
│ } as const) │ } │ properties: { │
|
|
307
|
+
│ │ │ x: { │
|
|
308
|
+
│ │ │ type: 'number', │
|
|
309
|
+
│ │ │ const: 1 │
|
|
310
|
+
│ │ │ }, │
|
|
311
|
+
│ │ │ y: { │
|
|
312
|
+
│ │ │ type: 'number', │
|
|
313
|
+
│ │ │ const: 2 │
|
|
314
|
+
│ │ │ } │
|
|
315
|
+
│ │ │ } │
|
|
316
|
+
│ │ │ } │
|
|
317
|
+
│ │ │ │
|
|
318
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
319
|
+
│ const T = Type.KeyOf( │ type T = keyof { │ const T = { │
|
|
320
|
+
│ Type.Object({ │ x: number, │ anyOf: [{ │
|
|
321
|
+
│ x: Type.Number(), │ y: number │ type: 'string', │
|
|
322
|
+
│ y: Type.Number() │ } │ const: 'x' │
|
|
323
|
+
│ }) │ │ }, { │
|
|
324
|
+
│ ) │ │ type: 'string', │
|
|
325
|
+
│ │ │ const: 'y' │
|
|
326
|
+
│ │ │ }] │
|
|
327
|
+
│ │ │ } │
|
|
328
|
+
│ │ │ │
|
|
329
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
330
|
+
│ const T = Type.Union([ │ type T = string | number │ const T = { │
|
|
331
|
+
│ Type.String(), │ │ anyOf: [{ │
|
|
332
|
+
│ Type.Number() │ │ type: 'string' │
|
|
333
|
+
│ ]) │ │ }, { │
|
|
334
|
+
│ │ │ type: 'number' │
|
|
335
|
+
│ │ │ }] │
|
|
336
|
+
│ │ │ } │
|
|
337
|
+
│ │ │ │
|
|
338
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
339
|
+
│ const T = Type.Intersect([ │ type T = { │ const T = { │
|
|
340
|
+
│ Type.Object({ │ x: number │ allOf: [{ │
|
|
341
|
+
│ x: Type.Number() │ } & { │ type: 'object', │
|
|
342
|
+
│ }), │ y: number │ required: ['x'], │
|
|
343
|
+
│ Type.Object({ │ } │ properties: { │
|
|
344
|
+
│ y: Type.Number() │ │ x: { │
|
|
345
|
+
│ }) │ │ type: 'number' │
|
|
346
|
+
│ ]) │ │ } │
|
|
347
|
+
│ │ │ } │
|
|
348
|
+
│ │ │ }, { │
|
|
349
|
+
│ │ │ type: 'object', |
|
|
350
|
+
│ │ │ required: ['y'], │
|
|
351
|
+
│ │ │ properties: { │
|
|
352
|
+
│ │ │ y: { │
|
|
353
|
+
│ │ │ type: 'number' │
|
|
354
|
+
│ │ │ } │
|
|
355
|
+
│ │ │ } │
|
|
356
|
+
│ │ │ }] │
|
|
357
|
+
│ │ │ } │
|
|
358
|
+
│ │ │ │
|
|
359
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
360
|
+
│ const T = Type.Composite([ │ type T = { │ const T = { │
|
|
361
|
+
│ Type.Object({ │ x: number, │ type: 'object', │
|
|
362
|
+
│ x: Type.Number() │ y: number │ required: ['x', 'y'], │
|
|
363
|
+
│ }), │ } │ properties: { │
|
|
364
|
+
│ Type.Object({ │ │ x: { │
|
|
365
|
+
│ y: Type.Number() │ │ type: 'number' │
|
|
366
|
+
│ }) │ │ }, │
|
|
367
|
+
│ ]) │ │ y: { │
|
|
368
|
+
│ │ │ type: 'number' │
|
|
369
|
+
│ │ │ } │
|
|
370
|
+
│ │ │ } │
|
|
371
|
+
│ │ │ } │
|
|
372
|
+
│ │ │ │
|
|
373
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
374
|
+
│ const T = Type.Never() │ type T = never │ const T = { │
|
|
375
|
+
│ │ │ not: {} │
|
|
376
|
+
│ │ │ } │
|
|
377
|
+
│ │ │ │
|
|
378
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
379
|
+
│ const T = Type.Not( | type T = unknown │ const T = { │
|
|
380
|
+
│ Type.String() │ │ not: { │
|
|
381
|
+
│ ) │ │ type: 'string' │
|
|
382
|
+
│ │ │ } │
|
|
383
|
+
│ │ │ } │
|
|
384
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
385
|
+
│ const T = Type.Extends( │ type T = │ const T = { │
|
|
386
|
+
│ Type.String(), │ string extends number │ const: false, │
|
|
387
|
+
│ Type.Number(), │ ? true │ type: 'boolean' │
|
|
388
|
+
│ Type.Literal(true), │ : false │ } │
|
|
389
|
+
│ Type.Literal(false) │ │ │
|
|
390
|
+
│ ) │ │ │
|
|
391
|
+
│ │ │ │
|
|
392
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
393
|
+
│ const T = Type.Extract( │ type T = Extract< │ const T = { │
|
|
394
|
+
│ Type.Union([ │ string | number, │ type: 'string' │
|
|
395
|
+
│ Type.String(), │ string │ } │
|
|
396
|
+
│ Type.Number(), │ > │ │
|
|
397
|
+
│ ]), │ │ │
|
|
398
|
+
│ Type.String() │ │ │
|
|
399
|
+
│ ) │ │ │
|
|
400
|
+
│ │ │ │
|
|
401
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
402
|
+
│ const T = Type.Exclude( │ type T = Exclude< │ const T = { │
|
|
403
|
+
│ Type.Union([ │ string | number, │ type: 'number' │
|
|
404
|
+
│ Type.String(), │ string │ } │
|
|
405
|
+
│ Type.Number(), │ > │ │
|
|
406
|
+
│ ]), │ │ │
|
|
407
|
+
│ Type.String() │ │ │
|
|
408
|
+
│ ) │ │ │
|
|
409
|
+
│ │ │ │
|
|
410
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
411
|
+
│ const T = Type.Mapped( │ type T = { │ const T = { │
|
|
412
|
+
│ Type.Union([ │ [_ in 'x' | 'y'] : number │ type: 'object', │
|
|
413
|
+
│ Type.Literal('x'), │ } │ required: ['x', 'y'], │
|
|
414
|
+
│ Type.Literal('y') │ │ properties: { │
|
|
415
|
+
│ ]), │ │ x: { │
|
|
416
|
+
│ () => Type.Number() │ │ type: 'number' │
|
|
417
|
+
│ ) │ │ }, │
|
|
418
|
+
│ │ │ y: { │
|
|
419
|
+
│ │ │ type: 'number' │
|
|
420
|
+
│ │ │ } │
|
|
421
|
+
│ │ │ } │
|
|
422
|
+
│ │ │ } │
|
|
423
|
+
│ │ │ │
|
|
424
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
425
|
+
│ const U = Type.Union([ │ type U = 'open' | 'close' │ const T = { │
|
|
426
|
+
│ Type.Literal('open'), │ │ type: 'string', │
|
|
427
|
+
│ Type.Literal('close') │ type T = `on${U}` │ pattern: '^on(open|close)$' │
|
|
428
|
+
│ ]) │ │ } │
|
|
429
|
+
│ │ │ │
|
|
430
|
+
│ const T = Type │ │ │
|
|
431
|
+
│ .TemplateLiteral([ │ │ │
|
|
432
|
+
│ Type.Literal('on'), │ │ │
|
|
433
|
+
│ U │ │ │
|
|
434
|
+
│ ]) │ │ │
|
|
435
|
+
│ │ │ │
|
|
436
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
437
|
+
│ const T = Type.Record( │ type T = Record< │ const T = { │
|
|
438
|
+
│ Type.String(), │ string, │ type: 'object', │
|
|
439
|
+
│ Type.Number() │ number │ patternProperties: { │
|
|
440
|
+
│ ) │ > │ '^.*$': { │
|
|
441
|
+
│ │ │ type: 'number' │
|
|
442
|
+
│ │ │ } │
|
|
443
|
+
│ │ │ } │
|
|
444
|
+
│ │ │ } │
|
|
445
|
+
│ │ │ │
|
|
446
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
447
|
+
│ const T = Type.Partial( │ type T = Partial<{ │ const T = { │
|
|
448
|
+
│ Type.Object({ │ x: number, │ type: 'object', │
|
|
449
|
+
│ x: Type.Number(), │ y: number │ properties: { │
|
|
450
|
+
│ y: Type.Number() | }> │ x: { │
|
|
451
|
+
│ }) │ │ type: 'number' │
|
|
452
|
+
│ ) │ │ }, │
|
|
453
|
+
│ │ │ y: { │
|
|
454
|
+
│ │ │ type: 'number' │
|
|
455
|
+
│ │ │ } │
|
|
456
|
+
│ │ │ } │
|
|
457
|
+
│ │ │ } │
|
|
458
|
+
│ │ │ │
|
|
459
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
460
|
+
│ const T = Type.Required( │ type T = Required<{ │ const T = { │
|
|
461
|
+
│ Type.Object({ │ x?: number, │ type: 'object', │
|
|
462
|
+
│ x: Type.Optional( │ y?: number │ required: ['x', 'y'], │
|
|
463
|
+
│ Type.Number() | }> │ properties: { │
|
|
464
|
+
│ ), │ │ x: { │
|
|
465
|
+
│ y: Type.Optional( │ │ type: 'number' │
|
|
466
|
+
│ Type.Number() │ │ }, │
|
|
467
|
+
│ ) │ │ y: { │
|
|
468
|
+
│ }) │ │ type: 'number' │
|
|
469
|
+
│ ) │ │ } │
|
|
470
|
+
│ │ │ } │
|
|
471
|
+
│ │ │ } │
|
|
472
|
+
│ │ │ │
|
|
473
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
474
|
+
│ const T = Type.Pick( │ type T = Pick<{ │ const T = { │
|
|
475
|
+
│ Type.Object({ │ x: number, │ type: 'object', │
|
|
476
|
+
│ x: Type.Number(), │ y: number │ required: ['x'], │
|
|
477
|
+
│ y: Type.Number() │ }, 'x'> │ properties: { │
|
|
478
|
+
│ }), ['x'] | │ x: { │
|
|
479
|
+
│ ) │ │ type: 'number' │
|
|
480
|
+
│ │ │ } │
|
|
481
|
+
│ │ │ } │
|
|
482
|
+
│ │ │ } │
|
|
483
|
+
│ │ │ │
|
|
484
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
485
|
+
│ const T = Type.Omit( │ type T = Omit<{ │ const T = { │
|
|
486
|
+
│ Type.Object({ │ x: number, │ type: 'object', │
|
|
487
|
+
│ x: Type.Number(), │ y: number │ required: ['y'], │
|
|
488
|
+
│ y: Type.Number() │ }, 'x'> │ properties: { │
|
|
489
|
+
│ }), ['x'] | │ y: { │
|
|
490
|
+
│ ) │ │ type: 'number' │
|
|
491
|
+
│ │ │ } │
|
|
492
|
+
│ │ │ } │
|
|
493
|
+
│ │ │ } │
|
|
494
|
+
│ │ │ │
|
|
495
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
496
|
+
│ const T = Type.Index( │ type T = { │ const T = { │
|
|
497
|
+
│ Type.Object({ │ x: number, │ type: 'number' │
|
|
498
|
+
│ x: Type.Number(), │ y: string │ } │
|
|
499
|
+
│ y: Type.String() │ }['x'] │ │
|
|
500
|
+
│ }), ['x'] │ │ │
|
|
501
|
+
│ ) │ │ │
|
|
502
|
+
│ │ │ │
|
|
503
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
504
|
+
│ const A = Type.Tuple([ │ type A = [0, 1] │ const T = { │
|
|
505
|
+
│ Type.Literal(0), │ type B = [2, 3] │ type: 'array', │
|
|
506
|
+
│ Type.Literal(1) │ type T = [ │ items: [ │
|
|
507
|
+
│ ]) │ ...A, │ { const: 0 }, │
|
|
508
|
+
│ const B = Type.Tuple([ │ ...B │ { const: 1 }, │
|
|
509
|
+
| Type.Literal(2), │ ] │ { const: 2 }, │
|
|
510
|
+
| Type.Literal(3) │ │ { const: 3 } │
|
|
511
|
+
│ ]) │ │ ], │
|
|
512
|
+
│ const T = Type.Tuple([ │ │ additionalItems: false, │
|
|
513
|
+
| ...Type.Rest(A), │ │ minItems: 4, │
|
|
514
|
+
| ...Type.Rest(B) │ │ maxItems: 4 │
|
|
515
|
+
│ ]) │ │ } │
|
|
516
|
+
│ │ │ │
|
|
517
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
518
|
+
│ const T = Type.Uncapitalize( │ type T = Uncapitalize< │ const T = { │
|
|
519
|
+
│ Type.Literal('Hello') │ 'Hello' │ type: 'string', │
|
|
520
|
+
│ ) │ > │ const: 'hello' │
|
|
521
|
+
│ │ │ } │
|
|
522
|
+
│ │ │ │
|
|
523
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
524
|
+
│ const T = Type.Capitalize( │ type T = Capitalize< │ const T = { │
|
|
525
|
+
│ Type.Literal('hello') │ 'hello' │ type: 'string', │
|
|
526
|
+
│ ) │ > │ const: 'Hello' │
|
|
527
|
+
│ │ │ } │
|
|
528
|
+
│ │ │ │
|
|
529
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
530
|
+
│ const T = Type.Uppercase( │ type T = Uppercase< │ const T = { │
|
|
531
|
+
│ Type.Literal('hello') │ 'hello' │ type: 'string', │
|
|
532
|
+
│ ) │ > │ const: 'HELLO' │
|
|
533
|
+
│ │ │ } │
|
|
534
|
+
│ │ │ │
|
|
535
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
536
|
+
│ const T = Type.Lowercase( │ type T = Lowercase< │ const T = { │
|
|
537
|
+
│ Type.Literal('HELLO') │ 'HELLO' │ type: 'string', │
|
|
538
|
+
│ ) │ > │ const: 'hello' │
|
|
539
|
+
│ │ │ } │
|
|
540
|
+
│ │ │ │
|
|
541
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
542
|
+
│ const R = Type.Ref('T') │ type R = unknown │ const R = { $ref: 'T' } │
|
|
543
|
+
│ │ │ │
|
|
544
|
+
└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
<a name='types-javascript'></a>
|
|
548
|
+
|
|
549
|
+
### JavaScript Types
|
|
550
|
+
|
|
551
|
+
TypeBox provides an extended type set that can be used to create schematics for common JavaScript constructs. These types can not be used with any standard Json Schema validator; but can be used to frame schematics for interfaces that may receive Json validated data. JavaScript types are prefixed with the `[JavaScript]` JSDoc comment for convenience. The following table lists the supported types.
|
|
552
|
+
|
|
553
|
+
```typescript
|
|
554
|
+
┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┐
|
|
555
|
+
│ TypeBox │ TypeScript │ Extended Schema │
|
|
556
|
+
│ │ │ │
|
|
557
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
558
|
+
│ const T = Type.Constructor([ │ type T = new ( │ const T = { │
|
|
559
|
+
│ Type.String(), │ arg0: string, │ type: 'Constructor', │
|
|
560
|
+
│ Type.Number() │ arg0: number │ parameters: [{ │
|
|
561
|
+
│ ], Type.Boolean()) │ ) => boolean │ type: 'string' │
|
|
562
|
+
│ │ │ }, { │
|
|
563
|
+
│ │ │ type: 'number' │
|
|
564
|
+
│ │ │ }], │
|
|
565
|
+
│ │ │ returns: { │
|
|
566
|
+
│ │ │ type: 'boolean' │
|
|
567
|
+
│ │ │ } │
|
|
568
|
+
│ │ │ } │
|
|
569
|
+
│ │ │ │
|
|
570
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
571
|
+
│ const T = Type.Function([ │ type T = ( │ const T = { │
|
|
572
|
+
| Type.String(), │ arg0: string, │ type: 'Function', │
|
|
573
|
+
│ Type.Number() │ arg1: number │ parameters: [{ │
|
|
574
|
+
│ ], Type.Boolean()) │ ) => boolean │ type: 'string' │
|
|
575
|
+
│ │ │ }, { │
|
|
576
|
+
│ │ │ type: 'number' │
|
|
577
|
+
│ │ │ }], │
|
|
578
|
+
│ │ │ returns: { │
|
|
579
|
+
│ │ │ type: 'boolean' │
|
|
580
|
+
│ │ │ } │
|
|
581
|
+
│ │ │ } │
|
|
582
|
+
│ │ │ │
|
|
583
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
584
|
+
│ const T = Type.Promise( │ type T = Promise<string> │ const T = { │
|
|
585
|
+
│ Type.String() │ │ type: 'Promise', │
|
|
586
|
+
│ ) │ │ item: { │
|
|
587
|
+
│ │ │ type: 'string' │
|
|
588
|
+
│ │ │ } │
|
|
589
|
+
│ │ │ } │
|
|
590
|
+
│ │ │ │
|
|
591
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
592
|
+
│ const T = │ type T = │ const T = { │
|
|
593
|
+
│ Type.AsyncIterator( │ AsyncIterableIterator< │ type: 'AsyncIterator', │
|
|
594
|
+
│ Type.String() │ string │ items: { │
|
|
595
|
+
│ ) │ > │ type: 'string' │
|
|
596
|
+
│ │ │ } │
|
|
597
|
+
│ │ │ } │
|
|
598
|
+
│ │ │ │
|
|
599
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
600
|
+
│ const T = Type.Iterator( │ type T = │ const T = { │
|
|
601
|
+
│ Type.String() │ IterableIterator<string> │ type: 'Iterator', │
|
|
602
|
+
│ ) │ │ items: { │
|
|
603
|
+
│ │ │ type: 'string' │
|
|
604
|
+
│ │ │ } │
|
|
605
|
+
│ │ │ } │
|
|
606
|
+
│ │ │ │
|
|
607
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
608
|
+
│ const T = Type.RegExp(/abc/i) │ type T = string │ const T = { │
|
|
609
|
+
│ │ │ type: 'RegExp' │
|
|
610
|
+
│ │ │ source: 'abc' │
|
|
611
|
+
│ │ │ flags: 'i' │
|
|
612
|
+
│ │ │ } │
|
|
613
|
+
│ │ │ │
|
|
614
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
615
|
+
│ const T = Type.Uint8Array() │ type T = Uint8Array │ const T = { │
|
|
616
|
+
│ │ │ type: 'Uint8Array' │
|
|
617
|
+
│ │ │ } │
|
|
618
|
+
│ │ │ │
|
|
619
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
620
|
+
│ const T = Type.Date() │ type T = Date │ const T = { │
|
|
621
|
+
│ │ │ type: 'Date' │
|
|
622
|
+
│ │ │ } │
|
|
623
|
+
│ │ │ │
|
|
624
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
625
|
+
│ const T = Type.Undefined() │ type T = undefined │ const T = { │
|
|
626
|
+
│ │ │ type: 'undefined' │
|
|
627
|
+
│ │ │ } │
|
|
628
|
+
│ │ │ │
|
|
629
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
630
|
+
│ const T = Type.Symbol() │ type T = symbol │ const T = { │
|
|
631
|
+
│ │ │ type: 'symbol' │
|
|
632
|
+
│ │ │ } │
|
|
633
|
+
│ │ │ │
|
|
634
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
635
|
+
│ const T = Type.BigInt() │ type T = bigint │ const T = { │
|
|
636
|
+
│ │ │ type: 'bigint' │
|
|
637
|
+
│ │ │ } │
|
|
638
|
+
│ │ │ │
|
|
639
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
640
|
+
│ const T = Type.Void() │ type T = void │ const T = { │
|
|
641
|
+
│ │ │ type: 'void' │
|
|
642
|
+
│ │ │ } │
|
|
643
|
+
│ │ │ │
|
|
644
|
+
└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
<a name='types-options'></a>
|
|
648
|
+
|
|
649
|
+
### Options
|
|
650
|
+
|
|
651
|
+
You can pass Json Schema options on the last argument of any given type. Option hints specific to each type are provided for convenience.
|
|
652
|
+
|
|
653
|
+
```typescript
|
|
654
|
+
// String must be an email
|
|
655
|
+
const T = Type.String({ // const T = {
|
|
656
|
+
format: 'email' // type: 'string',
|
|
657
|
+
}) // format: 'email'
|
|
658
|
+
// }
|
|
659
|
+
|
|
660
|
+
// Number must be a multiple of 2
|
|
661
|
+
const T = Type.Number({ // const T = {
|
|
662
|
+
multipleOf: 2 // type: 'number',
|
|
663
|
+
}) // multipleOf: 2
|
|
664
|
+
// }
|
|
665
|
+
|
|
666
|
+
// Array must have at least 5 integer values
|
|
667
|
+
const T = Type.Array(Type.Integer(), { // const T = {
|
|
668
|
+
minItems: 5 // type: 'array',
|
|
669
|
+
}) // minItems: 5,
|
|
670
|
+
// items: {
|
|
671
|
+
// type: 'integer'
|
|
672
|
+
// }
|
|
673
|
+
// }
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
<a name='types-properties'></a>
|
|
677
|
+
|
|
678
|
+
### Properties
|
|
679
|
+
|
|
680
|
+
Object properties can be modified with Readonly and Optional. The following table shows how these modifiers map between TypeScript and Json Schema.
|
|
681
|
+
|
|
682
|
+
```typescript
|
|
683
|
+
┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┐
|
|
684
|
+
│ TypeBox │ TypeScript │ Json Schema │
|
|
685
|
+
│ │ │ │
|
|
686
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
687
|
+
│ const T = Type.Object({ │ type T = { │ const T = { │
|
|
688
|
+
│ name: Type.ReadonlyOptional( │ readonly name?: string │ type: 'object', │
|
|
689
|
+
│ Type.String() │ } │ properties: { │
|
|
690
|
+
│ ) │ │ name: { │
|
|
691
|
+
│ }) │ │ type: 'string' │
|
|
692
|
+
│ │ │ } │
|
|
693
|
+
│ │ │ } │
|
|
694
|
+
│ │ │ } │
|
|
695
|
+
│ │ │ │
|
|
696
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
697
|
+
│ const T = Type.Object({ │ type T = { │ const T = { │
|
|
698
|
+
│ name: Type.Readonly( │ readonly name: string │ type: 'object', │
|
|
699
|
+
│ Type.String() │ } │ properties: { │
|
|
700
|
+
│ ) │ │ name: { │
|
|
701
|
+
│ }) │ │ type: 'string' │
|
|
702
|
+
│ │ │ } │
|
|
703
|
+
│ │ │ }, │
|
|
704
|
+
│ │ │ required: ['name'] │
|
|
705
|
+
│ │ │ } │
|
|
706
|
+
│ │ │ │
|
|
707
|
+
├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤
|
|
708
|
+
│ const T = Type.Object({ │ type T = { │ const T = { │
|
|
709
|
+
│ name: Type.Optional( │ name?: string │ type: 'object', │
|
|
710
|
+
│ Type.String() │ } │ properties: { │
|
|
711
|
+
│ ) │ │ name: { │
|
|
712
|
+
│ }) │ │ type: 'string' │
|
|
713
|
+
│ │ │ } │
|
|
714
|
+
│ │ │ } │
|
|
715
|
+
│ │ │ } │
|
|
716
|
+
│ │ │ │
|
|
717
|
+
└────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
<a name='types-generics'></a>
|
|
721
|
+
|
|
722
|
+
### Generic Types
|
|
723
|
+
|
|
724
|
+
Generic types can be created with generic functions.
|
|
725
|
+
|
|
726
|
+
```typescript
|
|
727
|
+
const Nullable = <T extends TSchema>(T: T) => { // type Nullable<T> = T | null
|
|
728
|
+
return Type.Union([T, Type.Null()])
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
const T = Nullable(Type.String()) // type T = Nullable<string>
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
<a name='types-recursive'></a>
|
|
735
|
+
|
|
736
|
+
### Recursive Types
|
|
737
|
+
|
|
738
|
+
Use the Recursive function to create recursive types.
|
|
739
|
+
|
|
740
|
+
```typescript
|
|
741
|
+
const Node = Type.Recursive(This => Type.Object({ // const Node = {
|
|
742
|
+
id: Type.String(), // $id: 'Node',
|
|
743
|
+
nodes: Type.Array(This) // type: 'object',
|
|
744
|
+
}), { $id: 'Node' }) // properties: {
|
|
745
|
+
// id: {
|
|
746
|
+
// type: 'string'
|
|
747
|
+
// },
|
|
748
|
+
// nodes: {
|
|
749
|
+
// type: 'array',
|
|
750
|
+
// items: {
|
|
751
|
+
// $ref: 'Node'
|
|
752
|
+
// }
|
|
753
|
+
// }
|
|
754
|
+
// },
|
|
755
|
+
// required: [
|
|
756
|
+
// 'id',
|
|
757
|
+
// 'nodes'
|
|
758
|
+
// ]
|
|
759
|
+
// }
|
|
760
|
+
|
|
761
|
+
type Node = Static<typeof Node> // type Node = {
|
|
762
|
+
// id: string
|
|
763
|
+
// nodes: Node[]
|
|
764
|
+
// }
|
|
765
|
+
|
|
766
|
+
function test(node: Node) {
|
|
767
|
+
const id = node.nodes[0].nodes[0].id // id is string
|
|
768
|
+
}
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
<a name='types-modules'></a>
|
|
772
|
+
|
|
773
|
+
### Module Types
|
|
774
|
+
|
|
775
|
+
Module types are containers for a set of referential types. Modules act as namespaces, enabling types to reference one another via string identifiers. Modules support both singular and mutually recursive references, as well as deferred dereferencing for computed types such as Partial. Types imported from a module are expressed using the Json Schema `$defs` keyword.
|
|
776
|
+
|
|
777
|
+
```typescript
|
|
778
|
+
const Module = Type.Module({
|
|
779
|
+
PartialUser: Type.Partial(Type.Ref('User')), // TComputed<'Partial', [TRef<'User'>]>
|
|
780
|
+
|
|
781
|
+
User: Type.Object({ // TObject<{
|
|
782
|
+
id: Type.String(), // user: TString,
|
|
783
|
+
name: Type.String(), // name: TString,
|
|
784
|
+
email: Type.String() // email: TString
|
|
785
|
+
}), // }>
|
|
786
|
+
})
|
|
787
|
+
const User = Module.Import('User') // const User: TImport<{...}, 'User'>
|
|
788
|
+
|
|
789
|
+
type User = Static<typeof User> // type User = {
|
|
790
|
+
// id: string,
|
|
791
|
+
// name: string,
|
|
792
|
+
// email: string
|
|
793
|
+
// }
|
|
794
|
+
|
|
795
|
+
const PartialUser = Module.Import('PartialUser') // const PartialUser: TImport<{...}, 'PartialUser'>
|
|
796
|
+
|
|
797
|
+
type PartialUser = Static<typeof PartialUser> // type PartialUser = {
|
|
798
|
+
// id?: string,
|
|
799
|
+
// name?: string,
|
|
800
|
+
// email?: string
|
|
801
|
+
// }
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
<a name='types-template-literal'></a>
|
|
805
|
+
|
|
806
|
+
### Template Literal Types
|
|
807
|
+
|
|
808
|
+
TypeBox supports template literal types with the TemplateLiteral function. This type can be created using a syntax similar to the TypeScript template literal syntax or composed from exterior types. TypeBox encodes template literals as regular expressions which enables the template to be checked by Json Schema validators. This type also supports regular expression parsing that enables template patterns to be used for generative types. The following shows both TypeScript and TypeBox usage.
|
|
809
|
+
|
|
810
|
+
```typescript
|
|
811
|
+
// TypeScript
|
|
812
|
+
|
|
813
|
+
type K = `prop${'A'|'B'|'C'}` // type T = 'propA' | 'propB' | 'propC'
|
|
814
|
+
|
|
815
|
+
type R = Record<K, string> // type R = {
|
|
816
|
+
// propA: string
|
|
817
|
+
// propB: string
|
|
818
|
+
// propC: string
|
|
819
|
+
// }
|
|
820
|
+
|
|
821
|
+
// TypeBox
|
|
822
|
+
|
|
823
|
+
const K = Type.TemplateLiteral('prop${A|B|C}') // const K: TTemplateLiteral<[
|
|
824
|
+
// TLiteral<'prop'>,
|
|
825
|
+
// TUnion<[
|
|
826
|
+
// TLiteral<'A'>,
|
|
827
|
+
// TLiteral<'B'>,
|
|
828
|
+
// TLiteral<'C'>,
|
|
829
|
+
// ]>
|
|
830
|
+
// ]>
|
|
831
|
+
|
|
832
|
+
const R = Type.Record(K, Type.String()) // const R: TObject<{
|
|
833
|
+
// propA: TString,
|
|
834
|
+
// propB: TString,
|
|
835
|
+
// propC: TString,
|
|
836
|
+
// }>
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
<a name='types-indexed'></a>
|
|
840
|
+
|
|
841
|
+
### Indexed Access Types
|
|
842
|
+
|
|
843
|
+
TypeBox supports indexed access types with the Index function. This function enables uniform access to interior property and element types without having to extract them from the underlying schema representation. Index types are supported for Object, Array, Tuple, Union and Intersect types.
|
|
844
|
+
|
|
845
|
+
```typescript
|
|
846
|
+
const T = Type.Object({ // type T = {
|
|
847
|
+
x: Type.Number(), // x: number,
|
|
848
|
+
y: Type.String(), // y: string,
|
|
849
|
+
z: Type.Boolean() // z: boolean
|
|
850
|
+
}) // }
|
|
851
|
+
|
|
852
|
+
const A = Type.Index(T, ['x']) // type A = T['x']
|
|
853
|
+
//
|
|
854
|
+
// ... evaluated as
|
|
855
|
+
//
|
|
856
|
+
// const A: TNumber
|
|
857
|
+
|
|
858
|
+
const B = Type.Index(T, ['x', 'y']) // type B = T['x' | 'y']
|
|
859
|
+
//
|
|
860
|
+
// ... evaluated as
|
|
861
|
+
//
|
|
862
|
+
// const B: TUnion<[
|
|
863
|
+
// TNumber,
|
|
864
|
+
// TString,
|
|
865
|
+
// ]>
|
|
866
|
+
|
|
867
|
+
const C = Type.Index(T, Type.KeyOf(T)) // type C = T[keyof T]
|
|
868
|
+
//
|
|
869
|
+
// ... evaluated as
|
|
870
|
+
//
|
|
871
|
+
// const C: TUnion<[
|
|
872
|
+
// TNumber,
|
|
873
|
+
// TString,
|
|
874
|
+
// TBoolean
|
|
875
|
+
// ]>
|
|
876
|
+
```
|
|
877
|
+
|
|
878
|
+
<a name='types-mapped'></a>
|
|
879
|
+
|
|
880
|
+
### Mapped Types
|
|
881
|
+
|
|
882
|
+
TypeBox supports mapped types with the Mapped function. This function accepts two arguments, the first is a union type typically derived from KeyOf, the second is a mapping function that receives a mapping key `K` that can be used to index properties of a type. The following implements a mapped type that remaps each property to be `T | null`.
|
|
883
|
+
|
|
884
|
+
```typescript
|
|
885
|
+
const T = Type.Object({ // type T = {
|
|
886
|
+
x: Type.Number(), // x: number,
|
|
887
|
+
y: Type.String(), // y: string,
|
|
888
|
+
z: Type.Boolean() // z: boolean
|
|
889
|
+
}) // }
|
|
890
|
+
|
|
891
|
+
const M = Type.Mapped(Type.KeyOf(T), K => { // type M = { [K in keyof T]: T[K] | null }
|
|
892
|
+
return Type.Union([Type.Index(T, K), Type.Null()]) //
|
|
893
|
+
}) // ... evaluated as
|
|
894
|
+
//
|
|
895
|
+
// const M: TObject<{
|
|
896
|
+
// x: TUnion<[TNumber, TNull]>,
|
|
897
|
+
// y: TUnion<[TString, TNull]>,
|
|
898
|
+
// z: TUnion<[TBoolean, TNull]>
|
|
899
|
+
// }>
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
<a name='types-conditional'></a>
|
|
903
|
+
|
|
904
|
+
### Conditional Types
|
|
905
|
+
|
|
906
|
+
TypeBox supports runtime conditional types with the Extends function. This function performs a structural assignability check against the first (`left`) and second (`right`) arguments and will return either the third (`true`) or fourth (`false`) argument based on the result. The conditional types Exclude and Extract are also supported. The following shows both TypeScript and TypeBox examples of conditional types.
|
|
907
|
+
|
|
908
|
+
```typescript
|
|
909
|
+
// Extends
|
|
910
|
+
const A = Type.Extends( // type A = string extends number ? 1 : 2
|
|
911
|
+
Type.String(), //
|
|
912
|
+
Type.Number(), // ... evaluated as
|
|
913
|
+
Type.Literal(1), //
|
|
914
|
+
Type.Literal(2) // const A: TLiteral<2>
|
|
915
|
+
)
|
|
916
|
+
|
|
917
|
+
// Extract
|
|
918
|
+
const B = Type.Extract( // type B = Extract<1 | 2 | 3, 1>
|
|
919
|
+
Type.Union([ //
|
|
920
|
+
Type.Literal(1), // ... evaluated as
|
|
921
|
+
Type.Literal(2), //
|
|
922
|
+
Type.Literal(3) // const B: TLiteral<1>
|
|
923
|
+
]),
|
|
924
|
+
Type.Literal(1)
|
|
925
|
+
)
|
|
926
|
+
|
|
927
|
+
// Exclude
|
|
928
|
+
const C = Type.Exclude( // type C = Exclude<1 | 2 | 3, 1>
|
|
929
|
+
Type.Union([ //
|
|
930
|
+
Type.Literal(1), // ... evaluated as
|
|
931
|
+
Type.Literal(2), //
|
|
932
|
+
Type.Literal(3) // const C: TUnion<[
|
|
933
|
+
]), // TLiteral<2>,
|
|
934
|
+
Type.Literal(1) // TLiteral<3>,
|
|
935
|
+
) // ]>
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
<a name='types-transform'></a>
|
|
939
|
+
|
|
940
|
+
### Transform Types
|
|
941
|
+
|
|
942
|
+
TypeBox supports value decoding and encoding with Transform types. These types work in tandem with the Encode and Decode functions available on the Value and TypeCompiler submodules. Transform types can be used to convert Json encoded values into constructs more natural to JavaScript. The following creates a Transform type to decode numbers into Dates using the Value submodule.
|
|
943
|
+
|
|
944
|
+
```typescript
|
|
945
|
+
import { Value } from '@sinclair/typebox/value'
|
|
946
|
+
|
|
947
|
+
const T = Type.Transform(Type.Number())
|
|
948
|
+
.Decode(value => new Date(value)) // decode: number to Date
|
|
949
|
+
.Encode(value => value.getTime()) // encode: Date to number
|
|
950
|
+
|
|
951
|
+
const D = Value.Decode(T, 0) // const D = Date(1970-01-01T00:00:00.000Z)
|
|
952
|
+
const E = Value.Encode(T, D) // const E = 0
|
|
953
|
+
```
|
|
954
|
+
Use the StaticEncode or StaticDecode types to infer a Transform type.
|
|
955
|
+
```typescript
|
|
956
|
+
import { Static, StaticDecode, StaticEncode } from '@sinclair/typebox'
|
|
957
|
+
|
|
958
|
+
const T = Type.Transform(Type.Array(Type.Number(), { uniqueItems: true }))
|
|
959
|
+
.Decode(value => new Set(value))
|
|
960
|
+
.Encode(value => [...value])
|
|
961
|
+
|
|
962
|
+
type D = StaticDecode<typeof T> // type D = Set<number>
|
|
963
|
+
type E = StaticEncode<typeof T> // type E = Array<number>
|
|
964
|
+
type T = Static<typeof T> // type T = Array<number>
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
<a name='types-unsafe'></a>
|
|
968
|
+
|
|
969
|
+
### Unsafe Types
|
|
970
|
+
|
|
971
|
+
TypeBox supports user defined types with Unsafe. This type allows you to specify both schema representation and inference type. The following creates an Unsafe type with a number schema that infers as string.
|
|
972
|
+
|
|
973
|
+
```typescript
|
|
974
|
+
const T = Type.Unsafe<string>({ type: 'number' }) // const T = { type: 'number' }
|
|
975
|
+
|
|
976
|
+
type T = Static<typeof T> // type T = string - ?
|
|
977
|
+
```
|
|
978
|
+
The Unsafe type is often used to create schematics for extended specifications like OpenAPI.
|
|
979
|
+
```typescript
|
|
980
|
+
|
|
981
|
+
const Nullable = <T extends TSchema>(schema: T) => Type.Unsafe<Static<T> | null>({
|
|
982
|
+
...schema, nullable: true
|
|
983
|
+
})
|
|
984
|
+
|
|
985
|
+
const T = Nullable(Type.String()) // const T = {
|
|
986
|
+
// type: 'string',
|
|
987
|
+
// nullable: true
|
|
988
|
+
// }
|
|
989
|
+
|
|
990
|
+
type T = Static<typeof T> // type T = string | null
|
|
991
|
+
|
|
992
|
+
const StringEnum = <T extends string[]>(values: [...T]) => Type.Unsafe<T[number]>({
|
|
993
|
+
type: 'string', enum: values
|
|
994
|
+
})
|
|
995
|
+
const S = StringEnum(['A', 'B', 'C']) // const S = {
|
|
996
|
+
// enum: ['A', 'B', 'C']
|
|
997
|
+
// }
|
|
998
|
+
|
|
999
|
+
type S = Static<typeof T> // type S = 'A' | 'B' | 'C'
|
|
1000
|
+
```
|
|
1001
|
+
<a name='types-guard'></a>
|
|
1002
|
+
|
|
1003
|
+
### TypeGuard
|
|
1004
|
+
|
|
1005
|
+
TypeBox can check its own types with the TypeGuard module. This module is written for type introspection and provides structural tests for every built-in TypeBox type. Functions of this module return `is` guards which can be used with control flow assertions to obtain schema inference for unknown values. The following guards that the value `T` is TString.
|
|
1006
|
+
|
|
1007
|
+
```typescript
|
|
1008
|
+
import { TypeGuard, Kind } from '@sinclair/typebox'
|
|
1009
|
+
|
|
1010
|
+
const T = { [Kind]: 'String', type: 'string' }
|
|
1011
|
+
|
|
1012
|
+
if(TypeGuard.IsString(T)) {
|
|
1013
|
+
|
|
1014
|
+
// T is TString
|
|
1015
|
+
}
|
|
1016
|
+
```
|
|
1017
|
+
|
|
1018
|
+
<a name='values'></a>
|
|
1019
|
+
|
|
1020
|
+
## Values
|
|
1021
|
+
|
|
1022
|
+
TypeBox provides an optional Value submodule that can be used to perform structural operations on JavaScript values. This submodule includes functionality to create, check and cast values from types as well as check equality, clone, diff and patch JavaScript values. This submodule is provided via optional import.
|
|
1023
|
+
|
|
1024
|
+
```typescript
|
|
1025
|
+
import { Value } from '@sinclair/typebox/value'
|
|
1026
|
+
```
|
|
1027
|
+
|
|
1028
|
+
<a name='values-assert'></a>
|
|
1029
|
+
|
|
1030
|
+
### Assert
|
|
1031
|
+
|
|
1032
|
+
Use the Assert function to assert a value is valid.
|
|
1033
|
+
|
|
1034
|
+
```typescript
|
|
1035
|
+
let value: unknown = 1
|
|
1036
|
+
|
|
1037
|
+
Value.Assert(Type.Number(), value) // throws AssertError if invalid
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
<a name='values-create'></a>
|
|
1041
|
+
|
|
1042
|
+
### Create
|
|
1043
|
+
|
|
1044
|
+
Use the Create function to create a value from a type. TypeBox will use default values if specified.
|
|
1045
|
+
|
|
1046
|
+
```typescript
|
|
1047
|
+
const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) })
|
|
1048
|
+
|
|
1049
|
+
const A = Value.Create(T) // const A = { x: 0, y: 42 }
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
<a name='values-clone'></a>
|
|
1053
|
+
|
|
1054
|
+
### Clone
|
|
1055
|
+
|
|
1056
|
+
Use the Clone function to deeply clone a value.
|
|
1057
|
+
|
|
1058
|
+
```typescript
|
|
1059
|
+
const A = Value.Clone({ x: 1, y: 2, z: 3 }) // const A = { x: 1, y: 2, z: 3 }
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
<a name='values-check'></a>
|
|
1063
|
+
|
|
1064
|
+
### Check
|
|
1065
|
+
|
|
1066
|
+
Use the Check function to type check a value.
|
|
1067
|
+
|
|
1068
|
+
```typescript
|
|
1069
|
+
const T = Type.Object({ x: Type.Number() })
|
|
1070
|
+
|
|
1071
|
+
const R = Value.Check(T, { x: 1 }) // const R = true
|
|
1072
|
+
```
|
|
1073
|
+
|
|
1074
|
+
<a name='values-convert'></a>
|
|
1075
|
+
|
|
1076
|
+
### Convert
|
|
1077
|
+
|
|
1078
|
+
Use the Convert function to convert a value into its target type if a reasonable conversion is possible. This function may return an invalid value and should be checked before use. Its return type is `unknown`.
|
|
1079
|
+
|
|
1080
|
+
```typescript
|
|
1081
|
+
const T = Type.Object({ x: Type.Number() })
|
|
1082
|
+
|
|
1083
|
+
const R1 = Value.Convert(T, { x: '3.14' }) // const R1 = { x: 3.14 }
|
|
1084
|
+
|
|
1085
|
+
const R2 = Value.Convert(T, { x: 'not a number' }) // const R2 = { x: 'not a number' }
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
<a name='values-clean'></a>
|
|
1089
|
+
|
|
1090
|
+
### Clean
|
|
1091
|
+
|
|
1092
|
+
Use Clean to remove excess properties from a value. This function does not check the value and returns an unknown type. You should Check the result before use. Clean is a mutable operation. To avoid mutation, Clone the value first.
|
|
1093
|
+
|
|
1094
|
+
```typescript
|
|
1095
|
+
const T = Type.Object({
|
|
1096
|
+
x: Type.Number(),
|
|
1097
|
+
y: Type.Number()
|
|
1098
|
+
})
|
|
1099
|
+
|
|
1100
|
+
const X = Value.Clean(T, null) // const 'X = null
|
|
1101
|
+
|
|
1102
|
+
const Y = Value.Clean(T, { x: 1 }) // const 'Y = { x: 1 }
|
|
1103
|
+
|
|
1104
|
+
const Z = Value.Clean(T, { x: 1, y: 2, z: 3 }) // const 'Z = { x: 1, y: 2 }
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1107
|
+
<a name='values-default'></a>
|
|
1108
|
+
|
|
1109
|
+
### Default
|
|
1110
|
+
|
|
1111
|
+
Use Default to generate missing properties on a value using default schema annotations if available. This function does not check the value and returns an unknown type. You should Check the result before use. Default is a mutable operation. To avoid mutation, Clone the value first.
|
|
1112
|
+
|
|
1113
|
+
```typescript
|
|
1114
|
+
const T = Type.Object({
|
|
1115
|
+
x: Type.Number({ default: 0 }),
|
|
1116
|
+
y: Type.Number({ default: 0 })
|
|
1117
|
+
})
|
|
1118
|
+
|
|
1119
|
+
const X = Value.Default(T, null) // const 'X = null - non-enumerable
|
|
1120
|
+
|
|
1121
|
+
const Y = Value.Default(T, { }) // const 'Y = { x: 0, y: 0 }
|
|
1122
|
+
|
|
1123
|
+
const Z = Value.Default(T, { x: 1 }) // const 'Z = { x: 1, y: 0 }
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
<a name='values-cast'></a>
|
|
1127
|
+
|
|
1128
|
+
### Cast
|
|
1129
|
+
|
|
1130
|
+
Use the Cast function to upcast a value into a target type. This function will retain as much information as possible from the original value. The Cast function is intended to be used in data migration scenarios where existing values need to be upgraded to match a modified type.
|
|
1131
|
+
|
|
1132
|
+
```typescript
|
|
1133
|
+
const T = Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false })
|
|
1134
|
+
|
|
1135
|
+
const X = Value.Cast(T, null) // const X = { x: 0, y: 0 }
|
|
1136
|
+
|
|
1137
|
+
const Y = Value.Cast(T, { x: 1 }) // const Y = { x: 1, y: 0 }
|
|
1138
|
+
|
|
1139
|
+
const Z = Value.Cast(T, { x: 1, y: 2, z: 3 }) // const Z = { x: 1, y: 2 }
|
|
1140
|
+
```
|
|
1141
|
+
|
|
1142
|
+
<a name='values-decode'></a>
|
|
1143
|
+
|
|
1144
|
+
### Decode
|
|
1145
|
+
|
|
1146
|
+
Use the Decode function to decode a value from a type or throw if the value is invalid. The return value will infer as the decoded type. This function will run Transform codecs if available.
|
|
1147
|
+
|
|
1148
|
+
```typescript
|
|
1149
|
+
const A = Value.Decode(Type.String(), 'hello') // const A = 'hello'
|
|
1150
|
+
|
|
1151
|
+
const B = Value.Decode(Type.String(), 42) // throw
|
|
1152
|
+
```
|
|
1153
|
+
<a name='values-decode'></a>
|
|
1154
|
+
|
|
1155
|
+
### Encode
|
|
1156
|
+
|
|
1157
|
+
Use the Encode function to encode a value to a type or throw if the value is invalid. The return value will infer as the encoded type. This function will run Transform codecs if available.
|
|
1158
|
+
|
|
1159
|
+
```typescript
|
|
1160
|
+
const A = Value.Encode(Type.String(), 'hello') // const A = 'hello'
|
|
1161
|
+
|
|
1162
|
+
const B = Value.Encode(Type.String(), 42) // throw
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
<a name='values-parse'></a>
|
|
1166
|
+
|
|
1167
|
+
### Parse
|
|
1168
|
+
|
|
1169
|
+
Use the Parse function to parse a value. This function calls the `Clone` `Clean`, `Default`, `Convert`, `Assert` and `Decode` Value functions in this exact order to process a value.
|
|
1170
|
+
|
|
1171
|
+
```typescript
|
|
1172
|
+
const R = Value.Parse(Type.String(), 'hello') // const R: string = "hello"
|
|
1173
|
+
|
|
1174
|
+
const E = Value.Parse(Type.String(), undefined) // throws AssertError
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
You can override the order in which functions are run, or omit functions entirely using the following.
|
|
1178
|
+
|
|
1179
|
+
```typescript
|
|
1180
|
+
// Runs no functions.
|
|
1181
|
+
|
|
1182
|
+
const R = Value.Parse([], Type.String(), 12345)
|
|
1183
|
+
|
|
1184
|
+
// Runs the Assert() function.
|
|
1185
|
+
|
|
1186
|
+
const E = Value.Parse(['Assert'], Type.String(), 12345)
|
|
1187
|
+
|
|
1188
|
+
// Runs the Convert() function followed by the Assert() function.
|
|
1189
|
+
|
|
1190
|
+
const S = Value.Parse(['Convert', 'Assert'], Type.String(), 12345)
|
|
1191
|
+
```
|
|
1192
|
+
|
|
1193
|
+
<a name='values-equal'></a>
|
|
1194
|
+
|
|
1195
|
+
### Equal
|
|
1196
|
+
|
|
1197
|
+
Use the Equal function to deeply check for value equality.
|
|
1198
|
+
|
|
1199
|
+
```typescript
|
|
1200
|
+
const R = Value.Equal( // const R = true
|
|
1201
|
+
{ x: 1, y: 2, z: 3 },
|
|
1202
|
+
{ x: 1, y: 2, z: 3 }
|
|
1203
|
+
)
|
|
1204
|
+
```
|
|
1205
|
+
|
|
1206
|
+
<a name='values-hash'></a>
|
|
1207
|
+
|
|
1208
|
+
### Hash
|
|
1209
|
+
|
|
1210
|
+
Use the Hash function to create a [FNV1A-64](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) non-cryptographic hash of a value.
|
|
1211
|
+
|
|
1212
|
+
```typescript
|
|
1213
|
+
const A = Value.Hash({ x: 1, y: 2, z: 3 }) // const A = 2910466848807138541n
|
|
1214
|
+
|
|
1215
|
+
const B = Value.Hash({ x: 1, y: 4, z: 3 }) // const B = 1418369778807423581n
|
|
1216
|
+
```
|
|
1217
|
+
|
|
1218
|
+
<a name='values-diff'></a>
|
|
1219
|
+
|
|
1220
|
+
### Diff
|
|
1221
|
+
|
|
1222
|
+
Use the Diff function to generate a sequence of edits that will transform one value into another.
|
|
1223
|
+
|
|
1224
|
+
```typescript
|
|
1225
|
+
const E = Value.Diff( // const E = [
|
|
1226
|
+
{ x: 1, y: 2, z: 3 }, // { type: 'update', path: '/y', value: 4 },
|
|
1227
|
+
{ y: 4, z: 5, w: 6 } // { type: 'update', path: '/z', value: 5 },
|
|
1228
|
+
) // { type: 'insert', path: '/w', value: 6 },
|
|
1229
|
+
// { type: 'delete', path: '/x' }
|
|
1230
|
+
// ]
|
|
1231
|
+
```
|
|
1232
|
+
|
|
1233
|
+
<a name='values-patch'></a>
|
|
1234
|
+
|
|
1235
|
+
### Patch
|
|
1236
|
+
|
|
1237
|
+
Use the Patch function to apply a sequence of edits.
|
|
1238
|
+
|
|
1239
|
+
```typescript
|
|
1240
|
+
const A = { x: 1, y: 2 }
|
|
1241
|
+
|
|
1242
|
+
const B = { x: 3 }
|
|
1243
|
+
|
|
1244
|
+
const E = Value.Diff(A, B) // const E = [
|
|
1245
|
+
// { type: 'update', path: '/x', value: 3 },
|
|
1246
|
+
// { type: 'delete', path: '/y' }
|
|
1247
|
+
// ]
|
|
1248
|
+
|
|
1249
|
+
const C = Value.Patch<typeof B>(A, E) // const C = { x: 3 }
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
<a name='values-errors'></a>
|
|
1253
|
+
|
|
1254
|
+
### Errors
|
|
1255
|
+
|
|
1256
|
+
Use the Errors function to enumerate validation errors.
|
|
1257
|
+
|
|
1258
|
+
```typescript
|
|
1259
|
+
const T = Type.Object({ x: Type.Number(), y: Type.Number() })
|
|
1260
|
+
|
|
1261
|
+
const R = [...Value.Errors(T, { x: '42' })] // const R = [{
|
|
1262
|
+
// schema: { type: 'number' },
|
|
1263
|
+
// path: '/x',
|
|
1264
|
+
// value: '42',
|
|
1265
|
+
// message: 'Expected number'
|
|
1266
|
+
// }, {
|
|
1267
|
+
// schema: { type: 'number' },
|
|
1268
|
+
// path: '/y',
|
|
1269
|
+
// value: undefined,
|
|
1270
|
+
// message: 'Expected number'
|
|
1271
|
+
// }]
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
<a name='values-mutate'></a>
|
|
1275
|
+
|
|
1276
|
+
### Mutate
|
|
1277
|
+
|
|
1278
|
+
Use the Mutate function to perform a deep mutable value assignment while retaining internal references.
|
|
1279
|
+
|
|
1280
|
+
```typescript
|
|
1281
|
+
const Y = { z: 1 } // const Y = { z: 1 }
|
|
1282
|
+
const X = { y: Y } // const X = { y: { z: 1 } }
|
|
1283
|
+
const A = { x: X } // const A = { x: { y: { z: 1 } } }
|
|
1284
|
+
|
|
1285
|
+
Value.Mutate(A, { x: { y: { z: 2 } } }) // A' = { x: { y: { z: 2 } } }
|
|
1286
|
+
|
|
1287
|
+
const R0 = A.x.y.z === 2 // const R0 = true
|
|
1288
|
+
const R1 = A.x.y === Y // const R1 = true
|
|
1289
|
+
const R2 = A.x === X // const R2 = true
|
|
1290
|
+
```
|
|
1291
|
+
|
|
1292
|
+
<a name='values-pointer'></a>
|
|
1293
|
+
|
|
1294
|
+
### Pointer
|
|
1295
|
+
|
|
1296
|
+
Use ValuePointer to perform mutable updates on existing values using [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) Json Pointers.
|
|
1297
|
+
|
|
1298
|
+
```typescript
|
|
1299
|
+
import { ValuePointer } from '@sinclair/typebox/value'
|
|
1300
|
+
|
|
1301
|
+
const A = { x: 0, y: 0, z: 0 }
|
|
1302
|
+
|
|
1303
|
+
ValuePointer.Set(A, '/x', 1) // A' = { x: 1, y: 0, z: 0 }
|
|
1304
|
+
ValuePointer.Set(A, '/y', 1) // A' = { x: 1, y: 1, z: 0 }
|
|
1305
|
+
ValuePointer.Set(A, '/z', 1) // A' = { x: 1, y: 1, z: 1 }
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
<a name='syntax'></a>
|
|
1311
|
+
|
|
1312
|
+
## Syntax Types
|
|
1313
|
+
|
|
1314
|
+
TypeBox provides experimental support for parsing TypeScript annotation syntax into TypeBox types.
|
|
1315
|
+
|
|
1316
|
+
This feature is provided via optional import.
|
|
1317
|
+
|
|
1318
|
+
```typescript
|
|
1319
|
+
import { Syntax } from '@sinclair/typebox/syntax'
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
<a name='syntax-create'></a>
|
|
1323
|
+
|
|
1324
|
+
### Create
|
|
1325
|
+
|
|
1326
|
+
Use the Syntax function to create TypeBox types from TypeScript syntax ([Example](https://www.typescriptlang.org/play/?moduleResolution=99&module=199&ts=5.8.0-beta#code/JYWwDg9gTgLgBAbzgZQJ4DsYEMAecC+cAZlBCHAOQACAzsOgMYA2WwUA9DKmAKYBGEHOxoZsOCgChQkWIhTYYwBgWKly1OoxZtO3foMkSGEdDXgAVOAF4Uo3AAoABkhwAuOOgCuIPjygAaOFR3Lx8-AkcASjgY2Jj2djhjUwt3cwB5PgArHgYYAB4ECTiS0rLyisrYhNi3OHMAOW9fAOKq9o7OuBqY4PqmsKg2rpHR+MT8AD4JCS5eeut5LEUGfLmeCCJ6ybHKmvWFmyLdk86euDrQlv9h07uy876rv1v7t-GCIA))
|
|
1327
|
+
|
|
1328
|
+
```typescript
|
|
1329
|
+
const T = Syntax(`{ x: number, y: number }`) // const T: TObject<{
|
|
1330
|
+
// x: TNumber,
|
|
1331
|
+
// y: TNumber
|
|
1332
|
+
// }>
|
|
1333
|
+
|
|
1334
|
+
type T = Static<typeof T> // type T = {
|
|
1335
|
+
// x: number,
|
|
1336
|
+
// y: number
|
|
1337
|
+
// }
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
<a name="syntax-parameters"></a>
|
|
1341
|
+
|
|
1342
|
+
### Parameters
|
|
1343
|
+
|
|
1344
|
+
Syntax types can be parameterized to receive exterior types ([Example](https://www.typescriptlang.org/play/?moduleResolution=99&module=199&ts=5.8.0-beta#code/JYWwDg9gTgLgBAbzgZQJ4DsYEMAecC+cAZlBCHAOQACAzsOgMYA2WwUA9DKmAKYBGEHOxoZsOCgCgJDCOhrwAKnAC8KUbgAUAAyQ4AXHHQBXEHx5QANHFQHjp8wS0BKOK7ev27ODLmKDCgHk+ACseBhgAHgQJd1i4+ITEpLdPN304BQA5EzNLGOSCwqK4VNcbDOz7KHzi2rqPL3wAPikfeRQVNUxNJCV8Ky0ABSxYYCwmCIUm52LUtvhkfyDQ8Kia+o2C0rh0wLAYYFlxycrcpot1zav47fK9g6OJrJzzFuv3m8amoA))
|
|
1345
|
+
|
|
1346
|
+
```typescript
|
|
1347
|
+
const T = Syntax(`{ x: number, y: number }`) // const T: TObject<{
|
|
1348
|
+
// x: TNumber,
|
|
1349
|
+
// y: TNumber
|
|
1350
|
+
// }>
|
|
1351
|
+
|
|
1352
|
+
const S = Syntax({ T }, `Partial<T>`) // const S: TObject<{
|
|
1353
|
+
// x: TOptional<TNumber>,
|
|
1354
|
+
// y: TOptional<TNumber>
|
|
1355
|
+
// }>
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
<a name="syntax-generics"></a>
|
|
1361
|
+
|
|
1362
|
+
### Generics
|
|
1363
|
+
|
|
1364
|
+
Syntax types support generic parameters in the following way ([Example](https://www.typescriptlang.org/play/?moduleResolution=99&module=199&ts=5.8.0-beta#code/JYWwDg9gTgLgBAbzgZQJ4DsYEMAecC+cAZlBCHAOQACAzsOgMYA2WwUA9DKmAKYBGEHOxoZsOCgChQkWIhTYYwBgWKly1OoxZtO3foMkSGEdDXgA1HgxjQ4AXhSjcACgAGAHgAaAGjgBNXwAtAD45CTg4HAAuOB84cLhUGID4iIAvGMD4-FcASgkjEzM4ACEsOhpLa2gae0dMFyQqmygCX1cEBOi4Zuh3AEZfAAZh4O8EpJ6rFvcRuEG4IbGEjKnqqFnh337lnPyJLl5S8uBK6Zq65AUld0OeCCJjit6oGlCIiPZ2ODun05fag5Oh8QaCweCIZCoV8Pt0kN0FpM5qshm0ElCMZisSCYRFJvCYnNJgsUWjseSKeDcXBVgTFr4kb5Vv0COjKezsTD8EA))
|
|
1365
|
+
|
|
1366
|
+
```typescript
|
|
1367
|
+
const Vector = Syntax(`<X, Y, Z> {
|
|
1368
|
+
x: X,
|
|
1369
|
+
y: Y,
|
|
1370
|
+
z: Z
|
|
1371
|
+
}`)
|
|
1372
|
+
|
|
1373
|
+
const BasisVectors = Syntax({ Vector }, `{
|
|
1374
|
+
x: Vector<1, 0, 0>,
|
|
1375
|
+
y: Vector<0, 1, 0>,
|
|
1376
|
+
z: Vector<0, 0, 1>,
|
|
1377
|
+
}`)
|
|
1378
|
+
|
|
1379
|
+
type BasisVectors = Static<typeof BasisVectors> // type BasisVectors = {
|
|
1380
|
+
// x: { x: 1, y: 0, z: 0 },
|
|
1381
|
+
// y: { x: 0, y: 1, z: 0 },
|
|
1382
|
+
// z: { x: 0, y: 0, z: 1 }
|
|
1383
|
+
// }
|
|
1384
|
+
```
|
|
1385
|
+
|
|
1386
|
+
<a name='syntax-options'></a>
|
|
1387
|
+
|
|
1388
|
+
### Options
|
|
1389
|
+
|
|
1390
|
+
Options can be passed via the last parameter.
|
|
1391
|
+
|
|
1392
|
+
```typescript
|
|
1393
|
+
const T = Syntax(`number`, { minimum: 42 }) // const T = {
|
|
1394
|
+
// type: 'number',
|
|
1395
|
+
// minimum: 42
|
|
1396
|
+
// }
|
|
1397
|
+
```
|
|
1398
|
+
|
|
1399
|
+
<a name='syntax-no-infer'></a>
|
|
1400
|
+
|
|
1401
|
+
### NoInfer
|
|
1402
|
+
|
|
1403
|
+
Syntax parsing is an expensive type level operation and can impact on language service performance. Use the NoInfer function parse syntax at runtime only.
|
|
1404
|
+
|
|
1405
|
+
```typescript
|
|
1406
|
+
import { NoInfer } from '@sinclair/typebox/syntax'
|
|
1407
|
+
|
|
1408
|
+
const T = NoInfer(`number | string`) // const T: TSchema = {
|
|
1409
|
+
// anyOf: [
|
|
1410
|
+
// { type: 'number' },
|
|
1411
|
+
// { type: 'string' }
|
|
1412
|
+
// ]
|
|
1413
|
+
// }
|
|
1414
|
+
```
|
|
1415
|
+
|
|
1416
|
+
<a name='typeregistry'></a>
|
|
1417
|
+
|
|
1418
|
+
## TypeRegistry
|
|
1419
|
+
|
|
1420
|
+
The TypeBox type system can be extended with additional types and formats using the TypeRegistry and FormatRegistry modules. These modules integrate deeply with TypeBox's internal type checking infrastructure and can be used to create application specific types, or register schematics for alternative specifications.
|
|
1421
|
+
|
|
1422
|
+
<a name='typeregistry-type'></a>
|
|
1423
|
+
|
|
1424
|
+
### TypeRegistry
|
|
1425
|
+
|
|
1426
|
+
Use the TypeRegistry to register a type. The Kind must match the registered type name.
|
|
1427
|
+
|
|
1428
|
+
```typescript
|
|
1429
|
+
import { TSchema, Kind, TypeRegistry } from '@sinclair/typebox'
|
|
1430
|
+
|
|
1431
|
+
TypeRegistry.Set('Foo', (schema, value) => value === 'foo')
|
|
1432
|
+
|
|
1433
|
+
const Foo = { [Kind]: 'Foo' } as TSchema
|
|
1434
|
+
|
|
1435
|
+
const A = Value.Check(Foo, 'foo') // const A = true
|
|
1436
|
+
|
|
1437
|
+
const B = Value.Check(Foo, 'bar') // const B = false
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
<a name='typeregistry-format'></a>
|
|
1441
|
+
|
|
1442
|
+
### FormatRegistry
|
|
1443
|
+
|
|
1444
|
+
Use the FormatRegistry to register a string format.
|
|
1445
|
+
|
|
1446
|
+
```typescript
|
|
1447
|
+
import { FormatRegistry } from '@sinclair/typebox'
|
|
1448
|
+
|
|
1449
|
+
FormatRegistry.Set('foo', (value) => value === 'foo')
|
|
1450
|
+
|
|
1451
|
+
const T = Type.String({ format: 'foo' })
|
|
1452
|
+
|
|
1453
|
+
const A = Value.Check(T, 'foo') // const A = true
|
|
1454
|
+
|
|
1455
|
+
const B = Value.Check(T, 'bar') // const B = false
|
|
1456
|
+
```
|
|
1457
|
+
|
|
1458
|
+
<a name='typecheck'></a>
|
|
1459
|
+
|
|
1460
|
+
## TypeCheck
|
|
1461
|
+
|
|
1462
|
+
TypeBox types target Json Schema Draft 7 and are compatible with any validator that supports this specification. TypeBox also provides a built-in type checking compiler designed specifically for TypeBox types that offers high performance compilation and value checking.
|
|
1463
|
+
|
|
1464
|
+
The following sections detail using Ajv and the TypeBox compiler infrastructure.
|
|
1465
|
+
|
|
1466
|
+
<a name='typecheck-ajv'></a>
|
|
1467
|
+
|
|
1468
|
+
## Ajv
|
|
1469
|
+
|
|
1470
|
+
The following shows the recommended setup for Ajv.
|
|
1471
|
+
|
|
1472
|
+
```bash
|
|
1473
|
+
$ npm install ajv ajv-formats --save
|
|
1474
|
+
```
|
|
1475
|
+
|
|
1476
|
+
```typescript
|
|
1477
|
+
import { Type } from '@sinclair/typebox'
|
|
1478
|
+
import addFormats from 'ajv-formats'
|
|
1479
|
+
import Ajv from 'ajv'
|
|
1480
|
+
|
|
1481
|
+
const ajv = addFormats(new Ajv({}), [
|
|
1482
|
+
'date-time',
|
|
1483
|
+
'time',
|
|
1484
|
+
'date',
|
|
1485
|
+
'email',
|
|
1486
|
+
'hostname',
|
|
1487
|
+
'ipv4',
|
|
1488
|
+
'ipv6',
|
|
1489
|
+
'uri',
|
|
1490
|
+
'uri-reference',
|
|
1491
|
+
'uuid',
|
|
1492
|
+
'uri-template',
|
|
1493
|
+
'json-pointer',
|
|
1494
|
+
'relative-json-pointer',
|
|
1495
|
+
'regex'
|
|
1496
|
+
])
|
|
1497
|
+
|
|
1498
|
+
const validate = ajv.compile(Type.Object({
|
|
1499
|
+
x: Type.Number(),
|
|
1500
|
+
y: Type.Number(),
|
|
1501
|
+
z: Type.Number()
|
|
1502
|
+
}))
|
|
1503
|
+
|
|
1504
|
+
const R = validate({ x: 1, y: 2, z: 3 }) // const R = true
|
|
1505
|
+
```
|
|
1506
|
+
|
|
1507
|
+
<a name='typecheck-typecompiler'></a>
|
|
1508
|
+
|
|
1509
|
+
### TypeCompiler
|
|
1510
|
+
|
|
1511
|
+
The TypeBox TypeCompiler is a high performance JIT validation compiler that transforms TypeBox types into optimized JavaScript validation routines. The compiler is tuned for fast compilation as well as fast value assertion. It is built to serve as a validation backend that can be integrated into larger applications. It can also be used for code generation.
|
|
1512
|
+
|
|
1513
|
+
The TypeCompiler is provided as an optional import.
|
|
1514
|
+
|
|
1515
|
+
```typescript
|
|
1516
|
+
import { TypeCompiler } from '@sinclair/typebox/compiler'
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
Use the Compile function to JIT compile a type. Note that compilation is generally an expensive operation and should only be performed once per type during application start up. TypeBox does not cache previously compiled types, and applications are expected to hold references to each compiled type for the lifetime of the application.
|
|
1520
|
+
|
|
1521
|
+
```typescript
|
|
1522
|
+
const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck<TObject<{
|
|
1523
|
+
x: Type.Number(), // x: TNumber;
|
|
1524
|
+
y: Type.Number(), // y: TNumber;
|
|
1525
|
+
z: Type.Number() // z: TNumber;
|
|
1526
|
+
})) // }>>
|
|
1527
|
+
|
|
1528
|
+
const R = C.Check({ x: 1, y: 2, z: 3 }) // const R = true
|
|
1529
|
+
```
|
|
1530
|
+
|
|
1531
|
+
Use the Errors function to generate diagnostic errors for a value. The Errors function will return an iterator that when enumerated; will perform an exhaustive check across the entire value yielding any error found. For performance, this function should only be called after a failed Check. Applications may also choose to yield only the first value to avoid exhaustive error generation.
|
|
1532
|
+
|
|
1533
|
+
```typescript
|
|
1534
|
+
const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck<TObject<{
|
|
1535
|
+
x: Type.Number(), // x: TNumber;
|
|
1536
|
+
y: Type.Number(), // y: TNumber;
|
|
1537
|
+
z: Type.Number() // z: TNumber;
|
|
1538
|
+
})) // }>>
|
|
1539
|
+
|
|
1540
|
+
const value = { }
|
|
1541
|
+
|
|
1542
|
+
const first = C.Errors(value).First() // const first = {
|
|
1543
|
+
// schema: { type: 'number' },
|
|
1544
|
+
// path: '/x',
|
|
1545
|
+
// value: undefined,
|
|
1546
|
+
// message: 'Expected number'
|
|
1547
|
+
// }
|
|
1548
|
+
|
|
1549
|
+
const all = [...C.Errors(value)] // const all = [{
|
|
1550
|
+
// schema: { type: 'number' },
|
|
1551
|
+
// path: '/x',
|
|
1552
|
+
// value: undefined,
|
|
1553
|
+
// message: 'Expected number'
|
|
1554
|
+
// }, {
|
|
1555
|
+
// schema: { type: 'number' },
|
|
1556
|
+
// path: '/y',
|
|
1557
|
+
// value: undefined,
|
|
1558
|
+
// message: 'Expected number'
|
|
1559
|
+
// }, {
|
|
1560
|
+
// schema: { type: 'number' },
|
|
1561
|
+
// path: '/z',
|
|
1562
|
+
// value: undefined,
|
|
1563
|
+
// message: 'Expected number'
|
|
1564
|
+
// }]
|
|
1565
|
+
```
|
|
1566
|
+
|
|
1567
|
+
Use the Code function to generate assertion functions as strings. This function can be used to generate code that can be written to disk as importable modules. This technique is sometimes referred to as Ahead of Time (AOT) compilation. The following generates code to check a string.
|
|
1568
|
+
|
|
1569
|
+
```typescript
|
|
1570
|
+
const C = TypeCompiler.Code(Type.String()) // const C = `return function check(value) {
|
|
1571
|
+
// return (
|
|
1572
|
+
// (typeof value === 'string')
|
|
1573
|
+
// )
|
|
1574
|
+
// }`
|
|
1575
|
+
```
|
|
1576
|
+
|
|
1577
|
+
<a name='typemap'></a>
|
|
1578
|
+
|
|
1579
|
+
## TypeMap
|
|
1580
|
+
|
|
1581
|
+
TypeBox offers an external package for bidirectional mapping between TypeBox, Valibot, and Zod type libraries. It also includes syntax parsing support for Valibot and Zod and supports the Standard Schema specification. For more details on TypeMap, refer to the project repository.
|
|
1582
|
+
|
|
1583
|
+
[TypeMap Repository](https://github.com/sinclairzx81/typemap)
|
|
1584
|
+
|
|
1585
|
+
<a name='typemap-usage'></a>
|
|
1586
|
+
|
|
1587
|
+
### Usage
|
|
1588
|
+
|
|
1589
|
+
TypeMap needs to be installed separately
|
|
1590
|
+
|
|
1591
|
+
```bash
|
|
1592
|
+
$ npm install @sinclair/typemap
|
|
1593
|
+
```
|
|
1594
|
+
|
|
1595
|
+
Once installed it offers advanced structural remapping between various runtime type libraries ([Example](https://www.typescriptlang.org/play/?moduleResolution=99&module=199&ts=5.8.0-beta#code/JYWwDg9gTgLgBAbzgFQJ5gKYCEIA8A0cAyqgHYwCGBcAWhACZwC+cAZlBCHAOQACAzsFIBjADYVgUAPQx0GEBTDcAUMuERS-eMjgBeFHJy4AFAAMkuAFxxSAVxAAjDFEKprdx88IAvd-adQzKYAlHBwUlJw6pra1sgA8g4AVhjCMAA8CMphObl5+QWFRcW5ETlWKABy-s4A3NkljU3NBWVhblU1UPUtvX3FbXC+nZ7dDf0TE2VMAHyq0VrEesRklCbIoS1lC-BE1twWfqOuRwE+p87MKmoaiwBKy3T0xkTBAHRgFFD8GMZ2oqJNnltrd4HdrFlJltImEKh4Aj0oU1Bh14XVxkiBjChhcxpjGtMwkA))
|
|
1596
|
+
|
|
1597
|
+
```typescript
|
|
1598
|
+
import { TypeBox, Syntax, Zod } from '@sinclair/typemap'
|
|
1599
|
+
|
|
1600
|
+
const T = TypeBox(`{ x: number, y: number, z: number }`) // const T: TObject<{
|
|
1601
|
+
// x: TNumber;
|
|
1602
|
+
// y: TNumber;
|
|
1603
|
+
// z: TNumber;
|
|
1604
|
+
// }>
|
|
1605
|
+
|
|
1606
|
+
const S = Syntax(T) // const S: '{ x: number, y: number, z: number }'
|
|
1607
|
+
|
|
1608
|
+
const R = Zod(S).parse(null) // const R: {
|
|
1609
|
+
// x: number;
|
|
1610
|
+
// y: number;
|
|
1611
|
+
// z: number;
|
|
1612
|
+
// }
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
<a name='typesystem'></a>
|
|
1616
|
+
|
|
1617
|
+
## TypeSystem
|
|
1618
|
+
|
|
1619
|
+
The TypeBox TypeSystem module provides configurations to use either Json Schema or TypeScript type checking semantics. Configurations made to the TypeSystem module are observed by the TypeCompiler, Value and Error modules.
|
|
1620
|
+
|
|
1621
|
+
<a name='typesystem-policies'></a>
|
|
1622
|
+
|
|
1623
|
+
### Policies
|
|
1624
|
+
|
|
1625
|
+
TypeBox validates using standard Json Schema assertion policies by default. The TypeSystemPolicy module can override some of these to have TypeBox assert values inline with TypeScript static checks. It also provides overrides for certain checking rules related to non-serializable values (such as void) which can be helpful in Json based protocols such as Json Rpc 2.0.
|
|
1626
|
+
|
|
1627
|
+
The following overrides are available.
|
|
1628
|
+
|
|
1629
|
+
```typescript
|
|
1630
|
+
import { TypeSystemPolicy } from '@sinclair/typebox/system'
|
|
1631
|
+
|
|
1632
|
+
// Disallow undefined values for optional properties (default is false)
|
|
1633
|
+
//
|
|
1634
|
+
// const A: { x?: number } = { x: undefined } - disallowed when enabled
|
|
1635
|
+
|
|
1636
|
+
TypeSystemPolicy.ExactOptionalPropertyTypes = true
|
|
1637
|
+
|
|
1638
|
+
// Allow arrays to validate as object types (default is false)
|
|
1639
|
+
//
|
|
1640
|
+
// const A: {} = [] - allowed in TS
|
|
1641
|
+
|
|
1642
|
+
TypeSystemPolicy.AllowArrayObject = true
|
|
1643
|
+
|
|
1644
|
+
// Allow numeric values to be NaN or + or - Infinity (default is false)
|
|
1645
|
+
//
|
|
1646
|
+
// const A: number = NaN - allowed in TS
|
|
1647
|
+
|
|
1648
|
+
TypeSystemPolicy.AllowNaN = true
|
|
1649
|
+
|
|
1650
|
+
// Allow void types to check with undefined and null (default is false)
|
|
1651
|
+
//
|
|
1652
|
+
// Used to signal void return on Json-Rpc 2.0 protocol
|
|
1653
|
+
|
|
1654
|
+
TypeSystemPolicy.AllowNullVoid = true
|
|
1655
|
+
```
|
|
1656
|
+
|
|
1657
|
+
<a name='error-function'></a>
|
|
1658
|
+
|
|
1659
|
+
## Error Function
|
|
1660
|
+
|
|
1661
|
+
Error messages in TypeBox can be customized by defining an ErrorFunction. This function allows for the localization of error messages as well as enabling custom error messages for custom types. By default, TypeBox will generate messages using the `en-US` locale. To support additional locales, you can replicate the function found in `src/errors/function.ts` and create a locale specific translation. The function can then be set via SetErrorFunction.
|
|
1662
|
+
|
|
1663
|
+
The following example shows an inline error function that intercepts errors for String, Number and Boolean only. The DefaultErrorFunction is used to return a default error message.
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
```typescript
|
|
1667
|
+
import { SetErrorFunction, DefaultErrorFunction, ValueErrorType } from '@sinclair/typebox/errors'
|
|
1668
|
+
|
|
1669
|
+
SetErrorFunction((error) => { // i18n override
|
|
1670
|
+
switch(error.errorType) {
|
|
1671
|
+
/* en-US */ case ValueErrorType.String: return 'Expected string'
|
|
1672
|
+
/* fr-FR */ case ValueErrorType.Number: return 'Nombre attendu'
|
|
1673
|
+
/* ko-KR */ case ValueErrorType.Boolean: return '예상 부울'
|
|
1674
|
+
/* en-US */ default: return DefaultErrorFunction(error)
|
|
1675
|
+
}
|
|
1676
|
+
})
|
|
1677
|
+
const T = Type.Object({ // const T: TObject<{
|
|
1678
|
+
x: Type.String(), // TString,
|
|
1679
|
+
y: Type.Number(), // TNumber,
|
|
1680
|
+
z: Type.Boolean() // TBoolean
|
|
1681
|
+
}) // }>
|
|
1682
|
+
|
|
1683
|
+
const E = [...Value.Errors(T, { // const E = [{
|
|
1684
|
+
x: null, // type: 48,
|
|
1685
|
+
y: null, // schema: { ... },
|
|
1686
|
+
z: null // path: '/x',
|
|
1687
|
+
})] // value: null,
|
|
1688
|
+
// message: 'Expected string'
|
|
1689
|
+
// }, {
|
|
1690
|
+
// type: 34,
|
|
1691
|
+
// schema: { ... },
|
|
1692
|
+
// path: '/y',
|
|
1693
|
+
// value: null,
|
|
1694
|
+
// message: 'Nombre attendu'
|
|
1695
|
+
// }, {
|
|
1696
|
+
// type: 14,
|
|
1697
|
+
// schema: { ... },
|
|
1698
|
+
// path: '/z',
|
|
1699
|
+
// value: null,
|
|
1700
|
+
// message: '예상 부울'
|
|
1701
|
+
// }]
|
|
1702
|
+
```
|
|
1703
|
+
|
|
1704
|
+
<a name='workbench'></a>
|
|
1705
|
+
|
|
1706
|
+
## TypeBox Workbench
|
|
1707
|
+
|
|
1708
|
+
TypeBox offers a web based code generation tool that can convert TypeScript types into TypeBox types as well as several other ecosystem libraries.
|
|
1709
|
+
|
|
1710
|
+
[TypeBox Workbench Link Here](https://sinclairzx81.github.io/typebox-workbench/)
|
|
1711
|
+
|
|
1712
|
+
<a name='codegen'></a>
|
|
1713
|
+
|
|
1714
|
+
## TypeBox Codegen
|
|
1715
|
+
|
|
1716
|
+
TypeBox provides a code generation library that can be integrated into toolchains to automate type translation between TypeScript and TypeBox. This library also includes functionality to transform TypeScript types to other ecosystem libraries.
|
|
1717
|
+
|
|
1718
|
+
[TypeBox Codegen Link Here](https://github.com/sinclairzx81/typebox-codegen)
|
|
1719
|
+
|
|
1720
|
+
<a name='ecosystem'></a>
|
|
1721
|
+
|
|
1722
|
+
## Ecosystem
|
|
1723
|
+
|
|
1724
|
+
The following is a list of community packages that offer general tooling, extended functionality and framework integration support for TypeBox.
|
|
1725
|
+
|
|
1726
|
+
| Package | Description |
|
|
1727
|
+
| ------------- | ------------- |
|
|
1728
|
+
| [drizzle-typebox](https://www.npmjs.com/package/drizzle-typebox) | Generates TypeBox types from Drizzle ORM schemas |
|
|
1729
|
+
| [elysia](https://github.com/elysiajs/elysia) | Fast and friendly Bun web framework |
|
|
1730
|
+
| [fastify-type-provider-typebox](https://github.com/fastify/fastify-type-provider-typebox) | Fastify TypeBox integration with the Fastify Type Provider |
|
|
1731
|
+
| [feathersjs](https://github.com/feathersjs/feathers) | The API and real-time application framework |
|
|
1732
|
+
| [fetch-typebox](https://github.com/erfanium/fetch-typebox) | Drop-in replacement for fetch that brings easy integration with TypeBox |
|
|
1733
|
+
| [@lonli-lokli/fetcher-typebox](https://github.com/Lonli-Lokli/fetcher-ts/tree/master/packages/fetcher-typebox) | A strongly-typed fetch wrapper for TypeScript applications with optional runtime validation using TypeBox |
|
|
1734
|
+
| [h3-typebox](https://github.com/kevinmarrec/h3-typebox) | Schema validation utilities for h3 using TypeBox & Ajv |
|
|
1735
|
+
| [http-wizard](https://github.com/flodlc/http-wizard) | Type safe http client library for Fastify |
|
|
1736
|
+
| [json2typebox](https://github.com/hacxy/json2typebox) | Creating TypeBox code from Json Data |
|
|
1737
|
+
| [nominal-typebox](https://github.com/Coder-Spirit/nominal/tree/main/%40coderspirit/nominal-typebox) | Allows devs to integrate nominal types into TypeBox schemas |
|
|
1738
|
+
| [openapi-box](https://github.com/geut/openapi-box) | Generate TypeBox types from OpenApi IDL + Http client library |
|
|
1739
|
+
| [prismabox](https://github.com/m1212e/prismabox) | Converts a prisma.schema to TypeBox schema matching the database models |
|
|
1740
|
+
| [schema2typebox](https://github.com/xddq/schema2typebox) | Creating TypeBox code from Json Schemas |
|
|
1741
|
+
| [sveltekit-superforms](https://github.com/ciscoheat/sveltekit-superforms) | A comprehensive SvelteKit form library for server and client validation |
|
|
1742
|
+
| [ts2typebox](https://github.com/xddq/ts2typebox) | Creating TypeBox code from Typescript types |
|
|
1743
|
+
| [typebox-cli](https://github.com/gsuess/typebox-cli) | Generate Schema with TypeBox from the CLI |
|
|
1744
|
+
| [typebox-form-parser](https://github.com/jtlapp/typebox-form-parser) | Parses form and query data based on TypeBox schemas |
|
|
1745
|
+
| [typebox-schema-faker](https://github.com/iam-medvedev/typebox-schema-faker) | Generate fake data from TypeBox schemas for testing, prototyping and development |
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
<a name='benchmark'></a>
|
|
1749
|
+
|
|
1750
|
+
## Benchmark
|
|
1751
|
+
|
|
1752
|
+
This project maintains a set of benchmarks that measure Ajv, Value and TypeCompiler compilation and validation performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. The results below show for Ajv version 8.12.0 running on Node 20.10.0.
|
|
1753
|
+
|
|
1754
|
+
For additional comparative benchmarks, please refer to [typescript-runtime-type-benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/).
|
|
1755
|
+
|
|
1756
|
+
<a name='benchmark-compile'></a>
|
|
1757
|
+
|
|
1758
|
+
### Compile
|
|
1759
|
+
|
|
1760
|
+
This benchmark measures compilation performance for varying types.
|
|
1761
|
+
|
|
1762
|
+
```typescript
|
|
1763
|
+
┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┐
|
|
1764
|
+
│ (index) │ Iterations │ Ajv │ TypeCompiler │ Performance │
|
|
1765
|
+
├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┤
|
|
1766
|
+
│ Literal_String │ 1000 │ ' 211 ms' │ ' 8 ms' │ ' 26.38 x' │
|
|
1767
|
+
│ Literal_Number │ 1000 │ ' 185 ms' │ ' 5 ms' │ ' 37.00 x' │
|
|
1768
|
+
│ Literal_Boolean │ 1000 │ ' 195 ms' │ ' 4 ms' │ ' 48.75 x' │
|
|
1769
|
+
│ Primitive_Number │ 1000 │ ' 149 ms' │ ' 7 ms' │ ' 21.29 x' │
|
|
1770
|
+
│ Primitive_String │ 1000 │ ' 135 ms' │ ' 5 ms' │ ' 27.00 x' │
|
|
1771
|
+
│ Primitive_String_Pattern │ 1000 │ ' 193 ms' │ ' 10 ms' │ ' 19.30 x' │
|
|
1772
|
+
│ Primitive_Boolean │ 1000 │ ' 152 ms' │ ' 4 ms' │ ' 38.00 x' │
|
|
1773
|
+
│ Primitive_Null │ 1000 │ ' 147 ms' │ ' 4 ms' │ ' 36.75 x' │
|
|
1774
|
+
│ Object_Unconstrained │ 1000 │ ' 1065 ms' │ ' 26 ms' │ ' 40.96 x' │
|
|
1775
|
+
│ Object_Constrained │ 1000 │ ' 1183 ms' │ ' 26 ms' │ ' 45.50 x' │
|
|
1776
|
+
│ Object_Vector3 │ 1000 │ ' 407 ms' │ ' 9 ms' │ ' 45.22 x' │
|
|
1777
|
+
│ Object_Box3D │ 1000 │ ' 1777 ms' │ ' 24 ms' │ ' 74.04 x' │
|
|
1778
|
+
│ Tuple_Primitive │ 1000 │ ' 485 ms' │ ' 11 ms' │ ' 44.09 x' │
|
|
1779
|
+
│ Tuple_Object │ 1000 │ ' 1344 ms' │ ' 17 ms' │ ' 79.06 x' │
|
|
1780
|
+
│ Composite_Intersect │ 1000 │ ' 606 ms' │ ' 14 ms' │ ' 43.29 x' │
|
|
1781
|
+
│ Composite_Union │ 1000 │ ' 522 ms' │ ' 17 ms' │ ' 30.71 x' │
|
|
1782
|
+
│ Math_Vector4 │ 1000 │ ' 851 ms' │ ' 9 ms' │ ' 94.56 x' │
|
|
1783
|
+
│ Math_Matrix4 │ 1000 │ ' 406 ms' │ ' 10 ms' │ ' 40.60 x' │
|
|
1784
|
+
│ Array_Primitive_Number │ 1000 │ ' 367 ms' │ ' 6 ms' │ ' 61.17 x' │
|
|
1785
|
+
│ Array_Primitive_String │ 1000 │ ' 339 ms' │ ' 7 ms' │ ' 48.43 x' │
|
|
1786
|
+
│ Array_Primitive_Boolean │ 1000 │ ' 325 ms' │ ' 5 ms' │ ' 65.00 x' │
|
|
1787
|
+
│ Array_Object_Unconstrained │ 1000 │ ' 1863 ms' │ ' 21 ms' │ ' 88.71 x' │
|
|
1788
|
+
│ Array_Object_Constrained │ 1000 │ ' 1535 ms' │ ' 18 ms' │ ' 85.28 x' │
|
|
1789
|
+
│ Array_Tuple_Primitive │ 1000 │ ' 829 ms' │ ' 14 ms' │ ' 59.21 x' │
|
|
1790
|
+
│ Array_Tuple_Object │ 1000 │ ' 1674 ms' │ ' 14 ms' │ ' 119.57 x' │
|
|
1791
|
+
│ Array_Composite_Intersect │ 1000 │ ' 789 ms' │ ' 13 ms' │ ' 60.69 x' │
|
|
1792
|
+
│ Array_Composite_Union │ 1000 │ ' 822 ms' │ ' 15 ms' │ ' 54.80 x' │
|
|
1793
|
+
│ Array_Math_Vector4 │ 1000 │ ' 1129 ms' │ ' 14 ms' │ ' 80.64 x' │
|
|
1794
|
+
│ Array_Math_Matrix4 │ 1000 │ ' 673 ms' │ ' 9 ms' │ ' 74.78 x' │
|
|
1795
|
+
└────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┘
|
|
1796
|
+
```
|
|
1797
|
+
|
|
1798
|
+
<a name='benchmark-validate'></a>
|
|
1799
|
+
|
|
1800
|
+
### Validate
|
|
1801
|
+
|
|
1802
|
+
This benchmark measures validation performance for varying types.
|
|
1803
|
+
|
|
1804
|
+
```typescript
|
|
1805
|
+
┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┐
|
|
1806
|
+
│ (index) │ Iterations │ ValueCheck │ Ajv │ TypeCompiler │ Performance │
|
|
1807
|
+
├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
|
|
1808
|
+
│ Literal_String │ 1000000 │ ' 17 ms' │ ' 5 ms' │ ' 5 ms' │ ' 1.00 x' │
|
|
1809
|
+
│ Literal_Number │ 1000000 │ ' 14 ms' │ ' 18 ms' │ ' 9 ms' │ ' 2.00 x' │
|
|
1810
|
+
│ Literal_Boolean │ 1000000 │ ' 14 ms' │ ' 20 ms' │ ' 9 ms' │ ' 2.22 x' │
|
|
1811
|
+
│ Primitive_Number │ 1000000 │ ' 17 ms' │ ' 19 ms' │ ' 9 ms' │ ' 2.11 x' │
|
|
1812
|
+
│ Primitive_String │ 1000000 │ ' 17 ms' │ ' 18 ms' │ ' 10 ms' │ ' 1.80 x' │
|
|
1813
|
+
│ Primitive_String_Pattern │ 1000000 │ ' 172 ms' │ ' 46 ms' │ ' 41 ms' │ ' 1.12 x' │
|
|
1814
|
+
│ Primitive_Boolean │ 1000000 │ ' 14 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │
|
|
1815
|
+
│ Primitive_Null │ 1000000 │ ' 16 ms' │ ' 19 ms' │ ' 9 ms' │ ' 2.11 x' │
|
|
1816
|
+
│ Object_Unconstrained │ 1000000 │ ' 437 ms' │ ' 28 ms' │ ' 14 ms' │ ' 2.00 x' │
|
|
1817
|
+
│ Object_Constrained │ 1000000 │ ' 653 ms' │ ' 46 ms' │ ' 37 ms' │ ' 1.24 x' │
|
|
1818
|
+
│ Object_Vector3 │ 1000000 │ ' 201 ms' │ ' 22 ms' │ ' 12 ms' │ ' 1.83 x' │
|
|
1819
|
+
│ Object_Box3D │ 1000000 │ ' 961 ms' │ ' 37 ms' │ ' 19 ms' │ ' 1.95 x' │
|
|
1820
|
+
│ Object_Recursive │ 1000000 │ ' 3715 ms' │ ' 363 ms' │ ' 174 ms' │ ' 2.09 x' │
|
|
1821
|
+
│ Tuple_Primitive │ 1000000 │ ' 107 ms' │ ' 23 ms' │ ' 11 ms' │ ' 2.09 x' │
|
|
1822
|
+
│ Tuple_Object │ 1000000 │ ' 375 ms' │ ' 28 ms' │ ' 15 ms' │ ' 1.87 x' │
|
|
1823
|
+
│ Composite_Intersect │ 1000000 │ ' 377 ms' │ ' 22 ms' │ ' 12 ms' │ ' 1.83 x' │
|
|
1824
|
+
│ Composite_Union │ 1000000 │ ' 337 ms' │ ' 30 ms' │ ' 17 ms' │ ' 1.76 x' │
|
|
1825
|
+
│ Math_Vector4 │ 1000000 │ ' 137 ms' │ ' 23 ms' │ ' 11 ms' │ ' 2.09 x' │
|
|
1826
|
+
│ Math_Matrix4 │ 1000000 │ ' 576 ms' │ ' 37 ms' │ ' 28 ms' │ ' 1.32 x' │
|
|
1827
|
+
│ Array_Primitive_Number │ 1000000 │ ' 145 ms' │ ' 23 ms' │ ' 12 ms' │ ' 1.92 x' │
|
|
1828
|
+
│ Array_Primitive_String │ 1000000 │ ' 152 ms' │ ' 22 ms' │ ' 13 ms' │ ' 1.69 x' │
|
|
1829
|
+
│ Array_Primitive_Boolean │ 1000000 │ ' 131 ms' │ ' 20 ms' │ ' 13 ms' │ ' 1.54 x' │
|
|
1830
|
+
│ Array_Object_Unconstrained │ 1000000 │ ' 2821 ms' │ ' 62 ms' │ ' 45 ms' │ ' 1.38 x' │
|
|
1831
|
+
│ Array_Object_Constrained │ 1000000 │ ' 2958 ms' │ ' 119 ms' │ ' 134 ms' │ ' 0.89 x' │
|
|
1832
|
+
│ Array_Object_Recursive │ 1000000 │ ' 14695 ms' │ ' 1621 ms' │ ' 635 ms' │ ' 2.55 x' │
|
|
1833
|
+
│ Array_Tuple_Primitive │ 1000000 │ ' 478 ms' │ ' 35 ms' │ ' 28 ms' │ ' 1.25 x' │
|
|
1834
|
+
│ Array_Tuple_Object │ 1000000 │ ' 1623 ms' │ ' 63 ms' │ ' 48 ms' │ ' 1.31 x' │
|
|
1835
|
+
│ Array_Composite_Intersect │ 1000000 │ ' 1582 ms' │ ' 43 ms' │ ' 30 ms' │ ' 1.43 x' │
|
|
1836
|
+
│ Array_Composite_Union │ 1000000 │ ' 1331 ms' │ ' 76 ms' │ ' 40 ms' │ ' 1.90 x' │
|
|
1837
|
+
│ Array_Math_Vector4 │ 1000000 │ ' 564 ms' │ ' 38 ms' │ ' 24 ms' │ ' 1.58 x' │
|
|
1838
|
+
│ Array_Math_Matrix4 │ 1000000 │ ' 2382 ms' │ ' 111 ms' │ ' 83 ms' │ ' 1.34 x' │
|
|
1839
|
+
└────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┘
|
|
1840
|
+
```
|
|
1841
|
+
|
|
1842
|
+
<a name='benchmark-compression'></a>
|
|
1843
|
+
|
|
1844
|
+
### Compression
|
|
1845
|
+
|
|
1846
|
+
The following table lists esbuild compiled and minified sizes for each TypeBox module.
|
|
1847
|
+
|
|
1848
|
+
```typescript
|
|
1849
|
+
┌──────────────────────┬────────────┬────────────┬─────────────┐
|
|
1850
|
+
│ (index) │ Compiled │ Minified │ Compression │
|
|
1851
|
+
├──────────────────────┼────────────┼────────────┼─────────────┤
|
|
1852
|
+
│ typebox/compiler │ '122.4 kb' │ ' 53.4 kb' │ '2.29 x' │
|
|
1853
|
+
│ typebox/errors │ ' 67.6 kb' │ ' 29.6 kb' │ '2.28 x' │
|
|
1854
|
+
│ typebox/syntax │ '132.9 kb' │ ' 54.2 kb' │ '2.45 x' │
|
|
1855
|
+
│ typebox/system │ ' 7.4 kb' │ ' 3.2 kb' │ '2.33 x' │
|
|
1856
|
+
│ typebox/value │ '150.1 kb' │ ' 62.2 kb' │ '2.41 x' │
|
|
1857
|
+
│ typebox │ '106.8 kb' │ ' 43.2 kb' │ '2.47 x' │
|
|
1858
|
+
└──────────────────────┴────────────┴────────────┴─────────────┘
|
|
1859
|
+
```
|
|
1860
|
+
|
|
1861
|
+
<a name='contribute'></a>
|
|
1862
|
+
|
|
1863
|
+
## Contribute
|
|
1864
|
+
|
|
1865
|
+
TypeBox is open to community contribution. Please ensure you submit an open issue before submitting your pull request. The TypeBox project prefers open community discussion before accepting new features.
|