Revision 0.32.17 (#799)

* Detect Any on StaticDecode

* Revision 0.32.17
This commit is contained in:
sinclairzx81
2024-03-20 18:45:53 +09:00
committed by GitHub
parent 9fa2e2801c
commit ec27004427
4 changed files with 16 additions and 4 deletions
+11
View File
@@ -1,4 +1,7 @@
import { Type, TSchema, Static, StaticDecode, TObject, TNumber } from '@sinclair/typebox'
import { TypeCheck } from '@sinclair/typebox/compiler'
import { Value } from '@sinclair/typebox/value'
import { Expect } from './assert'
{
// string > number
@@ -309,3 +312,11 @@ import { Expect } from './assert'
Expect(T).ToStaticDecode<new (x: Date) => Date>()
Expect(T).ToStaticEncode<new (x: number) => number>()
}
// -------------------------------------------------------------
// https://github.com/sinclairzx81/typebox/issues/798
// -------------------------------------------------------------
{
const c1: TypeCheck<any> = {} as any
const x1 = c1.Decode({})
const x2 = Value.Decode({} as any, {})
}