Revision 0.31.12 (#581)

* Detected Empty Enum via Reverse Extends Check

* Version
This commit is contained in:
sinclairzx81
2023-09-06 01:45:10 +09:00
committed by GitHub
parent fc0bb0e9f2
commit df991dee6b
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ import { Type } from '@sinclair/typebox'
// expect empty enum to be string (as empty enums T[keyof T] evaluates as string)
enum E {}
const T = Type.Enum(E)
Expect(T).ToStatic<string>()
Expect(T).ToStaticNever()
}
{
// expect empty enum to be never