typescript 7.1.0-dev.20261119.1 → 7.1.0-dev.20261121.1
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/api/async/api.d.ts +38 -8
- package/dist/api/async/api.d.ts.map +1 -1
- package/dist/api/async/api.js +179 -13
- package/dist/api/async/api.js.map +1 -1
- package/dist/api/diagnosticFormatter.d.ts +2 -0
- package/dist/api/diagnosticFormatter.d.ts.map +1 -1
- package/dist/api/diagnosticFormatter.js +2 -1
- package/dist/api/diagnosticFormatter.js.map +1 -1
- package/dist/api/diagnosticUtils.d.ts +9 -0
- package/dist/api/diagnosticUtils.d.ts.map +1 -0
- package/dist/api/diagnosticUtils.js +50 -0
- package/dist/api/diagnosticUtils.js.map +1 -0
- package/dist/api/node/encoder.d.ts +1 -1
- package/dist/api/node/encoder.d.ts.map +1 -1
- package/dist/api/node/encoder.js +3 -1
- package/dist/api/node/encoder.js.map +1 -1
- package/dist/api/printer.d.ts +27 -0
- package/dist/api/printer.d.ts.map +1 -0
- package/dist/api/printer.js +64 -0
- package/dist/api/printer.js.map +1 -0
- package/dist/api/proto.generated.d.ts +100 -8
- package/dist/api/proto.generated.d.ts.map +1 -1
- package/dist/api/sync/api.d.ts +89 -8
- package/dist/api/sync/api.d.ts.map +1 -1
- package/dist/api/sync/api.js +370 -24
- package/dist/api/sync/api.js.map +1 -1
- package/dist/api/syncChannel.d.ts.map +1 -1
- package/dist/api/syncChannel.js +4 -0
- package/dist/api/syncChannel.js.map +1 -1
- package/dist/ast/ast.d.ts +62 -1
- package/dist/ast/ast.d.ts.map +1 -1
- package/dist/ast/ast.generated.d.ts +2 -2
- package/dist/ast/ast.generated.d.ts.map +1 -1
- package/dist/ast/ast.js.map +1 -1
- package/dist/ast/is.d.ts +33 -1
- package/dist/ast/is.d.ts.map +1 -1
- package/dist/ast/is.js +255 -2
- package/dist/ast/is.js.map +1 -1
- package/dist/ast/jsdoc.d.ts +5 -1
- package/dist/ast/jsdoc.d.ts.map +1 -1
- package/dist/ast/jsdoc.js +4 -2
- package/dist/ast/jsdoc.js.map +1 -1
- package/dist/ast/spanMap.d.ts +2 -19
- package/dist/ast/spanMap.d.ts.map +1 -1
- package/dist/ast/spanMap.js.map +1 -1
- package/dist/ast/spanMapTypes.generated.d.ts +26 -0
- package/dist/ast/spanMapTypes.generated.d.ts.map +1 -0
- package/dist/ast/spanMapTypes.generated.js +3 -0
- package/dist/ast/spanMapTypes.generated.js.map +1 -0
- package/dist/ast/utils.d.ts +1 -0
- package/dist/ast/utils.d.ts.map +1 -1
- package/dist/ast/utils.js +4 -0
- package/dist/ast/utils.js.map +1 -1
- package/enums/emitFlags.d.ts +33 -0
- package/enums/emitFlags.js +33 -0
- package/enums/spanMapFeature.d.ts +22 -22
- package/enums/spanMapFeature.js +1 -1
- package/enums/spanMapFidelity.d.ts +1 -1
- package/enums/spanMapFidelity.js +1 -1
- package/enums/spanMapKind.d.ts +1 -1
- package/enums/spanMapKind.js +1 -1
- package/enums/symbolFormatFlags.d.ts +11 -0
- package/enums/symbolFormatFlags.js +11 -0
- package/enums/syntaxKind.d.ts +213 -214
- package/enums/syntaxKind.js +225 -226
- package/package.json +10 -9
- package/schemas/contentmapper.schema.json +513 -0
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "TypeScript content mapper protocol",
|
|
4
|
+
"description": "Content mapper JSON-RPC methods and reusable parameter and result definitions. Reference individual protocol types through #/definitions/<TypeName>. Positions use the encoding selected during initialization.",
|
|
5
|
+
"x-methods": {
|
|
6
|
+
"initialize": {
|
|
7
|
+
"params": {
|
|
8
|
+
"$ref": "#/definitions/InitializeParams"
|
|
9
|
+
},
|
|
10
|
+
"result": {
|
|
11
|
+
"$ref": "#/definitions/InitializeResult"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"openProject": {
|
|
15
|
+
"params": {
|
|
16
|
+
"$ref": "#/definitions/OpenProjectParams"
|
|
17
|
+
},
|
|
18
|
+
"result": {
|
|
19
|
+
"$ref": "#/definitions/OpenProjectResult"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"closeProject": {
|
|
23
|
+
"params": {
|
|
24
|
+
"$ref": "#/definitions/CloseProjectParams"
|
|
25
|
+
},
|
|
26
|
+
"result": {
|
|
27
|
+
"type": "null"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"transform": {
|
|
31
|
+
"params": {
|
|
32
|
+
"$ref": "#/definitions/TransformParams"
|
|
33
|
+
},
|
|
34
|
+
"result": {
|
|
35
|
+
"$ref": "#/definitions/TransformResult"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"definitions": {
|
|
40
|
+
"InitializeParams": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Parameters for the initialize request.",
|
|
43
|
+
"properties": {
|
|
44
|
+
"locale": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "BCP 47 locale for mapper-authored diagnostic messages, when configured."
|
|
47
|
+
},
|
|
48
|
+
"positionEncodings": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "#/definitions/PositionEncoding"
|
|
52
|
+
},
|
|
53
|
+
"description": "Coordinate spaces accepted by the host."
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": ["positionEncodings"]
|
|
57
|
+
},
|
|
58
|
+
"InitializeResult": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"description": "Response to the initialize request.",
|
|
61
|
+
"properties": {
|
|
62
|
+
"positionEncoding": {
|
|
63
|
+
"$ref": "#/definitions/PositionEncoding"
|
|
64
|
+
},
|
|
65
|
+
"diagnosticSource": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "\\S",
|
|
68
|
+
"description": "Prefix for mapper-authored diagnostic codes. It must not be whitespace-only or, ignoring case, typescript, tsc, or a native source extension without its leading dot."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": ["positionEncoding", "diagnosticSource"]
|
|
72
|
+
},
|
|
73
|
+
"OpenProjectParams": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "Parameters for the openProject request.",
|
|
76
|
+
"properties": {
|
|
77
|
+
"configFileName": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Absolute project configuration file name, or an empty string when there is none."
|
|
80
|
+
},
|
|
81
|
+
"projectHandle": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Opaque, process-local project handle assigned by the host."
|
|
84
|
+
},
|
|
85
|
+
"options": {
|
|
86
|
+
"description": "Mapper entry's options from the project's contentMappers configuration."
|
|
87
|
+
},
|
|
88
|
+
"compilerOptions": {
|
|
89
|
+
"description": "Project's effective compiler options, serialized by the host."
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": ["configFileName", "projectHandle", "compilerOptions"]
|
|
93
|
+
},
|
|
94
|
+
"OpenProjectResult": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "Response to an openProject request. Only mappers declaring dynamicConfig may return a non-empty configIdentity or watchedFiles.",
|
|
97
|
+
"properties": {
|
|
98
|
+
"configIdentity": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "Stable fingerprint of all dynamic configuration affecting transforms. It must be non-empty for dynamicConfig mappers; otherwise it must be empty or omitted."
|
|
101
|
+
},
|
|
102
|
+
"watchedFiles": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"description": "Absolute file names whose changes may alter configIdentity or transform output."
|
|
108
|
+
},
|
|
109
|
+
"optionDiagnostics": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"$ref": "#/definitions/OptionDiagnosticResult"
|
|
113
|
+
},
|
|
114
|
+
"description": "Diagnostics reporting invalid mapper options."
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"OptionDiagnosticResult": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"path": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"anyOf": [
|
|
125
|
+
{
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "integer",
|
|
130
|
+
"minimum": 0
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"description": "Property names and array indices relative to the mapper entry's options object."
|
|
135
|
+
},
|
|
136
|
+
"messageText": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"code": {
|
|
140
|
+
"type": "integer",
|
|
141
|
+
"minimum": -2147483648,
|
|
142
|
+
"maximum": 2147483647
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": ["path", "messageText", "code"]
|
|
146
|
+
},
|
|
147
|
+
"CloseProjectParams": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"description": "Parameters for the closeProject request.",
|
|
150
|
+
"properties": {
|
|
151
|
+
"projectHandle": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": ["projectHandle"]
|
|
156
|
+
},
|
|
157
|
+
"PositionEncoding": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": ["utf-8", "utf-16"],
|
|
160
|
+
"description": "Coordinate space for mappings and diagnostics: UTF-8 byte offsets or UTF-16 code unit offsets."
|
|
161
|
+
},
|
|
162
|
+
"TransformParams": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "Parameters for the transform request.",
|
|
165
|
+
"properties": {
|
|
166
|
+
"fileName": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "Absolute name of the content-mapped source file."
|
|
169
|
+
},
|
|
170
|
+
"content": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"description": "Original source text."
|
|
173
|
+
},
|
|
174
|
+
"projectHandle": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "Handle for the project configuration opened for this transform."
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": ["fileName", "content", "projectHandle"]
|
|
180
|
+
},
|
|
181
|
+
"MappedOutput": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"description": "Virtual source text and its mapping to the original input.",
|
|
184
|
+
"properties": {
|
|
185
|
+
"text": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"description": "Virtual source text."
|
|
188
|
+
},
|
|
189
|
+
"extension": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"enum": [".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts", ".json"],
|
|
192
|
+
"description": "Extension determining the virtual source file's syntax."
|
|
193
|
+
},
|
|
194
|
+
"mappings": {
|
|
195
|
+
"type": ["array", "null"],
|
|
196
|
+
"items": {
|
|
197
|
+
"$ref": "#/definitions/SpanMapSegment"
|
|
198
|
+
},
|
|
199
|
+
"description": "Span map tuples in the selected position encoding. Absent, null, or empty mappings describe fully synthesized output."
|
|
200
|
+
},
|
|
201
|
+
"diagnosticDirectives": {
|
|
202
|
+
"$ref": "#/definitions/DiagnosticDirectives"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": ["text", "extension"]
|
|
206
|
+
},
|
|
207
|
+
"SpanMapKind": {
|
|
208
|
+
"type": "integer",
|
|
209
|
+
"description": "Relationship between positions in a virtual span and its original span.",
|
|
210
|
+
"oneOf": [
|
|
211
|
+
{
|
|
212
|
+
"const": 0,
|
|
213
|
+
"title": "Verbatim",
|
|
214
|
+
"description": "Length-preserving segment whose interior positions map one-to-one."
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"const": 1,
|
|
218
|
+
"title": "Atom",
|
|
219
|
+
"description": "Segment mapped as a whole; interior positions clamp to its endpoints."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"const": 2,
|
|
223
|
+
"title": "Alias",
|
|
224
|
+
"description": "Atom geometry whose virtual and original texts name the same logical entity."
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"SpanMapFidelity": {
|
|
229
|
+
"type": "integer",
|
|
230
|
+
"description": "Faithfulness of a mapped span to the original.",
|
|
231
|
+
"oneOf": [
|
|
232
|
+
{
|
|
233
|
+
"const": 0,
|
|
234
|
+
"title": "Exact",
|
|
235
|
+
"description": "Span entirely within a single verbatim segment, mapped precisely."
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"const": 1,
|
|
239
|
+
"title": "Atom",
|
|
240
|
+
"description": "Span within a single atom segment, mapped to that atom's span."
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"const": 2,
|
|
244
|
+
"title": "Approximate",
|
|
245
|
+
"description": "Span crossing segment boundaries, with mapped and clamped endpoints."
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"const": 3,
|
|
249
|
+
"title": "None",
|
|
250
|
+
"description": "Synthesized span with no original counterpart."
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
"SpanMapFeature": {
|
|
255
|
+
"type": "integer",
|
|
256
|
+
"description": "Language-service feature bitmask. Diagnostics and exact edit mapping do not use feature filtering. Named flags may be combined.",
|
|
257
|
+
"anyOf": [
|
|
258
|
+
{ "const": 1, "title": "Hover" },
|
|
259
|
+
{ "const": 2, "title": "SignatureHelp" },
|
|
260
|
+
{ "const": 4, "title": "Completion" },
|
|
261
|
+
{ "const": 8, "title": "Definition" },
|
|
262
|
+
{ "const": 16, "title": "TypeDefinition" },
|
|
263
|
+
{ "const": 32, "title": "Implementation" },
|
|
264
|
+
{ "const": 64, "title": "References" },
|
|
265
|
+
{ "const": 128, "title": "DocumentHighlights" },
|
|
266
|
+
{ "const": 256, "title": "Rename" },
|
|
267
|
+
{ "const": 512, "title": "CallHierarchy" },
|
|
268
|
+
{ "const": 1024, "title": "CodeActions" },
|
|
269
|
+
{ "const": 2048, "title": "Formatting" },
|
|
270
|
+
{ "const": 4096, "title": "InlayHints" },
|
|
271
|
+
{ "const": 8192, "title": "SemanticTokens" },
|
|
272
|
+
{ "const": 16384, "title": "FoldingRanges" },
|
|
273
|
+
{ "const": 32768, "title": "SelectionRanges" },
|
|
274
|
+
{ "const": 65536, "title": "LinkedEditing" },
|
|
275
|
+
{ "const": 131072, "title": "AutoInsert" },
|
|
276
|
+
{ "const": 262144, "title": "DocumentSymbols" },
|
|
277
|
+
{ "const": 524288, "title": "CodeLens" },
|
|
278
|
+
{ "const": 0, "title": "None" },
|
|
279
|
+
{ "const": 1048575, "title": "All" },
|
|
280
|
+
{ "minimum": 0, "maximum": 1048575 }
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"SpanMapOffset": {
|
|
284
|
+
"type": "integer",
|
|
285
|
+
"minimum": -2147483648,
|
|
286
|
+
"maximum": 2147483647
|
|
287
|
+
},
|
|
288
|
+
"SpanMapTextRange": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"properties": {
|
|
291
|
+
"pos": { "$ref": "#/definitions/SpanMapOffset" },
|
|
292
|
+
"end": { "$ref": "#/definitions/SpanMapOffset" }
|
|
293
|
+
},
|
|
294
|
+
"required": ["pos", "end"]
|
|
295
|
+
},
|
|
296
|
+
"SpanMapSourceSegment": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"description": "Mapping from a half-open virtual range to a half-open original range. Features controls language-service participation; diagnostics and exact edit mapping deliberately bypass it.",
|
|
299
|
+
"properties": {
|
|
300
|
+
"virtualStart": { "$ref": "#/definitions/SpanMapOffset" },
|
|
301
|
+
"virtualEnd": { "$ref": "#/definitions/SpanMapOffset" },
|
|
302
|
+
"originalStart": { "$ref": "#/definitions/SpanMapOffset" },
|
|
303
|
+
"originalEnd": { "$ref": "#/definitions/SpanMapOffset" },
|
|
304
|
+
"kind": { "$ref": "#/definitions/SpanMapKind" },
|
|
305
|
+
"features": { "$ref": "#/definitions/SpanMapFeature" }
|
|
306
|
+
},
|
|
307
|
+
"required": ["virtualStart", "virtualEnd", "originalStart", "originalEnd", "kind"]
|
|
308
|
+
},
|
|
309
|
+
"SpanMapPosition": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"description": "Virtual projection of an original position and its mapping fidelity.",
|
|
312
|
+
"properties": {
|
|
313
|
+
"position": { "$ref": "#/definitions/SpanMapOffset" },
|
|
314
|
+
"fidelity": { "$ref": "#/definitions/SpanMapFidelity" }
|
|
315
|
+
},
|
|
316
|
+
"required": ["position", "fidelity"]
|
|
317
|
+
},
|
|
318
|
+
"SpanMapRange": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"description": "Virtual projection of an original range and its mapping fidelity.",
|
|
321
|
+
"properties": {
|
|
322
|
+
"range": { "$ref": "#/definitions/SpanMapTextRange" },
|
|
323
|
+
"fidelity": { "$ref": "#/definitions/SpanMapFidelity" }
|
|
324
|
+
},
|
|
325
|
+
"required": ["range", "fidelity"]
|
|
326
|
+
},
|
|
327
|
+
"SpanMapSegment": {
|
|
328
|
+
"type": "array",
|
|
329
|
+
"description": "[virtualStart, virtualLength, originalStart, originalLength, kind, features?]. Segments must be ordered and disjoint in virtual space and within both texts. Verbatim segments must contain identical text.",
|
|
330
|
+
"items": [
|
|
331
|
+
{
|
|
332
|
+
"type": "integer",
|
|
333
|
+
"title": "virtualStart",
|
|
334
|
+
"minimum": 0,
|
|
335
|
+
"maximum": 2147483647,
|
|
336
|
+
"description": "Virtual start offset."
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"type": "integer",
|
|
340
|
+
"title": "virtualLength",
|
|
341
|
+
"minimum": 0,
|
|
342
|
+
"maximum": 2147483647,
|
|
343
|
+
"description": "Virtual span length."
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"type": "integer",
|
|
347
|
+
"title": "originalStart",
|
|
348
|
+
"minimum": 0,
|
|
349
|
+
"maximum": 2147483647,
|
|
350
|
+
"description": "Original start offset."
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"type": "integer",
|
|
354
|
+
"title": "originalLength",
|
|
355
|
+
"minimum": 0,
|
|
356
|
+
"maximum": 2147483647,
|
|
357
|
+
"description": "Original span length."
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"$ref": "#/definitions/SpanMapKind",
|
|
361
|
+
"title": "kind"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"$ref": "#/definitions/SpanMapFeature",
|
|
365
|
+
"title": "features",
|
|
366
|
+
"description": "Language-service feature bitmask. Omitted means all features (1048575); 0 disables all features. Does not suppress diagnostics."
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"minItems": 5,
|
|
370
|
+
"maxItems": 6
|
|
371
|
+
},
|
|
372
|
+
"DiagnosticDirectivePolicy": {
|
|
373
|
+
"type": "integer",
|
|
374
|
+
"enum": [0, 1],
|
|
375
|
+
"description": "Diagnostic directive policy: 0 ignores diagnostics; 1 expects a diagnostic."
|
|
376
|
+
},
|
|
377
|
+
"UnusedExpectDirectiveDiagnostic": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"description": "Diagnostic reported when an expect directive suppresses no diagnostic.",
|
|
380
|
+
"properties": {
|
|
381
|
+
"code": {
|
|
382
|
+
"type": "integer",
|
|
383
|
+
"minimum": -2147483648,
|
|
384
|
+
"maximum": 2147483647
|
|
385
|
+
},
|
|
386
|
+
"messageText": {
|
|
387
|
+
"type": "string"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"required": ["code", "messageText"]
|
|
391
|
+
},
|
|
392
|
+
"DiagnosticDirectives": {
|
|
393
|
+
"type": "object",
|
|
394
|
+
"description": "Shared unused-expect diagnostics and compact diagnostic directive tuples.",
|
|
395
|
+
"properties": {
|
|
396
|
+
"unusedExpectDirectiveDiagnostics": {
|
|
397
|
+
"type": "array",
|
|
398
|
+
"items": {
|
|
399
|
+
"$ref": "#/definitions/UnusedExpectDirectiveDiagnostic"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"directives": {
|
|
403
|
+
"type": "array",
|
|
404
|
+
"items": {
|
|
405
|
+
"$ref": "#/definitions/MappedDiagnosticDirective"
|
|
406
|
+
},
|
|
407
|
+
"description": "Directives with non-overlapping virtual ranges."
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"required": ["unusedExpectDirectiveDiagnostics", "directives"]
|
|
411
|
+
},
|
|
412
|
+
"MappedDiagnosticDirective": {
|
|
413
|
+
"type": "array",
|
|
414
|
+
"description": "[originalStart, originalLength, virtualStart, virtualEnd, policy, unusedExpectDirectiveIndex?]. Expect directives require a valid original range. An omitted index selects the only shared unused-expect diagnostic and requires exactly one such diagnostic.",
|
|
415
|
+
"title": "Diagnostic directive",
|
|
416
|
+
"items": [
|
|
417
|
+
{
|
|
418
|
+
"type": "integer",
|
|
419
|
+
"title": "originalStart",
|
|
420
|
+
"description": "Original start offset. It is ignored for ignore directives if the original range is invalid."
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"type": "integer",
|
|
424
|
+
"title": "originalLength",
|
|
425
|
+
"description": "Original span length. It is ignored for ignore directives if the original range is invalid."
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"type": "integer",
|
|
429
|
+
"minimum": 0,
|
|
430
|
+
"title": "virtualStart",
|
|
431
|
+
"description": "Inclusive virtual start offset."
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"type": "integer",
|
|
435
|
+
"minimum": 0,
|
|
436
|
+
"title": "virtualEnd",
|
|
437
|
+
"description": "Exclusive virtual end offset, which must not precede the start."
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"$ref": "#/definitions/DiagnosticDirectivePolicy",
|
|
441
|
+
"title": "policy"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"type": "integer",
|
|
445
|
+
"minimum": 0,
|
|
446
|
+
"title": "unusedExpectDirectiveIndex",
|
|
447
|
+
"description": "Index into unusedExpectDirectiveDiagnostics, used by expect directives."
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"minItems": 5,
|
|
451
|
+
"maxItems": 6,
|
|
452
|
+
"if": {
|
|
453
|
+
"items": [{}, {}, {}, {}, { "const": 1 }]
|
|
454
|
+
},
|
|
455
|
+
"then": {
|
|
456
|
+
"items": [{ "minimum": 0 }, { "minimum": 0 }]
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"SupplementalOutput": {
|
|
460
|
+
"$ref": "#/definitions/MappedOutput"
|
|
461
|
+
},
|
|
462
|
+
"TransformResult": {
|
|
463
|
+
"description": "Canonical output for one input file, with optional mapper diagnostics and supplemental compiler inputs.",
|
|
464
|
+
"allOf": [
|
|
465
|
+
{
|
|
466
|
+
"$ref": "#/definitions/MappedOutput"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"type": "object",
|
|
470
|
+
"properties": {
|
|
471
|
+
"diagnostics": {
|
|
472
|
+
"type": "array",
|
|
473
|
+
"items": {
|
|
474
|
+
"$ref": "#/definitions/Diagnostic"
|
|
475
|
+
},
|
|
476
|
+
"description": "Mapper-authored errors in original-source coordinates."
|
|
477
|
+
},
|
|
478
|
+
"supplemental": {
|
|
479
|
+
"type": "array",
|
|
480
|
+
"items": {
|
|
481
|
+
"$ref": "#/definitions/SupplementalOutput"
|
|
482
|
+
},
|
|
483
|
+
"description": "Additional unnamed compiler inputs associated with this source file."
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
"Diagnostic": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"description": "Mapper-authored error in original-source coordinates using the selected position encoding.",
|
|
492
|
+
"properties": {
|
|
493
|
+
"messageText": {
|
|
494
|
+
"type": "string"
|
|
495
|
+
},
|
|
496
|
+
"start": {
|
|
497
|
+
"type": "integer",
|
|
498
|
+
"minimum": 0
|
|
499
|
+
},
|
|
500
|
+
"length": {
|
|
501
|
+
"type": "integer",
|
|
502
|
+
"minimum": 0
|
|
503
|
+
},
|
|
504
|
+
"code": {
|
|
505
|
+
"type": "integer",
|
|
506
|
+
"minimum": -2147483648,
|
|
507
|
+
"maximum": 2147483647
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"required": ["messageText", "start", "length", "code"]
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|