mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 16:36:34 -05:00
fix: string[] inference for additionalFields (#5778)
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cea5bf2464
commit
414d069303
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user