File tree 1 file changed +6
-7
lines changed
packages/model/src/-private
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -164,14 +164,13 @@ export type GetMaybeDeserializeValue<T> = T extends { deserialize: (...args: any
164
164
: never ;
165
165
166
166
export type TypeFromInstance < T > = T extends TransformHasType ? T [ typeof TransformName ] : never ;
167
- export type OptionsFromInstance < T > =
168
- TypeFromInstance < T > extends never
167
+ export type OptionsFromInstance < T > = TypeFromInstance < T > extends never
168
+ ? never
169
+ : GetMaybeDeserializeValue < T > extends never
169
170
? never
170
- : GetMaybeDeserializeValue < T > extends never
171
- ? never
172
- : T extends TypedTransformInstance < GetMaybeDeserializeValue < T > , TypeFromInstance < T > >
173
- ? Parameters < T [ 'deserialize' ] > [ 1 ] & Parameters < T [ 'serialize' ] > [ 1 ] & AttrOptions < ReturnType < T [ 'deserialize' ] > >
174
- : never ;
171
+ : T extends TypedTransformInstance < GetMaybeDeserializeValue < T > , TypeFromInstance < T > >
172
+ ? Parameters < T [ 'deserialize' ] > [ 1 ] & Parameters < T [ 'serialize' ] > [ 1 ] & AttrOptions < ReturnType < T [ 'deserialize' ] > >
173
+ : never ;
175
174
176
175
/**
177
176
* The return type of `void` is a lie to appease TypeScript. The actual return type
You can’t perform that action at this time.
0 commit comments