fix: string[] inference for additionalFields (#5778)

Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
This commit is contained in:
Gautam Manchandani
2025-11-05 22:32:29 +05:30
committed by GitHub
parent cea5bf2464
commit 414d069303

View File

@@ -26,13 +26,15 @@ export type InferValueType<T extends DBFieldType> = T extends "string"
? boolean
: T extends "date"
? Date
: T extends `${infer T}[]`
? T extends "string"
? string[]
: number[]
: T extends Array<any>
? T[number]
: never;
: T extends "json"
? Record<string, any>
: T extends `${infer U}[]`
? U extends "string"
? string[]
: number[]
: T extends Array<any>
? T[number]
: never;
export type InferFieldsOutput<Field> = Field extends Record<
infer Key,