diff --git a/src/typebox.ts b/src/typebox.ts index 0f9d2e03c..9a4d248b7 100644 --- a/src/typebox.ts +++ b/src/typebox.ts @@ -650,7 +650,7 @@ export interface TPromise extends TSchema { export type TRecordFromUnionLiteralString = { [_ in K['const']]: T } export type TRecordFromUnionLiteralNumber = { [_ in K['const']]: T } // prettier-ignore -export type TRecordFromEnumKey = Ensure> +export type TRecordFromEnumKey, T extends TSchema> = Ensure> // prettier-ignore export type TRecordFromUnionRest = K extends [infer L, ...infer R] ? ( L extends TUnion ? TRecordFromUnionRest & TRecordFromUnionRest, T> : @@ -671,7 +671,7 @@ export type TRecordFromNumberKey = Ensure< export type TRecordFromIntegerKey = Ensure> // prettier-ignore export type TRecordResolve = - K extends TEnum ? TRecordFromEnumKey : // Enum before Union (intercept Hint) + K extends TEnum ? TRecordFromEnumKey : // Enum before Union (intercept Hint) K extends TUnion ? TRecordFromUnion : K extends TTemplateLiteral ? TRecordFromTemplateLiteralKey : K extends TLiteralString ? TRecordFromLiteralStringKey :