Revision 0.31.11 (#575)

* Resolve for Single String Enum

* Version

* Update TEnum to accept TEnumRecord as Generic Argument

* Use TEnum<T> as Assert
This commit is contained in:
sinclairzx81
2023-09-06 00:46:25 +09:00
committed by GitHub
parent 276ddeb443
commit fc0bb0e9f2
5 changed files with 47 additions and 24 deletions
+2 -2
View File
@@ -30,10 +30,10 @@ import { Type } from '@sinclair/typebox'
Expect(T).ToStatic<1 | 2>()
}
{
// expect empty enum to be never
// expect empty enum to be string (as empty enums T[keyof T] evaluates as string)
enum E {}
const T = Type.Enum(E)
Expect(T).ToStaticNever()
Expect(T).ToStatic<string>()
}
{
// expect empty enum to be never