Skip to content

Commit

Permalink
Adds missing types for the JSONSchemaType type field
Browse files Browse the repository at this point in the history
  • Loading branch information
utrumo committed Dec 24, 2024
1 parent 82735a1 commit f6e3260
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/types/json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ type UncheckedJSONSchemaType<T, IsPartial extends boolean> = (
? JSONType<"string", IsPartial>
: T extends boolean
? JSONType<"boolean", IsPartial>
: T extends readonly any[]
? JSONType<"array", IsPartial>
: T extends Record<string, any>
? JSONType<"object", IsPartial>
: T extends null
? JSONType<"null", IsPartial>
: never)[]
} & UnionToIntersection<
T extends number
Expand Down

0 comments on commit f6e3260

Please sign in to comment.