import type { ErrorMeta } from "i18n-error-base"; import { type InferOutput, type RawCheckAction, type RawTransformAction, safeParse } from "valibot"; import { type Issue, type ValidationErrorBase } from "./errors.js"; /*************************************************************************************************** * * 共通の型 * **************************************************************************************************/ /** * Valibot のスキーマ型を抽出するための基本型です。 */ type BaseSchema = typeof safeParse extends (schema: infer TSchema, ...args: any) => any ? TSchema : never; /*************************************************************************************************** * * 再エクスポート * **************************************************************************************************/ export { array, boolean, brand, finite, instance, literal, maxLength, maxValue, minLength, minValue, notValue, nullable, number, object, optional, pipe, readonly, regex, safeInteger, string, trim, union, unknown, } from "valibot"; export type { Brand, InferInput, InferOutput, ObjectEntries } from "valibot"; export * from "./valibot-extra.js"; /*************************************************************************************************** * * check * **************************************************************************************************/ export declare function check(operation: (input: unknown) => boolean): RawCheckAction; /*************************************************************************************************** * * transform * **************************************************************************************************/ export declare function transform(operation: (input: TInput) => TOutput): RawTransformAction; /*************************************************************************************************** * * parse * **************************************************************************************************/ interface IParseError { new (issues: [Issue, ...Issue[]], input: unknown): ValidationErrorBase; } export declare function parse(schema: TSchema, input: unknown, Error?: IParseError): InferOutput; export declare function expect(schema: TSchema, input: unknown): InferOutput; //# sourceMappingURL=valibot.d.ts.map