From 5a8a0af0d3ec6e00d63571f88951858dac4d494b Mon Sep 17 00:00:00 2001 From: Josh Michaels <31548851+joshmossas@users.noreply.github.com> Date: Sat, 26 Aug 2023 02:09:26 -0500 Subject: [PATCH] Type inference for Type.Enum (#551) --- src/typebox.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typebox.ts b/src/typebox.ts index b453836..d33380c 100644 --- a/src/typebox.ts +++ b/src/typebox.ts @@ -2901,7 +2901,7 @@ export class JsonTypeBuilder extends TypeBuilder { return Type.Object(properties, options) as TComposite } /** `[Json]` Creates a Enum type */ - public Enum>(item: T, options: SchemaOptions = {}): TEnum { + public Enum>(item: T, options: SchemaOptions = {}): TEnum { // prettier-ignore const values = Object.getOwnPropertyNames(item).filter((key) => isNaN(key as any)).map((key) => item[key]) as T[keyof T][] // prettier-ignore