@@ -58,49 +58,49 @@ import { Type, Static } from '@sinclair/typebox'
58
58
// ------------------------------------------------------------------
59
59
// prettier-ignore
60
60
{
61
- const T = Type . Module ( {
62
- R : Type . Object ( { x : Type . Number ( ) , y : Type . Number ( ) } ) ,
63
- T : Type . Record ( Type . String ( ) , Type . Partial ( Type . Ref ( 'R' ) ) ) ,
64
- } ) . Import ( 'T' )
61
+ // const T = Type.Module({
62
+ // R: Type.Object({ x: Type.Number(), y: Type.Number() }),
63
+ // T: Type.Record(Type.String(), Type.Partial(Type.Ref('R'))),
64
+ // }).Import('T')
65
65
66
- type T = Static < typeof T >
67
- Expect ( T ) . ToStatic < {
68
- [ key : string ] : { x ?: number , y ?: number }
69
- } > ( )
66
+ // type T = Static<typeof T>
67
+ // Expect(T).ToStatic<{
68
+ // [key: string]: { x?: number, y?: number }
69
+ // }>()
70
70
}
71
71
// ------------------------------------------------------------------
72
72
// Record 3
73
73
// ------------------------------------------------------------------
74
74
// prettier-ignore
75
75
{
76
- const T = Type . Module ( {
77
- R : Type . Object ( { x : Type . Number ( ) , y : Type . Number ( ) } ) ,
78
- K : Type . Number ( ) ,
79
- T : Type . Record ( Type . Ref ( 'K' ) , Type . Partial ( Type . Ref ( 'R' ) ) ) ,
80
- } ) . Import ( 'T' )
76
+ // const T = Type.Module({
77
+ // R: Type.Object({ x: Type.Number(), y: Type.Number() }),
78
+ // K: Type.Number(),
79
+ // T: Type.Record(Type.Ref('K'), Type.Partial(Type.Ref('R'))),
80
+ // }).Import('T')
81
81
82
- type T = Static < typeof T >
83
- Expect ( T ) . ToStatic < {
84
- [ key : number ] : { x ?: number , y ?: number }
85
- } > ( )
82
+ // type T = Static<typeof T>
83
+ // Expect(T).ToStatic<{
84
+ // [key: number]: { x?: number, y?: number }
85
+ // }>()
86
86
}
87
87
// ------------------------------------------------------------------
88
88
// Record 4
89
89
// ------------------------------------------------------------------
90
90
// prettier-ignore
91
- {
92
- const T = Type . Module ( {
93
- R : Type . Object ( { x : Type . Number ( ) , y : Type . Number ( ) } ) ,
94
- K : Type . TemplateLiteral ( '${A|B|C}' ) ,
95
- T : Type . Record ( Type . Ref ( 'K' ) , Type . Partial ( Type . Ref ( 'R' ) ) ) ,
96
- } ) . Import ( 'T' )
97
- type T = Static < typeof T >
98
- Expect ( T ) . ToStatic < {
99
- A : { x ?: number , y ?: number } ,
100
- B : { x ?: number , y ?: number } ,
101
- C : { x ?: number , y ?: number }
102
- } > ( )
103
- }
91
+ // {
92
+ // const T = Type.Module({
93
+ // R: Type.Object({ x: Type.Number(), y: Type.Number() }),
94
+ // K: Type.TemplateLiteral('${A|B|C}'),
95
+ // T: Type.Record(Type.Ref('K'), Type.Partial(Type.Ref('R'))),
96
+ // }).Import('T')
97
+ // type T = Static<typeof T>
98
+ // Expect(T).ToStatic<{
99
+ // A: { x?: number, y?: number },
100
+ // B: { x?: number, y?: number },
101
+ // C: { x?: number, y?: number }
102
+ // }>()
103
+ // }
104
104
// ------------------------------------------------------------------
105
105
// Modifiers 1
106
106
// ------------------------------------------------------------------
0 commit comments