From 9fb6e467644a7c9989c1f40d77fbf2c6c11377c9 Mon Sep 17 00:00:00 2001 From: sinclair Date: Thu, 26 Oct 2023 18:16:12 +0900 Subject: [PATCH] Use Constrained Key Type of TEnum --- src/typebox.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typebox.ts b/src/typebox.ts index 72abb7fd4..700e1c3ad 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 = Ensure> // prettier-ignore export type TRecordFromUnionRest = K extends [infer L, ...infer R] ? ( L extends TUnion ? TRecordFromUnionRest & TRecordFromUnionRest, T> :