import type { Evaluate } from '../helpers/index'; import type { TOptional } from '../optional/index'; import type { TReadonly } from '../readonly/index'; import type { TArray } from '../array/index'; import type { TAsyncIterator } from '../async-iterator/index'; import type { TConstructor } from '../constructor/index'; import type { TEnum } from '../enum/index'; import type { TFunction } from '../function/index'; import type { TIntersect } from '../intersect/index'; import type { TImport } from '../module/index'; import type { TIterator } from '../iterator/index'; import type { TNot } from '../not/index'; import type { TObject, TProperties } from '../object/index'; import type { TPromise } from '../promise/index'; import type { TRecursive } from '../recursive/index'; import type { TRecord } from '../record/index'; import type { TRef } from '../ref/index'; import type { TTuple } from '../tuple/index'; import type { TUnion } from '../union/index'; import type { TUnsafe } from '../unsafe/index'; import type { TSchema } from '../schema/index'; import type { TTransform } from '../transform/index'; import type { TNever } from '../never/index'; type TDecodeImport = (Key extends keyof ModuleProperties ? TDecodeType extends infer Type extends TSchema ? Type extends TRef ? TDecodeImport : Type : TNever : TNever); type TDecodeProperties = { [Key in keyof Properties]: TDecodeType; }; type TDecodeTypes = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TDecodeTypes]> : Result); export type TDecodeType = (Type extends TOptional ? TOptional> : Type extends TReadonly ? TReadonly> : Type extends TTransform ? TUnsafe : Type extends TArray ? TArray> : Type extends TAsyncIterator ? TAsyncIterator> : Type extends TConstructor ? TConstructor, TDecodeType> : Type extends TEnum ? TEnum : Type extends TFunction ? TFunction, TDecodeType> : Type extends TIntersect ? TIntersect> : Type extends TImport ? TDecodeImport : Type extends TIterator ? TIterator> : Type extends TNot ? TNot> : Type extends TObject ? TObject>> : Type extends TPromise ? TPromise> : Type extends TRecord ? TRecord> : Type extends TRecursive ? TRecursive> : Type extends TRef ? TRef : Type extends TTuple ? TTuple> : Type extends TUnion ? TUnion> : Type); export type StaticDecodeIsAny = boolean extends (Type extends TSchema ? true : false) ? true : false; /** Creates an decoded static type from a TypeBox type */ export type StaticDecode extends true ? unknown : Static, Params>> = Result; /** Creates an encoded static type from a TypeBox type */ export type StaticEncode> = Result; /** Creates a static type from a TypeBox type */ export type Static = Result; export {};