@@ -7,19 +7,16 @@ import {
77 type ValidationResult ,
88 type ClientValidationAdapter
99} from './adapters.js' ;
10- import { safeParseAsync , type BaseSchema , type BaseSchemaAsync } from 'valibot' ;
10+ import { safeParseAsync , type BaseSchema , type BaseSchemaAsync , type SchemaConfig } from 'valibot' ;
1111import { memoize } from '$lib/memoize.js' ;
1212import {
1313 type ToJSONSchemaOptions ,
1414 toJSONSchema as valibotToJSON
1515} from '@gcornut/valibot-json-schema' ;
1616import type { JSONSchema } from '../jsonSchema/index.js' ;
17- import type { Prettify } from '$lib/utils.js' ;
1817
1918type SupportedSchemas = BaseSchema | BaseSchemaAsync ;
2019
21- type SchemaConfig = NonNullable < Parameters < typeof safeParseAsync > [ 2 ] > ;
22-
2320const defaultOptions = {
2421 strictObjectTypes : true ,
2522 dateStrategy : 'integer' as const ,
@@ -55,12 +52,10 @@ async function validate<T extends SupportedSchemas>(
5552
5653function _valibot < T extends SupportedSchemas > (
5754 schema : T ,
58- options : Prettify <
59- Omit < ToJSONSchemaOptions , 'schema' > &
60- AdapterOptions < T > & {
61- config ?: SchemaConfig ;
62- }
63- > = { }
55+ options : Omit < ToJSONSchemaOptions , 'schema' > &
56+ AdapterOptions < T > & {
57+ config ?: SchemaConfig ;
58+ } = { }
6459) : ValidationAdapter < Infer < T > , InferIn < T > > {
6560 return createAdapter ( {
6661 superFormValidationLibrary : 'valibot' ,
0 commit comments