import * as t from '@sinclair/typebox'; import * as v from 'valibot'; type BaseSchema = v.BaseSchema>; type BaseRecordKey = v.BaseSchema>; type TFromAny<_Type extends v.AnySchema> = t.Ensure; type TFromArray = t.Ensure>>; type TFromBigInt<_Type extends v.BigintSchema> = t.Ensure; interface TBlob = v.BlobSchema> extends t.TSchema { [t.Kind]: 'ValibotBlob'; static: v.InferOutput; type: Type; } type TFromBlob> = t.Ensure>; type TFromBoolean<_Type extends v.BooleanSchema> = t.TBoolean; interface TCustom = v.CustomSchema> extends t.TSchema { [t.Kind]: 'ValibotCustom'; static: v.InferOutput; type: Type; } type TFromCustom> = t.Ensure>; type TFromDate<_Type extends v.DateSchema> = t.TDate; export interface TValibotEnum = v.EnumSchema> extends t.TSchema { [t.Kind]: 'ValibotEnum'; static: v.InferOutput; type: Type; } type TFromEnum, Result = TValibotEnum> = Result; export interface TValibotFile = v.FileSchema> extends t.TSchema { [t.Kind]: 'ValibotFile'; static: v.InferOutput; type: Type; } type TFromFile> = t.Ensure>; export interface TValibotFunction = v.FunctionSchema> extends t.TSchema { [t.Kind]: 'ValibotFunction'; static: v.InferOutput; type: Type; } type TFromFunction> = t.Ensure>; export interface TValibotInstance = v.InstanceSchema> extends t.TSchema { [t.Kind]: 'ValibotInstance'; static: v.InferOutput; type: Type; } type TFromInstance> = t.Ensure>; type TFromIntersect = (Type extends [infer Left extends BaseSchema, ...infer Right extends BaseSchema[]] ? TFromIntersect]> : t.TIntersect); type TFromLiteral = t.Ensure>; type TFromLooseObject = t.Ensure; }>>; export interface TValibotLooseTuple = v.LooseTupleSchema> extends t.TSchema { [t.Kind]: 'ValibotLooseTuple'; static: v.InferOutput; type: Type; } type TFromLooseTuple> = t.Ensure>; export interface TValibotMap = v.MapSchema> extends t.TSchema { [t.Kind]: 'ValibotMap'; static: v.InferOutput; type: Type; } type TFromMap> = t.Ensure>; export interface TValibotNaN = v.NanSchema> extends t.TSchema { [t.Kind]: 'ValibotNaN'; static: v.InferOutput; type: Type; } type TFromNaN> = t.Ensure>; type TFromNever<_Type extends v.NeverSchema> = t.TNever; type TFromNonNullable = t.TExclude, t.TNull>; type TFromNonNullish = t.TExclude, t.TUnion<[t.TNull, t.TUndefined]>>; type TFromNonOptional = TFromType> = t.TOptionalWithFlag; type TFromNull<_Type extends v.NullSchema> = t.TNull; type TFromNullable = t.TUnion<[TFromType, t.TNull]>; type TFromNullish = t.TUnion<[TFromType, t.TNull, t.TUndefined]>; type TFromNumber<_Type extends v.NumberSchema> = t.TNumber; type TFromObject = t.Ensure; }>>; type TFromObjectWithRest = t.Ensure; }>>; type TFromOptional = TFromType> = t.TOptionalWithFlag; type PickListOption = string | number | bigint; type TFromPickList = (Options extends [infer Left extends PickListOption, ...infer Right extends PickListOption[]] ? (Left extends t.TLiteralValue ? TFromPickList]> : TFromPickList) : t.TUnion); export interface TValibotPromise = v.PromiseSchema> extends t.TSchema { [t.Kind]: 'ValibotPromise'; static: v.InferOutput; type: Type; } type TFromPromise> = t.Ensure>; type TFromRecord = t.Ensure, TFromType>>; export interface TValibotSet = v.SetSchema> extends t.TSchema { [t.Kind]: 'ValibotSet'; static: v.InferOutput extends infer Result ? Result : never; type: Type; } type TFromSet> = t.Ensure>; type TFromStrictObject = t.Ensure; }>>; type TFromStrictTuple = (Type extends [infer Left extends BaseSchema, ...infer Right extends BaseSchema[]] ? TFromTuple]> : t.TTuple); type TFromString<_Type extends v.StringSchema> = t.TString; type TFromSymbol<_Type extends v.SymbolSchema> = t.TSymbol; type TFromTuple = (Type extends [infer Left extends BaseSchema, ...infer Right extends BaseSchema[]] ? TFromTuple]> : t.TTuple); interface TTupleWithRest = v.TupleWithRestSchema> extends t.TSchema { [t.Kind]: 'ValibotTupleWithRest'; static: v.InferOutput; type: Type; } type TFromTupleWithRest> = t.Ensure>; type TFromUndefined<_Type extends v.UndefinedSchema> = t.TUndefined; type TFromUndefinedable = t.TUnion<[TFromType, t.TUndefined]>; type TFromUnion = (Type extends [infer Left extends BaseSchema, ...infer Right extends BaseSchema[]] ? TFromUnion]> : t.TUnion); type TFromUnknown<_Type extends v.UnknownSchema> = t.TUnknown; interface TVariant, any> = v.VariantSchema, any>> extends t.TSchema { [t.Kind]: 'ValibotVariant'; static: v.InferOutput; type: Type; } type TFromVariant, any>> = t.Ensure>; type TFromVoid<_Type extends v.VoidSchema> = t.TVoid; type TFromType = (Type extends { pipe: readonly [infer Type extends BaseSchema, ...any[]]; } ? TFromType : Type extends v.AnySchema ? TFromAny : Type extends v.ArraySchema ? TFromArray : Type extends v.BigintSchema ? TFromBigInt : Type extends v.BlobSchema ? TFromBlob : Type extends v.BooleanSchema ? TFromBoolean : Type extends v.CustomSchema ? TFromCustom : Type extends v.DateSchema ? TFromDate : Type extends v.EnumSchema ? TFromEnum : Type extends v.FileSchema ? TFromFile : Type extends v.FunctionSchema ? TFromFunction : Type extends v.InstanceSchema ? TFromInstance : Type extends v.IntersectSchema ? TFromIntersect : Type extends v.LiteralSchema ? TFromLiteral : Type extends v.LooseObjectSchema ? TFromLooseObject : Type extends v.LooseTupleSchema ? TFromLooseTuple : Type extends v.MapSchema ? TFromMap : Type extends v.NanSchema ? TFromNaN : Type extends v.NeverSchema ? TFromNever : Type extends v.NonNullableSchema ? TFromNonNullable : Type extends v.NonNullishSchema ? TFromNonNullish : Type extends v.NonOptionalSchema ? TFromNonOptional : Type extends v.NullSchema ? TFromNull : Type extends v.NullableSchema ? TFromNullable : Type extends v.NullishSchema ? TFromNullish : Type extends v.NumberSchema ? TFromNumber : Type extends v.ObjectSchema ? TFromObject : Type extends v.ObjectWithRestSchema ? TFromObjectWithRest : Type extends v.OptionalSchema ? TFromOptional : Type extends v.PicklistSchema ? TFromPickList : Type extends v.PromiseSchema ? TFromPromise : Type extends v.RecordSchema ? TFromRecord : Type extends v.SetSchema ? TFromSet : Type extends v.StrictObjectSchema ? TFromStrictObject : Type extends v.StrictTupleSchema ? TFromStrictTuple : Type extends v.StringSchema ? TFromString : Type extends v.SymbolSchema ? TFromSymbol : Type extends v.TupleSchema ? TFromTuple : Type extends v.TupleWithRestSchema ? TFromTupleWithRest : Type extends v.UndefinedSchema ? TFromUndefined : Type extends v.UndefinedableSchema ? TFromUndefinedable : Type extends v.UnionSchema ? TFromUnion : Type extends v.UnknownSchema ? TFromUnknown : Type extends v.VariantSchema, any> ? TFromVariant : Type extends v.VoidSchema ? TFromVoid : t.TNever); /** Creates a TypeBox type from Valibot */ export type TTypeBoxFromValibot, Result extends t.TSchema = TFromType> = Result; /** Creates a TypeBox type from Valibot */ export declare function TypeBoxFromValibot, Result extends TTypeBoxFromValibot = TTypeBoxFromValibot>(type: Type): Result; export {};