Revision 0.32.12 (#740)

* Branch

* Record Options | Option Asssignment Tests

* Version
This commit is contained in:
sinclairzx81
2024-01-21 15:09:01 +09:00
committed by GitHub
parent 28164b1225
commit 22ee96ad04
8 changed files with 551 additions and 20 deletions
+15 -16
View File
@@ -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>()
}