mirror of
https://github.com/zoriya/typebox.git
synced 2026-06-02 11:05:26 +00:00
Revision 0.32.17 (#799)
* Detect Any on StaticDecode * Revision 0.32.17
This commit is contained in:
@@ -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, {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user