mirror of
https://github.com/zoriya/typebox.git
synced 2026-05-28 08:58:45 +00:00
Revision 0.32.12 (#740)
* Branch * Record Options | Option Asssignment Tests * Version
This commit is contained in:
+15
-16
@@ -78,24 +78,23 @@ import { Expect } from './assert'
|
||||
nodes: Static<typeof T>[]
|
||||
}>()
|
||||
}
|
||||
// prettier-ignore
|
||||
{
|
||||
// issue: https://github.com/sinclairzx81/typebox/issues/336
|
||||
type JSONValue =
|
||||
| string
|
||||
| number
|
||||
| null
|
||||
| boolean
|
||||
| { [x: string]: JSONValue }
|
||||
type JSONValue =
|
||||
| string
|
||||
| number
|
||||
| null
|
||||
| boolean
|
||||
| { [x: string]: JSONValue }
|
||||
| JSONValue[]
|
||||
const R = Type.Recursive((Node) =>
|
||||
Type.Union([
|
||||
Type.Null(),
|
||||
Type.String(),
|
||||
Type.Number(),
|
||||
Type.Boolean(),
|
||||
Type.Record(Type.String(), Node),
|
||||
Type.Array(Node),
|
||||
]),
|
||||
)
|
||||
const R = Type.Recursive((Node) => Type.Union([
|
||||
Type.Null(),
|
||||
Type.String(),
|
||||
Type.Number(),
|
||||
Type.Boolean(),
|
||||
Type.Record(Type.String(), Node),
|
||||
Type.Array(Node)
|
||||
]))
|
||||
Expect(R).ToStatic<JSONValue>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user