mirror of
https://github.com/zoriya/typebox.git
synced 2026-05-30 01:39:02 +00:00
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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user