typebox 1.0.70 → 1.0.71

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.
@@ -1,7 +1,7 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
2
  import type { XStaticSchema } from './schema.mjs';
3
3
  import type { XStaticElements } from './~elements.mjs';
4
- type TFromSized<Stack extends string[], Root extends XSchema, Schema extends XSchema, Items extends XSchema[]> = (XStaticElements<Stack, Root, Schema, Items>);
5
- type TFromUnsized<Stack extends string[], Root extends XSchema, Schema extends XSchema> = (XStaticSchema<Stack, Root, Schema>[]);
6
- export type XStaticItems<Stack extends string[], Root extends XSchema, Schema extends XSchema, Items extends XSchema[] | XSchema, Result extends unknown = (Items extends XSchema[] ? TFromSized<Stack, Root, Schema, [...Items]> : Items extends XSchema ? TFromUnsized<Stack, Root, Items> : never)> = Result;
4
+ type XFromSized<Stack extends string[], Root extends XSchema, Schema extends XSchema, Items extends XSchema[]> = (XStaticElements<Stack, Root, Schema, Items>);
5
+ type XFromUnsized<Stack extends string[], Root extends XSchema, Schema extends XSchema> = (XStaticSchema<Stack, Root, Schema>[]);
6
+ export type XStaticItems<Stack extends string[], Root extends XSchema, Schema extends XSchema, Items extends XSchema[] | XSchema, Result extends unknown = (Items extends XSchema[] ? XFromSized<Stack, Root, Schema, [...Items]> : Items extends XSchema ? XFromUnsized<Stack, Root, Items> : never)> = Result;
7
7
  export {};
@@ -1,11 +1,11 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
2
  import type { XStaticSchema } from './schema.mjs';
