From f6e326077dfdbe96cbb0ce58f3b76ca967d7469b Mon Sep 17 00:00:00 2001 From: Petr Devyaterikov Date: Tue, 24 Dec 2024 19:52:16 +0300 Subject: [PATCH] Adds missing types for the JSONSchemaType type field --- lib/types/json-schema.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/types/json-schema.ts b/lib/types/json-schema.ts index 065c972e5..e3584781a 100644 --- a/lib/types/json-schema.ts +++ b/lib/types/json-schema.ts @@ -49,6 +49,12 @@ type UncheckedJSONSchemaType = ( ? JSONType<"string", IsPartial> : T extends boolean ? JSONType<"boolean", IsPartial> + : T extends readonly any[] + ? JSONType<"array", IsPartial> + : T extends Record + ? JSONType<"object", IsPartial> + : T extends null + ? JSONType<"null", IsPartial> : never)[] } & UnionToIntersection< T extends number