@sdk-it/core 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/deriver.d.ts.map +1 -1
- package/dist/lib/deriver.js +8 -11
- package/dist/lib/deriver.js.map +2 -2
- package/dist/lib/deriver.test.js +363 -398
- package/dist/lib/deriver.test.js.map +2 -2
- package/dist/lib/program.test.d.ts +2 -0
- package/dist/lib/program.test.d.ts.map +1 -0
- package/dist/lib/program.test.js +289 -0
- package/dist/lib/program.test.js.map +7 -0
- package/dist/lib/ref.d.ts +1 -1
- package/dist/lib/ref.d.ts.map +1 -1
- package/dist/lib/ref.js.map +2 -2
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +5 -2
- package/dist/lib/utils.js.map +3 -3
- package/package.json +1 -1
package/dist/lib/deriver.test.js
CHANGED
|
@@ -1,417 +1,382 @@
|
|
|
1
1
|
import { describe, it } from "node:test";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
describe("Initialization and Core Properties", () => {
|
|
5
|
-
it.todo("instantiates with a TypeScript TypeChecker instance", () => {
|
|
6
|
-
});
|
|
7
|
-
it.todo("initializes the `collector` property as an empty object", () => {
|
|
8
|
-
});
|
|
9
|
-
it.todo(
|
|
10
|
-
"exposes the `deriveSymbol` constant for marking serialized objects",
|
|
11
|
-
() => {
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
it.todo(
|
|
15
|
-
"exposes the `$types` symbol constant for holding serialized type information",
|
|
16
|
-
() => {
|
|
17
|
-
}
|
|
18
|
-
);
|
|
2
|
+
describe("serializeType: Basic Primitive and Special Types", () => {
|
|
3
|
+
it.todo("serializes `any` type to an empty type list", () => {
|
|
19
4
|
});
|
|
20
|
-
|
|
21
|
-
it.todo("serializes `any` type to an empty type list", () => {
|
|
22
|
-
});
|
|
23
|
-
it.todo("serializes `unknown` type to an empty type list", () => {
|
|
24
|
-
});
|
|
25
|
-
it.todo("serializes `string` type", () => {
|
|
26
|
-
});
|
|
27
|
-
it.todo("serializes `number` type", () => {
|
|
28
|
-
});
|
|
29
|
-
it.todo("serializes `boolean` type", () => {
|
|
30
|
-
});
|
|
31
|
-
it.todo("serializes `null` type as optional", () => {
|
|
32
|
-
});
|
|
33
|
-
it.todo(
|
|
34
|
-
"serializes `void` type (likely falls back to Any/Unknown or unhandled)",
|
|
35
|
-
() => {
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
it.todo(
|
|
39
|
-
"serializes `never` type (likely falls back to Any/Unknown or unhandled)",
|
|
40
|
-
() => {
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
it.todo(
|
|
44
|
-
"serializes `undefined` type implicitly via union/intersection optional flag",
|
|
45
|
-
() => {
|
|
46
|
-
}
|
|
47
|
-
);
|
|
5
|
+
it.todo("serializes `unknown` type to an empty type list", () => {
|
|
48
6
|
});
|
|
49
|
-
|
|
50
|
-
it.todo("serializes string literal types with their value", () => {
|
|
51
|
-
});
|
|
52
|
-
it.todo("serializes numeric literal types with their value", () => {
|
|
53
|
-
});
|
|
54
|
-
it.todo("serializes boolean literal `true` type", () => {
|
|
55
|
-
});
|
|
56
|
-
it.todo("serializes boolean literal `false` type", () => {
|
|
57
|
-
});
|
|
58
|
-
it.todo("serializes template literal types as base `string`", () => {
|
|
59
|
-
});
|
|
7
|
+
it.todo("serializes `string` type", () => {
|
|
60
8
|
});
|
|
61
|
-
|
|
62
|
-
it.todo(
|
|
63
|
-
"serializes an Enum type (e.g., `enum Color {}`) potentially via unhandled path",
|
|
64
|
-
() => {
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
it.todo(
|
|
68
|
-
"serializes an EnumLiteral type (e.g., `Color.Red`) potentially via unhandled path or base type",
|
|
69
|
-
() => {
|
|
70
|
-
}
|
|
71
|
-
);
|
|
9
|
+
it.todo("serializes `number` type", () => {
|
|
72
10
|
});
|
|
73
|
-
|
|
74
|
-
it.todo(
|
|
75
|
-
"serializes a union of primitive types (e.g., string | number)",
|
|
76
|
-
() => {
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
it.todo(
|
|
80
|
-
"serializes a union type including `null` (e.g., string | null)",
|
|
81
|
-
() => {
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
it.todo(
|
|
85
|
-
"serializes a union type including `undefined`, setting optional flag and filtering `undefined`",
|
|
86
|
-
() => {
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
it.todo(
|
|
90
|
-
"serializes a union type including both `null` and `undefined`",
|
|
91
|
-
() => {
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
it.todo('serializes a union of literal types (e.g., "a" | "b" | 1)', () => {
|
|
95
|
-
});
|
|
96
|
-
it.todo(
|
|
97
|
-
"serializes a union including complex types (e.g., string | MyInterface)",
|
|
98
|
-
() => {
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
it.todo("serializes a union containing only `undefined`", () => {
|
|
102
|
-
});
|
|
103
|
-
it.todo("serializes a union containing only `null`", () => {
|
|
104
|
-
});
|
|
11
|
+
it.todo("serializes `boolean` type", () => {
|
|
105
12
|
});
|
|
106
|
-
|
|
107
|
-
it.todo(
|
|
108
|
-
"serializes an intersection of object/interface types (e.g., A & B)",
|
|
109
|
-
() => {
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
it.todo(
|
|
113
|
-
"serializes an intersection type including `undefined`, setting optional flag and filtering `undefined`",
|
|
114
|
-
() => {
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
it.todo("serializes an intersection containing only `undefined`", () => {
|
|
118
|
-
});
|
|
13
|
+
it.todo("serializes `null` type as optional", () => {
|
|
119
14
|
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
)
|
|
15
|
+
it.todo(
|
|
16
|
+
"serializes `void` type (likely falls back to Any/Unknown or unhandled)",
|
|
17
|
+
() => {
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
it.todo(
|
|
21
|
+
"serializes `never` type (likely falls back to Any/Unknown or unhandled)",
|
|
22
|
+
() => {
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
it.todo(
|
|
26
|
+
"serializes `undefined` type implicitly via union/intersection optional flag",
|
|
27
|
+
() => {
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
describe("serializeType: Literal Types", () => {
|
|
32
|
+
it.todo("serializes string literal types with their value", () => {
|
|
33
|
+
});
|
|
34
|
+
it.todo("serializes numeric literal types with their value", () => {
|
|
35
|
+
});
|
|
36
|
+
it.todo("serializes boolean literal `true` type", () => {
|
|
37
|
+
});
|
|
38
|
+
it.todo("serializes boolean literal `false` type", () => {
|
|
39
|
+
});
|
|
40
|
+
it.todo("serializes template literal types as base `string`", () => {
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
describe("serializeType: Enum Types", () => {
|
|
44
|
+
it.todo(
|
|
45
|
+
"serializes an Enum type (e.g., `enum Color {}`) potentially via unhandled path",
|
|
46
|
+
() => {
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
it.todo(
|
|
50
|
+
"serializes an EnumLiteral type (e.g., `Color.Red`) potentially via unhandled path or base type",
|
|
51
|
+
() => {
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
describe("serializeType: Union Types (`|`)", () => {
|
|
56
|
+
it.todo(
|
|
57
|
+
"serializes a union of primitive types (e.g., string | number)",
|
|
58
|
+
() => {
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
it.todo(
|
|
62
|
+
"serializes a union type including `null` (e.g., string | null)",
|
|
63
|
+
() => {
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
it.todo(
|
|
67
|
+
"serializes a union type including `undefined`, setting optional flag and filtering `undefined`",
|
|
68
|
+
() => {
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
it.todo(
|
|
72
|
+
"serializes a union type including both `null` and `undefined`",
|
|
73
|
+
() => {
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
it.todo('serializes a union of literal types (e.g., "a" | "b" | 1)', () => {
|
|
77
|
+
});
|
|
78
|
+
it.todo(
|
|
79
|
+
"serializes a union including complex types (e.g., string | MyInterface)",
|
|
80
|
+
() => {
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
it.todo("serializes a union containing only `undefined`", () => {
|
|
157
84
|
});
|
|
158
|
-
|
|
159
|
-
it.todo(
|
|
160
|
-
"serializes a string index signature type (Record<string, number>)",
|
|
161
|
-
() => {
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
it.todo(
|
|
165
|
-
"serializes a string index signature type with complex value (Record<string, MyInterface>)",
|
|
166
|
-
() => {
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
it.todo(
|
|
170
|
-
"serializes a type with only a number index signature ([key: number]: boolean)",
|
|
171
|
-
() => {
|
|
172
|
-
}
|
|
173
|
-
);
|
|
85
|
+
it.todo("serializes a union containing only `null`", () => {
|
|
174
86
|
});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
);
|
|
193
|
-
it.todo(
|
|
194
|
-
"serializes an empty object type `{}` potentially falling back to name or generic",
|
|
195
|
-
() => {
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
it.todo(
|
|
199
|
-
"handles object types matching default overrides (e.g., DateConstructor -> string)",
|
|
200
|
-
() => {
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
it.todo(
|
|
204
|
-
"handles known object types NOT in defaults (e.g., RegExp) by attempting standard object serialization",
|
|
205
|
-
() => {
|
|
206
|
-
}
|
|
207
|
-
);
|
|
208
|
-
it.todo(
|
|
209
|
-
"serializes an interface type by deferring to serializeNode for reference/collection",
|
|
210
|
-
() => {
|
|
211
|
-
}
|
|
212
|
-
);
|
|
213
|
-
it.todo(
|
|
214
|
-
"serializes a class type by deferring to serializeNode for reference/collection",
|
|
215
|
-
() => {
|
|
216
|
-
}
|
|
217
|
-
);
|
|
218
|
-
it.todo(
|
|
219
|
-
"serializes an interface type using its name when its declaration cannot be found",
|
|
220
|
-
() => {
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
it.todo(
|
|
224
|
-
"serializes a class type using its name when its declaration cannot be found",
|
|
225
|
-
() => {
|
|
226
|
-
}
|
|
227
|
-
);
|
|
87
|
+
});
|
|
88
|
+
describe("serializeType: Intersection Types (`&`)", () => {
|
|
89
|
+
it.todo(
|
|
90
|
+
"serializes an intersection of object/interface types (e.g., A & B)",
|
|
91
|
+
() => {
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
it.todo(
|
|
95
|
+
"serializes an intersection type including `undefined`, setting optional flag and filtering `undefined`",
|
|
96
|
+
() => {
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
it.todo("serializes an intersection containing only `undefined`", () => {
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
describe("serializeType: Array and Tuple Types", () => {
|
|
103
|
+
it.todo("serializes a simple array type (e.g., string[])", () => {
|
|
228
104
|
});
|
|
229
|
-
|
|
230
|
-
it.todo(
|
|
231
|
-
"handles an unhandled type flag by using checker.typeToString and warns",
|
|
232
|
-
() => {
|
|
233
|
-
}
|
|
234
|
-
);
|
|
105
|
+
it.todo("serializes readonly array types (e.g., readonly number[])", () => {
|
|
235
106
|
});
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
it.todo("serializes an empty object literal node `{}`", () => {
|
|
248
|
-
});
|
|
107
|
+
it.todo(
|
|
108
|
+
"serializes an array type with object elements (e.g., MyInterface[])",
|
|
109
|
+
() => {
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
it.todo(
|
|
113
|
+
"serializes an array type with union elements (e.g., (string | number)[])",
|
|
114
|
+
() => {
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
it.todo("serializes an array type where element type has no symbol", () => {
|
|
249
118
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
119
|
+
it.todo(
|
|
120
|
+
"serializes an array type where element symbol has no value declaration but has declarations",
|
|
121
|
+
() => {
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
it.todo(
|
|
125
|
+
"serializes an array type with a mapped type element (e.g., MappedType[])",
|
|
126
|
+
() => {
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
it.todo(
|
|
130
|
+
"handles array-like types with missing type arguments gracefully (e.g., Array)",
|
|
131
|
+
() => {
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
it.todo(
|
|
135
|
+
"serializes tuple types (e.g., [string, number]) potentially as array of union",
|
|
136
|
+
() => {
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
describe("serializeType: Record/Index Types", () => {
|
|
141
|
+
it.todo(
|
|
142
|
+
"serializes a string index signature type (Record<string, number>)",
|
|
143
|
+
() => {
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
it.todo(
|
|
147
|
+
"serializes a string index signature type with complex value (Record<string, MyInterface>)",
|
|
148
|
+
() => {
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
it.todo(
|
|
152
|
+
"serializes a type with only a number index signature ([key: number]: boolean)",
|
|
153
|
+
() => {
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
describe("serializeType: Object Types (Interfaces, Classes, Inline, Mapped)", () => {
|
|
158
|
+
it.todo("serializes an inline object type literal (passed as type)", () => {
|
|
159
|
+
});
|
|
160
|
+
it.todo(
|
|
161
|
+
"serializes a mapped type directly (e.g., type M = { [K in keyof T]: T[K] })",
|
|
162
|
+
() => {
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
it.todo(
|
|
166
|
+
"serializes an object type using literal property assignments from declarations",
|
|
167
|
+
() => {
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
it.todo(
|
|
171
|
+
"serializes an object type with mixed declared types (PropertySignature) and literal assignments (PropertyAssignment)",
|
|
172
|
+
() => {
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
it.todo(
|
|
176
|
+
"serializes an empty object type `{}` potentially falling back to name or generic",
|
|
177
|
+
() => {
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
it.todo(
|
|
181
|
+
"handles object types matching default overrides (e.g., DateConstructor -> string)",
|
|
182
|
+
() => {
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
it.todo(
|
|
186
|
+
"handles known object types NOT in defaults (e.g., RegExp) by attempting standard object serialization",
|
|
187
|
+
() => {
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
it.todo(
|
|
191
|
+
"serializes an interface type by deferring to serializeNode for reference/collection",
|
|
192
|
+
() => {
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
it.todo(
|
|
196
|
+
"serializes a class type by deferring to serializeNode for reference/collection",
|
|
197
|
+
() => {
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
it.todo(
|
|
201
|
+
"serializes an interface type using its name when its declaration cannot be found",
|
|
202
|
+
() => {
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
it.todo(
|
|
206
|
+
"serializes a class type using its name when its declaration cannot be found",
|
|
207
|
+
() => {
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
});
|
|
211
|
+
describe("serializeType: Unhandled Types", () => {
|
|
212
|
+
it.todo(
|
|
213
|
+
"handles an unhandled type flag by using checker.typeToString and warns",
|
|
214
|
+
() => {
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
});
|
|
218
|
+
describe("serializeNode: Object Literal Expressions (`{ ... }`)", () => {
|
|
219
|
+
it.todo(
|
|
220
|
+
"serializes an object literal node with various primitive property types",
|
|
221
|
+
() => {
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
it.todo(
|
|
225
|
+
"serializes an object literal node with nested object/array literals",
|
|
226
|
+
() => {
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
it.todo("serializes an empty object literal node `{}`", () => {
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
describe("serializeNode: Property Access/Signature/Declaration", () => {
|
|
233
|
+
it.todo(
|
|
234
|
+
"serializes a PropertyAccessExpression node (e.g., `obj.prop`) by resolving its type",
|
|
235
|
+
() => {
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
it.todo(
|
|
239
|
+
"serializes a PropertySignature node (e.g., `prop: string;`) by resolving its type",
|
|
240
|
+
() => {
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
it.todo(
|
|
244
|
+
"serializes a PropertyDeclaration node (e.g., `prop: number;`) by resolving its type",
|
|
245
|
+
() => {
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
it.todo(
|
|
249
|
+
"handles property nodes where symbol cannot be found for the property name and warns",
|
|
250
|
+
() => {
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
});
|
|
254
|
+
describe("serializeNode: Interface Declarations (`interface ...`) and Collector Interaction", () => {
|
|
255
|
+
it.todo(
|
|
256
|
+
"serializes a new interface declaration, adding its structure to the collector",
|
|
257
|
+
() => {
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
it.todo(
|
|
261
|
+
"returns only a reference for an already serialized interface declaration (present in collector)",
|
|
262
|
+
() => {
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
it.todo(
|
|
266
|
+
"handles interface declarations matching default overrides without adding to collector",
|
|
267
|
+
() => {
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
it.todo("throws an error for an interface declaration without a name", () => {
|
|
271
|
+
});
|
|
272
|
+
it.todo(
|
|
273
|
+
"handles interfaces with no members correctly (adds empty object to collector)",
|
|
274
|
+
() => {
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
it.todo(
|
|
278
|
+
"handles interfaces extending other interfaces (serialization includes only own properties)",
|
|
279
|
+
() => {
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
});
|
|
283
|
+
describe("serializeNode: Class Declarations (`class ...`) and Collector Interaction", () => {
|
|
284
|
+
it.todo(
|
|
285
|
+
"serializes a new class declaration, adding its property structure to the collector",
|
|
286
|
+
() => {
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
it.todo(
|
|
290
|
+
"returns only a reference for an already serialized class declaration (present in collector)",
|
|
291
|
+
() => {
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
it.todo(
|
|
295
|
+
"handles class declarations matching default overrides without adding to collector",
|
|
296
|
+
() => {
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
it.todo(
|
|
300
|
+
"throws an error for a class declaration without a name (e.g., anonymous default export)",
|
|
301
|
+
() => {
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
it.todo(
|
|
305
|
+
"handles classes with no property declarations (only methods/constructor) correctly (adds empty object to collector)",
|
|
306
|
+
() => {
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
it.todo(
|
|
310
|
+
"handles classes implementing interfaces (serialization includes only own properties)",
|
|
311
|
+
() => {
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
it.todo(
|
|
315
|
+
"handles classes extending other classes (serialization includes only own properties)",
|
|
316
|
+
() => {
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
});
|
|
320
|
+
describe("serializeNode: Other Node Types", () => {
|
|
321
|
+
it.todo(
|
|
322
|
+
"serializes a VariableDeclaration node with an explicit type annotation",
|
|
323
|
+
() => {
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
it.todo(
|
|
327
|
+
"handles VariableDeclaration node without a type annotation and warns",
|
|
328
|
+
() => {
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
it.todo(
|
|
332
|
+
"handles VariableDeclaration node where symbol cannot be found for the variable name and warns",
|
|
333
|
+
() => {
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
it.todo(
|
|
337
|
+
"serializes an Identifier node by resolving its type at that location",
|
|
338
|
+
() => {
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
it.todo(
|
|
342
|
+
"handles Identifier node where symbol cannot be found and warns",
|
|
343
|
+
() => {
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
it.todo(
|
|
347
|
+
"serializes an AwaitExpression node by resolving the awaited type",
|
|
348
|
+
() => {
|
|
349
|
+
}
|
|
350
|
+
);
|
|
351
|
+
it.todo(
|
|
352
|
+
"serializes a CallExpression node by resolving its return type",
|
|
353
|
+
() => {
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
it.todo(
|
|
357
|
+
"serializes an AsExpression node by resolving the asserted type",
|
|
358
|
+
() => {
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
it.todo(
|
|
362
|
+
"serializes a TypeLiteralNode (`{ ... }` used as a type) by resolving its properties",
|
|
363
|
+
() => {
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
it.todo("serializes NullKeyword node", () => {
|
|
271
367
|
});
|
|
272
|
-
|
|
273
|
-
it.todo(
|
|
274
|
-
"serializes a new interface declaration, adding its structure to the collector",
|
|
275
|
-
() => {
|
|
276
|
-
}
|
|
277
|
-
);
|
|
278
|
-
it.todo(
|
|
279
|
-
"returns only a reference for an already serialized interface declaration (present in collector)",
|
|
280
|
-
() => {
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
it.todo(
|
|
284
|
-
"handles interface declarations matching default overrides without adding to collector",
|
|
285
|
-
() => {
|
|
286
|
-
}
|
|
287
|
-
);
|
|
288
|
-
it.todo(
|
|
289
|
-
"throws an error for an interface declaration without a name",
|
|
290
|
-
() => {
|
|
291
|
-
}
|
|
292
|
-
);
|
|
293
|
-
it.todo(
|
|
294
|
-
"handles interfaces with no members correctly (adds empty object to collector)",
|
|
295
|
-
() => {
|
|
296
|
-
}
|
|
297
|
-
);
|
|
298
|
-
it.todo(
|
|
299
|
-
"handles interfaces extending other interfaces (serialization includes only own properties)",
|
|
300
|
-
() => {
|
|
301
|
-
}
|
|
302
|
-
);
|
|
368
|
+
it.todo("serializes BooleanKeyword node", () => {
|
|
303
369
|
});
|
|
304
|
-
|
|
305
|
-
it.todo(
|
|
306
|
-
"serializes a new class declaration, adding its property structure to the collector",
|
|
307
|
-
() => {
|
|
308
|
-
}
|
|
309
|
-
);
|
|
310
|
-
it.todo(
|
|
311
|
-
"returns only a reference for an already serialized class declaration (present in collector)",
|
|
312
|
-
() => {
|
|
313
|
-
}
|
|
314
|
-
);
|
|
315
|
-
it.todo(
|
|
316
|
-
"handles class declarations matching default overrides without adding to collector",
|
|
317
|
-
() => {
|
|
318
|
-
}
|
|
319
|
-
);
|
|
320
|
-
it.todo(
|
|
321
|
-
"throws an error for a class declaration without a name (e.g., anonymous default export)",
|
|
322
|
-
() => {
|
|
323
|
-
}
|
|
324
|
-
);
|
|
325
|
-
it.todo(
|
|
326
|
-
"handles classes with no property declarations (only methods/constructor) correctly (adds empty object to collector)",
|
|
327
|
-
() => {
|
|
328
|
-
}
|
|
329
|
-
);
|
|
330
|
-
it.todo(
|
|
331
|
-
"handles classes implementing interfaces (serialization includes only own properties)",
|
|
332
|
-
() => {
|
|
333
|
-
}
|
|
334
|
-
);
|
|
335
|
-
it.todo(
|
|
336
|
-
"handles classes extending other classes (serialization includes only own properties)",
|
|
337
|
-
() => {
|
|
338
|
-
}
|
|
339
|
-
);
|
|
370
|
+
it.todo("serializes TrueKeyword node as boolean literal", () => {
|
|
340
371
|
});
|
|
341
|
-
|
|
342
|
-
it.todo(
|
|
343
|
-
"serializes a VariableDeclaration node with an explicit type annotation",
|
|
344
|
-
() => {
|
|
345
|
-
}
|
|
346
|
-
);
|
|
347
|
-
it.todo(
|
|
348
|
-
"handles VariableDeclaration node without a type annotation and warns",
|
|
349
|
-
() => {
|
|
350
|
-
}
|
|
351
|
-
);
|
|
352
|
-
it.todo(
|
|
353
|
-
"handles VariableDeclaration node where symbol cannot be found for the variable name and warns",
|
|
354
|
-
() => {
|
|
355
|
-
}
|
|
356
|
-
);
|
|
357
|
-
it.todo(
|
|
358
|
-
"serializes an Identifier node by resolving its type at that location",
|
|
359
|
-
() => {
|
|
360
|
-
}
|
|
361
|
-
);
|
|
362
|
-
it.todo(
|
|
363
|
-
"handles Identifier node where symbol cannot be found and warns",
|
|
364
|
-
() => {
|
|
365
|
-
}
|
|
366
|
-
);
|
|
367
|
-
it.todo(
|
|
368
|
-
"serializes an AwaitExpression node by resolving the awaited type",
|
|
369
|
-
() => {
|
|
370
|
-
}
|
|
371
|
-
);
|
|
372
|
-
it.todo(
|
|
373
|
-
"serializes a CallExpression node by resolving its return type",
|
|
374
|
-
() => {
|
|
375
|
-
}
|
|
376
|
-
);
|
|
377
|
-
it.todo(
|
|
378
|
-
"serializes an AsExpression node by resolving the asserted type",
|
|
379
|
-
() => {
|
|
380
|
-
}
|
|
381
|
-
);
|
|
382
|
-
it.todo(
|
|
383
|
-
"serializes a TypeLiteralNode (`{ ... }` used as a type) by resolving its properties",
|
|
384
|
-
() => {
|
|
385
|
-
}
|
|
386
|
-
);
|
|
387
|
-
it.todo("serializes NullKeyword node", () => {
|
|
388
|
-
});
|
|
389
|
-
it.todo("serializes BooleanKeyword node", () => {
|
|
390
|
-
});
|
|
391
|
-
it.todo("serializes TrueKeyword node as boolean literal", () => {
|
|
392
|
-
});
|
|
393
|
-
it.todo("serializes FalseKeyword node as boolean literal", () => {
|
|
394
|
-
});
|
|
395
|
-
it.todo(
|
|
396
|
-
"serializes an ArrayLiteralExpression node by resolving its inferred type",
|
|
397
|
-
() => {
|
|
398
|
-
}
|
|
399
|
-
);
|
|
400
|
-
it.todo(
|
|
401
|
-
"handles an unhandled node kind by returning `any` and warns",
|
|
402
|
-
() => {
|
|
403
|
-
}
|
|
404
|
-
);
|
|
372
|
+
it.todo("serializes FalseKeyword node as boolean literal", () => {
|
|
405
373
|
});
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
});
|
|
413
|
-
it.todo("returns false if the type has no symbol", () => {
|
|
414
|
-
});
|
|
374
|
+
it.todo(
|
|
375
|
+
"serializes an ArrayLiteralExpression node by resolving its inferred type",
|
|
376
|
+
() => {
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
it.todo("handles an unhandled node kind by returning `any` and warns", () => {
|
|
415
380
|
});
|
|
416
381
|
});
|
|
417
382
|
//# sourceMappingURL=deriver.test.js.map
|