3
- import type { TIsReadonly } from './~readonly.mjs';
4
- type TReadonlyOptionalProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>> = {
5
- readonly [Key in keyof Properties as TIsReadonly<Properties[Key]> extends true ? Key : never]?: XStaticSchema<Stack, Root, Properties[Key]>;
3
+ import type { XIsReadonly } from './~readonly.mjs';
4
+ type XReadonlyOptionalProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>> = {
5
+ readonly [Key in keyof Properties as XIsReadonly<Properties[Key]> extends true ? Key : never]?: XStaticSchema<Stack, Root, Properties[Key]>;
6
6
  };
7
- type TOptionalProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>> = {
8
- [Key in keyof Properties as TIsReadonly<Properties[Key]> extends true ? never : Key]?: XStaticSchema<Stack, Root, Properties[Key]>;
7
+ type XOptionalProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>> = {
8
+ [Key in keyof Properties as XIsReadonly<Properties[Key]> extends true ? never : Key]?: XStaticSchema<Stack, Root, Properties[Key]>;
9
9
  };
10
- export type XStaticProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, ReadonlyOptional extends Record<PropertyKey, unknown> = TReadonlyOptionalProperties<Stack, Root, Properties>, Optional extends Record<PropertyKey, unknown> = TOptionalProperties<Stack, Root, Properties>, Result extends Record<PropertyKey, unknown> = ReadonlyOptional & Optional> = Result;
10
+ export type XStaticProperties<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, ReadonlyOptional extends Record<PropertyKey, unknown> = XReadonlyOptionalProperties<Stack, Root, Properties>, Optional extends Record<PropertyKey, unknown> = XOptionalProperties<Stack, Root, Properties>, Result extends Record<PropertyKey, unknown> = ReadonlyOptional & Optional> = Result;
11
11
  export {};
@@ -1,8 +1,8 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
2
  import type { XPointerGet } from '../pointer/pointer-get.mjs';
3
3
  import type { XStaticSchema } from './schema.mjs';
4
- type CyclicCheck<Stack extends unknown[], MaxLength extends number, Buffer extends unknown[] = []> = (Stack extends [infer Left, ...infer Right] ? Buffer['length'] extends MaxLength ? false : CyclicCheck<Right, MaxLength, [...Buffer, Left]> : true);
5
- type CyclicGuard<Stack extends unknown[], Ref extends string> = (Ref extends Stack[number] ? CyclicCheck<Stack, 2> : true);
6
- type TNormal<Pointer extends string, Result extends string = (Pointer extends `#${infer Rest extends string}` ? Rest : Pointer)> = Result;
7
- export type XStaticRef<Stack extends string[], Root extends XSchema, Ref extends string, Normal extends string = TNormal<Ref>, Target extends unknown = XPointerGet<Root, Normal>, Schema extends XSchema = Target extends XSchema ? Target : {}, Result extends unknown = (CyclicGuard<Stack, Ref> extends true ? XStaticSchema<[...Stack, Ref], Root, Schema> : any)> = Result;
4
+ type XCyclicCheck<Stack extends unknown[], MaxLength extends number, Buffer extends unknown[] = []> = (Stack extends [infer Left, ...infer Right] ? Buffer['length'] extends MaxLength ? false : XCyclicCheck<Right, MaxLength, [...Buffer, Left]> : true);
5
+ type XCyclicGuard<Stack extends unknown[], Ref extends string> = (Ref extends Stack[number] ? XCyclicCheck<Stack, 2> : true);
6
+ type XNormal<Pointer extends string, Result extends string = (Pointer extends `#${infer Rest extends string}` ? Rest : Pointer)> = Result;
7
+ export type XStaticRef<Stack extends string[], Root extends XSchema, Ref extends string, Normal extends string = XNormal<Ref>, Target extends unknown = XPointerGet<Root, Normal>, Schema extends XSchema = Target extends XSchema ? Target : {}, Result extends unknown = (XCyclicGuard<Stack, Ref> extends true ? XStaticSchema<[...Stack, Ref], Root, Schema> : any)> = Result;
8
8
  export {};
@@ -1,13 +1,13 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
2
  import type { XProperties } from '../types/properties.mjs';
3
- import type { TIsReadonly } from './~readonly.mjs';
3
+ import type { XIsReadonly } from './~readonly.mjs';
4
4
  import type { XStaticSchema } from './schema.mjs';
5
- type TResolveProperties<Schema extends XSchema, Result extends Record<PropertyKey, XSchema> = (Schema extends XProperties<infer Properties extends Record<PropertyKey, XSchema>> ? Properties : {})> = Result;
6
- type TFromKey<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, Key extends string, Readonly extends boolean = Key extends keyof Properties ? TIsReadonly<Properties[Key]> : false, Value extends unknown = Key extends keyof Properties ? XStaticSchema<Stack, Root, Properties[Key]> : unknown, Result extends Record<PropertyKey, unknown> = (Readonly extends true ? {
5
+ type XResolveProperties<Schema extends XSchema, Result extends Record<PropertyKey, XSchema> = (Schema extends XProperties<infer Properties extends Record<PropertyKey, XSchema>> ? Properties : {})> = Result;
6
+ type XFromKey<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, Key extends string, Readonly extends boolean = Key extends keyof Properties ? XIsReadonly<Properties[Key]> : false, Value extends unknown = Key extends keyof Properties ? XStaticSchema<Stack, Root, Properties[Key]> : unknown, Result extends Record<PropertyKey, unknown> = (Readonly extends true ? {
7
7
  readonly [_ in Key]: Value;
8
8
  } : {
9
9
  [_ in Key]: Value;
10
10
  })> = Result;
11
- type TFromKeys<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, Keys extends string[], Result extends Record<PropertyKey, unknown> = {}> = (Keys extends [infer Left extends string, ...infer Right extends string[]] ? TFromKeys<Stack, Root, Properties, Right, Result & TFromKey<Stack, Root, Properties, Left>> : Result);
12
- export type XStaticRequired<Stack extends string[], Root extends XSchema, Schema extends XSchema, Keys extends string[], Properties extends Record<PropertyKey, XSchema> = TResolveProperties<Schema>, Result extends Record<PropertyKey, unknown> = TFromKeys<Stack, Root, Properties, Keys>> = Result;
11
+ type XFromKeys<Stack extends string[], Root extends XSchema, Properties extends Record<PropertyKey, XSchema>, Keys extends string[], Result extends Record<PropertyKey, unknown> = {}> = (Keys extends [infer Left extends string, ...infer Right extends string[]] ? XFromKeys<Stack, Root, Properties, Right, Result & XFromKey<Stack, Root, Properties, Left>> : Result);
12
+ export type XStaticRequired<Stack extends string[], Root extends XSchema, Schema extends XSchema, Keys extends string[], Properties extends Record<PropertyKey, XSchema> = XResolveProperties<Schema>, Result extends Record<PropertyKey, unknown> = XFromKeys<Stack, Root, Properties, Keys>> = Result;
13
13
  export {};
@@ -29,7 +29,7 @@ import type { XStaticRef } from './ref.mjs';
29
29
  import type { XStaticRequired } from './required.mjs';
30
30
  import type { XStaticType } from './type.mjs';
31
31
  import type { XStaticUnevaluatedProperties } from './unevaluatedProperties.mjs';
32
- type TFromKeywords<Stack extends string[], Root extends XSchema, Schema extends XSchema, Result extends unknown[] = [
32
+ type XFromKeywords<Stack extends string[], Root extends XSchema, Schema extends XSchema, Result extends unknown[] = [
33
33
  Schema extends XAdditionalProperties<infer Type extends XSchema> ? XStaticAdditionalProperties<Stack, Root, Type> : unknown,
34
34
  Schema extends XAllOf<infer Types extends XSchema[]> ? XStaticAllOf<Stack, Root, Types> : unknown,
35
35
  Schema extends XAnyOf<infer Types extends XSchema[]> ? XStaticAnyOf<Stack, Root, Types> : unknown,
@@ -45,11 +45,11 @@ type TFromKeywords<Stack extends string[], Root extends XSchema, Schema extends
45
45
  Schema extends XType<infer TypeName extends string[] | string> ? XStaticType<TypeName> : unknown,
46
46
  Schema extends XUnevaluatedProperties<infer Type extends XSchema> ? XStaticUnevaluatedProperties<Stack, Root, Type> : unknown
47
47
  ]> = Result;
48
- type TKeywordsIntersected<Schemas extends unknown[], Result extends unknown = unknown> = (Schemas extends [infer Left extends unknown, ...infer Right extends unknown[]] ? TKeywordsIntersected<Right, Result & Left> : Result);
49
- type TKeywordsEvaluated<Schema extends unknown, Result extends unknown = Schema extends object ? {
48
+ type XKeywordsIntersected<Schemas extends unknown[], Result extends unknown = unknown> = (Schemas extends [infer Left extends unknown, ...infer Right extends unknown[]] ? XKeywordsIntersected<Right, Result & Left> : Result);
49
+ type XKeywordsEvaluated<Schema extends unknown, Result extends unknown = Schema extends object ? {
50
50
  [Key in keyof Schema]: Schema[Key];
51
51
  } : Schema> = Result;
52
- export type XStaticObject<Stack extends string[], Root extends XSchema, Schema extends XSchema, Keywords extends unknown[] = TFromKeywords<Stack, Root, Schema>, Intersected extends unknown = TKeywordsIntersected<Keywords>, Evaluated extends unknown = TKeywordsEvaluated<Intersected>> = Evaluated;
52
+ export type XStaticObject<Stack extends string[], Root extends XSchema, Schema extends XSchema, Keywords extends unknown[] = XFromKeywords<Stack, Root, Schema>, Intersected extends unknown = XKeywordsIntersected<Keywords>, Evaluated extends unknown = XKeywordsEvaluated<Intersected>> = Evaluated;
53
53
  export type XStaticBoolean<Schema extends boolean, Result extends unknown = Schema extends false ? never : unknown> = Result;
54
54
  export type XStaticSchema<Stack extends string[], Root extends XSchema, Schema extends XSchema, Result extends unknown = Schema extends boolean ? XStaticBoolean<Schema> : XStaticObject<Stack, Root, Schema>> = Result;
55
55
  export {};
@@ -1,4 +1,4 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
- import type { XMutable } from './~mutable.mjs';
2
+ import type { XNonReadonly } from './~non-readonly.mjs';
3
3
  import type { XStaticSchema } from './schema.mjs';
4
- export type XStatic<Value extends unknown, Schema extends XSchema = Value extends XSchema ? Value : {}, Mutable extends XSchema = XMutable<Schema>, Result extends unknown = XStaticSchema<[], Mutable, Mutable>> = Result;
4
+ export type XStatic<Value extends unknown, Schema extends XSchema = Value extends XSchema ? Value : {}, NonReadonly extends XSchema = XNonReadonly<Schema>, Result extends unknown = XStaticSchema<[], NonReadonly, NonReadonly>> = Result;
@@ -1,4 +1,4 @@
1
- type TFromTypeNames<TypeNames extends string[], Result extends unknown = never> = (TypeNames extends readonly [infer Left extends string, ...infer Right extends string[]] ? TFromTypeNames<Right, Result | TFromTypeName<Left>> : Result);
2
- type TFromTypeName<TypeName extends string> = (TypeName extends 'array' ? {} : TypeName extends 'bigint' ? bigint : TypeName extends 'boolean' ? boolean : TypeName extends 'integer' ? number : TypeName extends 'object' ? object : TypeName extends 'null' ? null : TypeName extends 'number' ? number : TypeName extends 'string' ? string : TypeName extends 'symbol' ? symbol : TypeName extends 'undefined' ? undefined : unknown);
3
- export type XStaticType<TypeName extends string[] | string> = (TypeName extends string[] ? TFromTypeNames<TypeName> : TypeName extends string ? TFromTypeName<TypeName> : unknown);
1
+ type XFromTypeNames<TypeNames extends string[], Result extends unknown = never> = (TypeNames extends readonly [infer Left extends string, ...infer Right extends string[]] ? XFromTypeNames<Right, Result | XFromTypeName<Left>> : Result);
2
+ type XFromTypeName<TypeName extends string> = (TypeName extends 'object' ? object : TypeName extends 'array' ? {} : TypeName extends 'boolean' ? boolean : TypeName extends 'integer' ? number : TypeName extends 'number' ? number : TypeName extends 'null' ? null : TypeName extends 'string' ? string : TypeName extends 'bigint' ? bigint : TypeName extends 'symbol' ? symbol : TypeName extends 'undefined' ? undefined : TypeName extends 'void' ? void : TypeName extends 'asyncIterator' ? {} : TypeName extends 'constructor' ? {} : TypeName extends 'function' ? {} : TypeName extends 'iterator' ? {} : unknown);
3
+ export type XStaticType<TypeName extends string[] | string> = (TypeName extends string[] ? XFromTypeNames<TypeName> : TypeName extends string ? XFromTypeName<TypeName> : unknown);
4
4
  export {};
@@ -1,6 +1,6 @@
1
- type CreateTuple<Size extends number, Tuple extends unknown[] = []> = Tuple['length'] extends Size ? Tuple : CreateTuple<Size, [...Tuple, unknown]>;
2
- export type XLessThan<Left extends number, Right extends number> = Left extends Right ? false : CreateTuple<Left> extends [...CreateTuple<Right>, ...infer _Rest] ? false : true;
3
- export type XLessThanEqual<Left extends number, Right extends number> = Left extends Right ? true : XLessThan<Left, Right>;
4
- export type XGreaterThan<Left extends number, Right extends number> = XLessThan<Right, Left>;
5
- export type XGreaterThanEqual<Left extends number, Right extends number> = XLessThanEqual<Right, Left>;
1
+ type XBuildTuple<Size extends number, Tuple extends unknown[] = []> = (Tuple['length'] extends Size ? Tuple : XBuildTuple<Size, [...Tuple, unknown]>);
2
+ export type XLessThan<Left extends number, Right extends number> = Left extends Right ? false : XBuildTuple<Left> extends [...XBuildTuple<Right>, ...infer _Rest] ? false : true;
3
+ export type XLessThanEqual<Left extends number, Right extends number> = (Left extends Right ? true : XLessThan<Left, Right>);
4
+ export type XGreaterThan<Left extends number, Right extends number> = (XLessThan<Right, Left>);
5
+ export type XGreaterThanEqual<Left extends number, Right extends number> = (XLessThanEqual<Right, Left>);
6
6
  export {};
@@ -1 +1,2 @@
1
+ // deno-fmt-ignore-file
1
2
  export {};
@@ -4,15 +4,15 @@ import type { XMaxItems } from '../types/maxItems.mjs';
4
4
  import type { XAdditionalItems } from '../types/additionalItems.mjs';
5
5
  import type { XStaticSchema } from './schema.mjs';
6
6
  import type { XLessThan } from './~comparer.mjs';
7
- type TElements<Stack extends string[], Root extends XSchema, Schemas extends XSchema[], Result extends unknown[] = []> = (Schemas extends [infer Left extends XSchema, ...infer Right extends XSchema[]] ? TElements<Stack, Root, Right, [...Result, XStaticSchema<Stack, Root, Left>]> : Result);
8
- type TMaxItemsRemap<Elements extends unknown[], MaxItems extends number, Result extends unknown[] = []> = (Elements extends [infer Left extends unknown, ...infer Right extends unknown[]] ? XLessThan<Result['length'], MaxItems> extends true ? TMaxItemsRemap<Right, MaxItems, [...Result, Left]> : Result : Result);
9
- type TMaxItems<Schema extends XSchema, Elements extends unknown[], MaxItems extends number | null = Schema extends XMaxItems<infer MaxItems extends number> ? MaxItems : null, Result extends unknown[] = MaxItems extends number ? TMaxItemsRemap<Elements, MaxItems> : Elements> = Result;
10
- type TNeedsAdditionalItems<Schema extends XSchema, Elements extends unknown[], MaxItems extends number | null = Schema extends XMaxItems<infer MaxItems extends number> ? MaxItems : null, Result extends boolean = MaxItems extends number ? XLessThan<Elements['length'], MaxItems> : true> = Result;
11
- type TMinItemsRemap<Elements extends unknown[], MinItems extends number, Result extends unknown[] = []> = (Elements extends [infer Left, ...infer Right] ? XLessThan<Result['length'], MinItems> extends true ? TMinItemsRemap<Right, MinItems, [...Result, Left]> : TMinItemsRemap<Right, MinItems, [...Result, Left?]> : Result);
12
- type TMinItems<Schema extends XSchema, Values extends unknown[], MinItems extends number = Schema extends XMinItems<infer MinItems extends number> ? MinItems : 0, Result extends unknown[] = TMinItemsRemap<Values, MinItems>> = Result;
13
- type TAdditionalItems<Stack extends string[], Root extends XSchema, Schema extends XSchema, Elements extends unknown[], Result extends unknown[] = Schema extends XAdditionalItems<infer Schema extends XSchema> ? (Schema extends true ? [...Elements, ...unknown[]] : Schema extends false ? [...Elements] : [
7
+ type XWithElements<Stack extends string[], Root extends XSchema, Schemas extends XSchema[], Result extends unknown[] = []> = (Schemas extends [infer Left extends XSchema, ...infer Right extends XSchema[]] ? XWithElements<Stack, Root, Right, [...Result, XStaticSchema<Stack, Root, Left>]> : Result);
8
+ type XWithMaxItemsRemap<Elements extends unknown[], MaxItems extends number, Result extends unknown[] = []> = (Elements extends [infer Left extends unknown, ...infer Right extends unknown[]] ? XLessThan<Result['length'], MaxItems> extends true ? XWithMaxItemsRemap<Right, MaxItems, [...Result, Left]> : Result : Result);
9
+ type XWithMaxItems<Schema extends XSchema, Elements extends unknown[], MaxItems extends number | null = Schema extends XMaxItems<infer MaxItems extends number> ? MaxItems : null, Result extends unknown[] = MaxItems extends number ? XWithMaxItemsRemap<Elements, MaxItems> : Elements> = Result;
10
+ type XNeedsAdditionalItems<Schema extends XSchema, Elements extends unknown[], MaxItems extends number | null = Schema extends XMaxItems<infer MaxItems extends number> ? MaxItems : null, Result extends boolean = MaxItems extends number ? XLessThan<Elements['length'], MaxItems> : true> = Result;
11
+ type XWithMinItemsRemap<Elements extends unknown[], MinItems extends number, Result extends unknown[] = []> = (Elements extends [infer Left, ...infer Right] ? XLessThan<Result['length'], MinItems> extends true ? XWithMinItemsRemap<Right, MinItems, [...Result, Left]> : XWithMinItemsRemap<Right, MinItems, [...Result, Left?]> : Result);
12
+ type XWithMinItems<Schema extends XSchema, Values extends unknown[], MinItems extends number = Schema extends XMinItems<infer MinItems extends number> ? MinItems : 0, Result extends unknown[] = XWithMinItemsRemap<Values, MinItems>> = Result;
13
+ type XWithAdditionalItems<Stack extends string[], Root extends XSchema, Schema extends XSchema, Elements extends unknown[], Result extends unknown[] = Schema extends XAdditionalItems<infer Schema extends XSchema> ? (Schema extends true ? [...Elements, ...unknown[]] : Schema extends false ? [...Elements] : [
14
14
  ...Elements,
15
15
  ...XStaticSchema<Stack, Root, Schema>[]
16
16
  ]) : [...Elements, ...unknown[]]> = Result;
17
- export type XStaticElements<Stack extends string[], Root extends XSchema, Schema extends XSchema, PrefixItems extends XSchema[], Elements extends unknown[] = TElements<Stack, Root, PrefixItems>, WithMaxItems extends unknown[] = TMaxItems<Schema, Elements>, NeedsAdditional extends boolean = TNeedsAdditionalItems<Schema, WithMaxItems>, WithMinItems extends unknown[] = TMinItems<Schema, WithMaxItems>, WithAdditionalItems extends unknown[] = NeedsAdditional extends true ? TAdditionalItems<Stack, Root, Schema, WithMinItems> : WithMinItems> = WithAdditionalItems;
17
+ export type XStaticElements<Stack extends string[], Root extends XSchema, Schema extends XSchema, PrefixItems extends XSchema[], WithElements extends unknown[] = XWithElements<Stack, Root, PrefixItems>, WithMaxItems extends unknown[] = XWithMaxItems<Schema, WithElements>, NeedsAdditional extends boolean = XNeedsAdditionalItems<Schema, WithMaxItems>, WithMinItems extends unknown[] = XWithMinItems<Schema, WithMaxItems>, WithAdditionalItems extends unknown[] = NeedsAdditional extends true ? XWithAdditionalItems<Stack, Root, Schema, WithMinItems> : WithMinItems> = WithAdditionalItems;
18
18
  export {};
@@ -0,0 +1,7 @@
1
+ type XFromTuple<Value extends readonly unknown[]> = (Value extends [infer Left, ...infer Right extends unknown[]] ? [XNonReadonly<Left>, ...XFromTuple<Right>] : []);
2
+ type XFromArray<Value extends unknown, Result extends unknown[] = XNonReadonly<Value>[]> = Result;
3
+ type XFromObject<Value extends object, Result extends Record<PropertyKey, unknown> = {
4
+ -readonly [K in keyof Value]: XNonReadonly<Value[K]>;
5
+ }> = Result;
6
+ export type XNonReadonly<Value extends unknown> = (Value extends readonly [...infer Schemas extends unknown[]] ? XFromTuple<Schemas> : Value extends readonly (infer Schema)[] ? XFromArray<Schema> : Value extends object ? XFromObject<Value> : Value);
7
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { XSchema } from '../types/schema.mjs';
2
- export type TIsReadonly<Schema extends XSchema> = (Schema extends {
2
+ export type XIsReadonly<Schema extends XSchema> = (Schema extends {
3
3
  readOnly: true;
4
4
  } ? true : Schema extends {
5
5
  '~readonly': true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.0.70",
4
+ "version": "1.0.71",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
@@ -1,7 +0,0 @@
1
- type TFromTuple<Value extends readonly unknown[]> = (Value extends [infer Left, ...infer Right extends unknown[]] ? [XMutable<Left>, ...TFromTuple<Right>] : []);
2
- type TFromArray<Value extends unknown, Result extends unknown[] = XMutable<Value>[]> = Result;
3
- type TFromObject<Value extends object, Result extends Record<PropertyKey, unknown> = {
4
- -readonly [K in keyof Value]: XMutable<Value[K]>;
5
- }> = Result;
6
- export type XMutable<Value extends unknown> = (Value extends readonly [...infer Schemas extends unknown[]] ? TFromTuple<Schemas> : Value extends readonly (infer Schema)[] ? TFromArray<Schema> : Value extends object ? TFromObject<Value> : Value);
7
- export {};