We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e661db8 commit 46ca71dCopy full SHA for 46ca71d
1 file changed
src/types.ts
@@ -184,8 +184,11 @@ export type SerializeJSONOwnTypes<T> = T extends JSONPrimitives
184
* // Result: { id: number; name: string }
185
* ```
186
*/
187
-export type SerializeJSONTypes<T> =
188
- T extends CanBeSerialized<infer A> ? SerializeJSONOwnTypes<A> : SerializeJSONOwnTypes<T>
+export type SerializeJSONTypes<T> = T extends ForcefullyAllowedTypes
+ ? T
189
+ : T extends CanBeSerialized<infer A>
190
+ ? SerializeJSONOwnTypes<A>
191
+ : SerializeJSONOwnTypes<T>
192
193
/**
194
* Contract interface for Item instances used in type inference. An Item represents
0 commit comments