Revision 0.32.35 (#932)

* Support Any and Never Record Keys

* Update Require Property Message

* Ensure Record Enumerable on Convert

* TypeScript 5.5.3

* Version
This commit is contained in:
sinclairzx81
2024-07-23 03:08:57 +09:00
committed by GitHub
parent 83e05bb43c
commit e686997fcd
14 changed files with 302 additions and 21 deletions
+13
View File
@@ -189,3 +189,16 @@ import { Type, Static } from '@sinclair/typebox'
'$propC': string
}>()
}
// ------------------------------------------------------------------
// https://github.com/sinclairzx81/typebox/issues/916
// ------------------------------------------------------------------
{
const K = Type.Any()
const T = Type.Record(K, Type.String())
Expect(T).ToStatic<Record<string, string>>()
}
{
const K = Type.Never()
const T = Type.Record(K, Type.String())
Expect(T).ToStatic<{}>()
}