@@ -24,12 +24,12 @@ type AnySchema = Schema.Schema<any, any>;
2424async function validate < T extends AnySchema > (
2525 schema : T ,
2626 data : unknown ,
27- options ?: AdapterOptions < Infer < T > > & { parseOptions ?: ParseOptions }
28- ) : Promise < ValidationResult < Infer < T > > > {
27+ options ?: AdapterOptions < Infer < T , 'effect' > > & { parseOptions ?: ParseOptions }
28+ ) : Promise < ValidationResult < Infer < T , 'effect' > > > {
2929 const result = Schema . decodeUnknownEither ( schema , { errors : 'all' } ) ( data , options ?. parseOptions ) ;
3030 if ( Either . isRight ( result ) ) {
3131 return {
32- data : result . right as Infer < T > ,
32+ data : result . right as Infer < T , 'effect' > ,
3333 success : true
3434 } ;
3535 }
@@ -40,13 +40,13 @@ async function validate<T extends AnySchema>(
4040 path : [ ...path ] // path is readonly array so we have to copy it
4141 } ) ) ,
4242 success : false
43- } satisfies ValidationResult < Infer < T > > ;
43+ } satisfies ValidationResult < Infer < T , 'effect' > > ;
4444}
4545
4646function _effect < T extends AnySchema > (
4747 schema : T ,
48- options ?: AdapterOptions < Infer < T > > & { parseOptions ?: ParseOptions }
49- ) : ValidationAdapter < Infer < T > , InferIn < T > > {
48+ options ?: AdapterOptions < Infer < T , 'effect' > > & { parseOptions ?: ParseOptions }
49+ ) : ValidationAdapter < Infer < T , 'effect' > , InferIn < T , 'effect' > > {
5050 return createAdapter ( {
5151 superFormValidationLibrary : 'effect' ,
5252 validate : async ( data ) => validate ( schema , data , options ) ,
@@ -57,8 +57,8 @@ function _effect<T extends AnySchema>(
5757
5858function _effectClient < T extends AnySchema > (
5959 schema : T ,
60- options ?: AdapterOptions < Infer < T > > & { parseOptions ?: ParseOptions }
61- ) : ClientValidationAdapter < Infer < T > , InferIn < T > > {
60+ options ?: AdapterOptions < Infer < T , 'effect' > > & { parseOptions ?: ParseOptions }
61+ ) : ClientValidationAdapter < Infer < T , 'effect' > , InferIn < T , 'effect' > > {
6262 return {
6363 superFormValidationLibrary : 'effect' ,
6464 validate : async ( data ) => validate ( schema , data , options )
0 commit comments