// zod / @decs/typeschema export type ParserZodEsque = { _input: TInput; _output: TParsedInput; }; export type ParserMyZodEsque = { parse: (input: any) => TInput; }; export type ParserSuperstructEsque = { create: (input: unknown) => TInput; }; export type ParserCustomValidatorEsque = ( input: unknown, ) => Promise | TInput; export type ParserYupEsque = { validateSync: (input: unknown) => TInput; }; export type ParserScaleEsque = { assert(value: unknown): asserts value is TInput; }; export type ParserWithoutInput = | ParserCustomValidatorEsque | ParserMyZodEsque | ParserScaleEsque | ParserSuperstructEsque | ParserYupEsque; export type ParserWithInputOutput = ParserZodEsque< TInput, TParsedInput >; export type Parser = ParserWithInputOutput | ParserWithoutInput; export type inferParser = TParser extends ParserWithInputOutput ? { in: $TIn; out: $TOut; } : TParser extends ParserWithoutInput ? { in: $InOut; out: $InOut; } : never;