typescript 4.8.0-dev.20220624 → 4.8.0-dev.20220625
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/lib/tsc.js +53 -11
- package/lib/tsserver.js +79 -44
- package/lib/tsserverlibrary.js +71 -36
- package/lib/typescript.js +60 -16
- package/lib/typescriptServices.js +60 -16
- package/lib/typingsInstaller.js +55 -11
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220625";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -1278,6 +1278,41 @@ var ts;
|
|
|
1278
1278
|
return createMultiMap();
|
|
1279
1279
|
}
|
|
1280
1280
|
ts.createUnderscoreEscapedMultiMap = createUnderscoreEscapedMultiMap;
|
|
1281
|
+
function createQueue(items) {
|
|
1282
|
+
var elements = (items === null || items === void 0 ? void 0 : items.slice()) || [];
|
|
1283
|
+
var headIndex = 0;
|
|
1284
|
+
function isEmpty() {
|
|
1285
|
+
return headIndex === elements.length;
|
|
1286
|
+
}
|
|
1287
|
+
function enqueue() {
|
|
1288
|
+
var items = [];
|
|
1289
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1290
|
+
items[_i] = arguments[_i];
|
|
1291
|
+
}
|
|
1292
|
+
elements.push.apply(elements, items);
|
|
1293
|
+
}
|
|
1294
|
+
function dequeue() {
|
|
1295
|
+
if (isEmpty()) {
|
|
1296
|
+
throw new Error("Queue is empty");
|
|
1297
|
+
}
|
|
1298
|
+
var result = elements[headIndex];
|
|
1299
|
+
elements[headIndex] = undefined;
|
|
1300
|
+
headIndex++;
|
|
1301
|
+
if (headIndex > 100 && headIndex > (elements.length >> 1)) {
|
|
1302
|
+
var newLength = elements.length - headIndex;
|
|
1303
|
+
elements.copyWithin(0, headIndex);
|
|
1304
|
+
elements.length = newLength;
|
|
1305
|
+
headIndex = 0;
|
|
1306
|
+
}
|
|
1307
|
+
return result;
|
|
1308
|
+
}
|
|
1309
|
+
return {
|
|
1310
|
+
enqueue: enqueue,
|
|
1311
|
+
dequeue: dequeue,
|
|
1312
|
+
isEmpty: isEmpty,
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
ts.createQueue = createQueue;
|
|
1281
1316
|
function createSet(getHashCode, equals) {
|
|
1282
1317
|
var multiMap = new ts.Map();
|
|
1283
1318
|
var size = 0;
|
|
@@ -5634,6 +5669,7 @@ var ts;
|
|
|
5634
5669
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
5635
5670
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
5636
5671
|
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
5672
|
+
An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, ts.DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."),
|
|
5637
5673
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
5638
5674
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
5639
5675
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
|
|
@@ -28671,6 +28707,11 @@ var ts;
|
|
|
28671
28707
|
if (isOptionalChain && ts.isPrivateIdentifier(propertyAccess.name)) {
|
|
28672
28708
|
parseErrorAtRange(propertyAccess.name, ts.Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
28673
28709
|
}
|
|
28710
|
+
if (ts.isExpressionWithTypeArguments(expression) && expression.typeArguments) {
|
|
28711
|
+
var pos_2 = expression.typeArguments.pos - 1;
|
|
28712
|
+
var end = ts.skipTrivia(sourceText, expression.typeArguments.end) + 1;
|
|
28713
|
+
parseErrorAt(pos_2, end, ts.Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);
|
|
28714
|
+
}
|
|
28674
28715
|
return finishNode(propertyAccess, pos);
|
|
28675
28716
|
}
|
|
28676
28717
|
function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
|
|
@@ -31367,10 +31408,10 @@ var ts;
|
|
|
31367
31408
|
}
|
|
31368
31409
|
function checkNodePositions(node, aggressiveChecks) {
|
|
31369
31410
|
if (aggressiveChecks) {
|
|
31370
|
-
var
|
|
31411
|
+
var pos_3 = node.pos;
|
|
31371
31412
|
var visitNode_1 = function (child) {
|
|
31372
|
-
ts.Debug.assert(child.pos >=
|
|
31373
|
-
|
|
31413
|
+
ts.Debug.assert(child.pos >= pos_3);
|
|
31414
|
+
pos_3 = child.end;
|
|
31374
31415
|
};
|
|
31375
31416
|
if (ts.hasJSDocNodes(node)) {
|
|
31376
31417
|
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
|
|
@@ -31379,7 +31420,7 @@ var ts;
|
|
|
31379
31420
|
}
|
|
31380
31421
|
}
|
|
31381
31422
|
forEachChild(node, visitNode_1);
|
|
31382
|
-
ts.Debug.assert(
|
|
31423
|
+
ts.Debug.assert(pos_3 <= node.end);
|
|
31383
31424
|
}
|
|
31384
31425
|
}
|
|
31385
31426
|
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
|
|
@@ -39498,10 +39539,11 @@ var ts;
|
|
|
39498
39539
|
}
|
|
39499
39540
|
function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
39500
39541
|
var i = 0;
|
|
39501
|
-
var q =
|
|
39502
|
-
|
|
39542
|
+
var q = ts.createQueue();
|
|
39543
|
+
q.enqueue(node);
|
|
39544
|
+
while (!q.isEmpty() && i < 100) {
|
|
39503
39545
|
i++;
|
|
39504
|
-
node = q.
|
|
39546
|
+
node = q.dequeue();
|
|
39505
39547
|
if (ts.isExportsIdentifier(node) || ts.isModuleExportsAccessExpression(node)) {
|
|
39506
39548
|
return true;
|
|
39507
39549
|
}
|
|
@@ -39509,10 +39551,10 @@ var ts;
|
|
|
39509
39551
|
var symbol = lookupSymbolForName(sourceFile, node.escapedText);
|
|
39510
39552
|
if (!!symbol && !!symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {
|
|
39511
39553
|
var init = symbol.valueDeclaration.initializer;
|
|
39512
|
-
q.
|
|
39554
|
+
q.enqueue(init);
|
|
39513
39555
|
if (ts.isAssignmentExpression(init, true)) {
|
|
39514
|
-
q.
|
|
39515
|
-
q.
|
|
39556
|
+
q.enqueue(init.left);
|
|
39557
|
+
q.enqueue(init.right);
|
|
39516
39558
|
}
|
|
39517
39559
|
}
|
|
39518
39560
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -109,7 +109,7 @@ var ts;
|
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
112
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220625";
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -1485,6 +1485,43 @@ var ts;
|
|
|
1485
1485
|
return createMultiMap();
|
|
1486
1486
|
}
|
|
1487
1487
|
ts.createUnderscoreEscapedMultiMap = createUnderscoreEscapedMultiMap;
|
|
1488
|
+
function createQueue(items) {
|
|
1489
|
+
var elements = (items === null || items === void 0 ? void 0 : items.slice()) || [];
|
|
1490
|
+
var headIndex = 0;
|
|
1491
|
+
function isEmpty() {
|
|
1492
|
+
return headIndex === elements.length;
|
|
1493
|
+
}
|
|
1494
|
+
function enqueue() {
|
|
1495
|
+
var items = [];
|
|
1496
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1497
|
+
items[_i] = arguments[_i];
|
|
1498
|
+
}
|
|
1499
|
+
elements.push.apply(elements, items);
|
|
1500
|
+
}
|
|
1501
|
+
function dequeue() {
|
|
1502
|
+
if (isEmpty()) {
|
|
1503
|
+
throw new Error("Queue is empty");
|
|
1504
|
+
}
|
|
1505
|
+
var result = elements[headIndex];
|
|
1506
|
+
elements[headIndex] = undefined; // Don't keep referencing dequeued item
|
|
1507
|
+
headIndex++;
|
|
1508
|
+
// If more than half of the queue is empty, copy the remaining elements to the
|
|
1509
|
+
// front and shrink the array (unless we'd be saving fewer than 100 slots)
|
|
1510
|
+
if (headIndex > 100 && headIndex > (elements.length >> 1)) {
|
|
1511
|
+
var newLength = elements.length - headIndex;
|
|
1512
|
+
elements.copyWithin(/*target*/ 0, /*start*/ headIndex);
|
|
1513
|
+
elements.length = newLength;
|
|
1514
|
+
headIndex = 0;
|
|
1515
|
+
}
|
|
1516
|
+
return result;
|
|
1517
|
+
}
|
|
1518
|
+
return {
|
|
1519
|
+
enqueue: enqueue,
|
|
1520
|
+
dequeue: dequeue,
|
|
1521
|
+
isEmpty: isEmpty,
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
ts.createQueue = createQueue;
|
|
1488
1525
|
/**
|
|
1489
1526
|
* Creates a Set with custom equality and hash code functionality. This is useful when you
|
|
1490
1527
|
* want to use something looser than object identity - e.g. "has the same span".
|
|
@@ -8475,6 +8512,7 @@ var ts;
|
|
|
8475
8512
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
8476
8513
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
8477
8514
|
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
8515
|
+
An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, ts.DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."),
|
|
8478
8516
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
8479
8517
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
8480
8518
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
|
|
@@ -35695,6 +35733,11 @@ var ts;
|
|
|
35695
35733
|
if (isOptionalChain && ts.isPrivateIdentifier(propertyAccess.name)) {
|
|
35696
35734
|
parseErrorAtRange(propertyAccess.name, ts.Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
35697
35735
|
}
|
|
35736
|
+
if (ts.isExpressionWithTypeArguments(expression) && expression.typeArguments) {
|
|
35737
|
+
var pos_2 = expression.typeArguments.pos - 1;
|
|
35738
|
+
var end = ts.skipTrivia(sourceText, expression.typeArguments.end) + 1;
|
|
35739
|
+
parseErrorAt(pos_2, end, ts.Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);
|
|
35740
|
+
}
|
|
35698
35741
|
return finishNode(propertyAccess, pos);
|
|
35699
35742
|
}
|
|
35700
35743
|
function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
|
|
@@ -38806,10 +38849,10 @@ var ts;
|
|
|
38806
38849
|
}
|
|
38807
38850
|
function checkNodePositions(node, aggressiveChecks) {
|
|
38808
38851
|
if (aggressiveChecks) {
|
|
38809
|
-
var
|
|
38852
|
+
var pos_3 = node.pos;
|
|
38810
38853
|
var visitNode_1 = function (child) {
|
|
38811
|
-
ts.Debug.assert(child.pos >=
|
|
38812
|
-
|
|
38854
|
+
ts.Debug.assert(child.pos >= pos_3);
|
|
38855
|
+
pos_3 = child.end;
|
|
38813
38856
|
};
|
|
38814
38857
|
if (ts.hasJSDocNodes(node)) {
|
|
38815
38858
|
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
|
|
@@ -38818,7 +38861,7 @@ var ts;
|
|
|
38818
38861
|
}
|
|
38819
38862
|
}
|
|
38820
38863
|
forEachChild(node, visitNode_1);
|
|
38821
|
-
ts.Debug.assert(
|
|
38864
|
+
ts.Debug.assert(pos_3 <= node.end);
|
|
38822
38865
|
}
|
|
38823
38866
|
}
|
|
38824
38867
|
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
|
|
@@ -48113,10 +48156,11 @@ var ts;
|
|
|
48113
48156
|
}
|
|
48114
48157
|
function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
48115
48158
|
var i = 0;
|
|
48116
|
-
var q =
|
|
48117
|
-
|
|
48159
|
+
var q = ts.createQueue();
|
|
48160
|
+
q.enqueue(node);
|
|
48161
|
+
while (!q.isEmpty() && i < 100) {
|
|
48118
48162
|
i++;
|
|
48119
|
-
node = q.
|
|
48163
|
+
node = q.dequeue();
|
|
48120
48164
|
if (ts.isExportsIdentifier(node) || ts.isModuleExportsAccessExpression(node)) {
|
|
48121
48165
|
return true;
|
|
48122
48166
|
}
|
|
@@ -48124,10 +48168,10 @@ var ts;
|
|
|
48124
48168
|
var symbol = lookupSymbolForName(sourceFile, node.escapedText);
|
|
48125
48169
|
if (!!symbol && !!symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {
|
|
48126
48170
|
var init = symbol.valueDeclaration.initializer;
|
|
48127
|
-
q.
|
|
48171
|
+
q.enqueue(init);
|
|
48128
48172
|
if (ts.isAssignmentExpression(init, /*excludeCompoundAssignment*/ true)) {
|
|
48129
|
-
q.
|
|
48130
|
-
q.
|
|
48173
|
+
q.enqueue(init.left);
|
|
48174
|
+
q.enqueue(init.right);
|
|
48131
48175
|
}
|
|
48132
48176
|
}
|
|
48133
48177
|
}
|
|
@@ -137991,18 +138035,18 @@ var ts;
|
|
|
137991
138035
|
|| node.kind === 106 /* SuperKeyword */) {
|
|
137992
138036
|
referenceEntries = entries && __spreadArray([], entries, true);
|
|
137993
138037
|
}
|
|
137994
|
-
else {
|
|
137995
|
-
var queue =
|
|
138038
|
+
else if (entries) {
|
|
138039
|
+
var queue = ts.createQueue(entries);
|
|
137996
138040
|
var seenNodes = new ts.Map();
|
|
137997
|
-
while (queue
|
|
137998
|
-
var entry = queue.
|
|
138041
|
+
while (!queue.isEmpty()) {
|
|
138042
|
+
var entry = queue.dequeue();
|
|
137999
138043
|
if (!ts.addToSeen(seenNodes, ts.getNodeId(entry.node))) {
|
|
138000
138044
|
continue;
|
|
138001
138045
|
}
|
|
138002
138046
|
referenceEntries = ts.append(referenceEntries, entry);
|
|
138003
138047
|
var entries_1 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos);
|
|
138004
138048
|
if (entries_1) {
|
|
138005
|
-
queue.
|
|
138049
|
+
queue.enqueue.apply(queue, entries_1);
|
|
138006
138050
|
}
|
|
138007
138051
|
}
|
|
138008
138052
|
}
|
|
@@ -176821,16 +176865,16 @@ var ts;
|
|
|
176821
176865
|
function getPerProjectReferences(projects, defaultProject, initialLocation, isForRename, getResultsForPosition, forPositionInResult) {
|
|
176822
176866
|
// If `getResultsForPosition` returns results for a project, they go in here
|
|
176823
176867
|
var resultsMap = new ts.Map();
|
|
176824
|
-
var queue =
|
|
176868
|
+
var queue = ts.createQueue();
|
|
176825
176869
|
// In order to get accurate isDefinition values for `defaultProject`,
|
|
176826
176870
|
// we need to ensure that it is searched from `initialLocation`.
|
|
176827
176871
|
// The easiest way to do this is to search it first.
|
|
176828
|
-
queue.
|
|
176872
|
+
queue.enqueue({ project: defaultProject, location: initialLocation });
|
|
176829
176873
|
// This will queue `defaultProject` a second time, but it will be dropped
|
|
176830
176874
|
// as a dup when it is dequeued.
|
|
176831
176875
|
forEachProjectInProjects(projects, initialLocation.fileName, function (project, path) {
|
|
176832
176876
|
var location = { fileName: path, pos: initialLocation.pos };
|
|
176833
|
-
queue.
|
|
176877
|
+
queue.enqueue({ project: project, location: location });
|
|
176834
176878
|
});
|
|
176835
176879
|
var projectService = defaultProject.projectService;
|
|
176836
176880
|
var cancellationToken = defaultProject.getCancellationToken();
|
|
@@ -176845,22 +176889,13 @@ var ts;
|
|
|
176845
176889
|
// The keys of resultsMap allow us to check which projects have already been searched, but we also
|
|
176846
176890
|
// maintain a set of strings because that's what `loadAncestorProjectTree` wants.
|
|
176847
176891
|
var searchedProjectKeys = new ts.Set();
|
|
176848
|
-
onCancellation: while (queue.
|
|
176849
|
-
while (queue.
|
|
176892
|
+
onCancellation: while (!queue.isEmpty()) {
|
|
176893
|
+
while (!queue.isEmpty()) {
|
|
176850
176894
|
if (cancellationToken.isCancellationRequested())
|
|
176851
176895
|
break onCancellation;
|
|
176852
|
-
var
|
|
176853
|
-
|
|
176854
|
-
;
|
|
176855
|
-
if (skipCount === queue.length) {
|
|
176856
|
-
queue.length = 0;
|
|
176857
|
-
break;
|
|
176858
|
-
}
|
|
176859
|
-
if (skipCount > 0) {
|
|
176860
|
-
queue.splice(0, skipCount);
|
|
176861
|
-
}
|
|
176862
|
-
// NB: we may still skip if it's a project reference redirect
|
|
176863
|
-
var _a = queue.shift(), project = _a.project, location = _a.location;
|
|
176896
|
+
var _a = queue.dequeue(), project = _a.project, location = _a.location;
|
|
176897
|
+
if (resultsMap.has(project))
|
|
176898
|
+
continue;
|
|
176864
176899
|
if (isLocationProjectReferenceRedirect(project, location))
|
|
176865
176900
|
continue;
|
|
176866
176901
|
var projectResults = searchPosition(project, location);
|
|
@@ -176881,7 +176916,7 @@ var ts;
|
|
|
176881
176916
|
return; // Can loop forever without this (enqueue here, dequeue above, repeat)
|
|
176882
176917
|
var location = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition);
|
|
176883
176918
|
if (location) {
|
|
176884
|
-
queue.
|
|
176919
|
+
queue.enqueue({ project: project, location: location });
|
|
176885
176920
|
}
|
|
176886
176921
|
});
|
|
176887
176922
|
}
|
|
@@ -176909,7 +176944,7 @@ var ts;
|
|
|
176909
176944
|
for (var _i = 0, _a = originalScriptInfo.containingProjects; _i < _a.length; _i++) {
|
|
176910
176945
|
var project_1 = _a[_i];
|
|
176911
176946
|
if (!project_1.isOrphan() && !resultsMap.has(project_1)) { // Optimization: don't enqueue if will be discarded
|
|
176912
|
-
queue.
|
|
176947
|
+
queue.enqueue({ project: project_1, location: originalLocation });
|
|
176913
176948
|
}
|
|
176914
176949
|
}
|
|
176915
176950
|
var symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo);
|
|
@@ -176918,7 +176953,7 @@ var ts;
|
|
|
176918
176953
|
for (var _i = 0, symlinkedProjects_2 = symlinkedProjects; _i < symlinkedProjects_2.length; _i++) {
|
|
176919
176954
|
var symlinkedProject = symlinkedProjects_2[_i];
|
|
176920
176955
|
if (!symlinkedProject.isOrphan() && !resultsMap.has(symlinkedProject)) { // Optimization: don't enqueue if will be discarded
|
|
176921
|
-
queue.
|
|
176956
|
+
queue.enqueue({ project: symlinkedProject, location: { fileName: symlinkedPath, pos: originalLocation.pos } });
|
|
176922
176957
|
}
|
|
176923
176958
|
}
|
|
176924
176959
|
});
|
|
@@ -182947,7 +182982,7 @@ var ts;
|
|
|
182947
182982
|
}
|
|
182948
182983
|
}
|
|
182949
182984
|
};
|
|
182950
|
-
var pending =
|
|
182985
|
+
var pending = ts.createQueue();
|
|
182951
182986
|
var canWrite = true;
|
|
182952
182987
|
if (useWatchGuard) {
|
|
182953
182988
|
var currentDrive_1 = extractWatchDirectoryCacheKey(sys.resolvePath(sys.getCurrentDirectory()), /*currentDriveKey*/ undefined);
|
|
@@ -183076,7 +183111,7 @@ var ts;
|
|
|
183076
183111
|
}
|
|
183077
183112
|
function writeMessage(buf) {
|
|
183078
183113
|
if (!canWrite) {
|
|
183079
|
-
pending.
|
|
183114
|
+
pending.enqueue(buf);
|
|
183080
183115
|
}
|
|
183081
183116
|
else {
|
|
183082
183117
|
canWrite = false;
|
|
@@ -183085,8 +183120,8 @@ var ts;
|
|
|
183085
183120
|
}
|
|
183086
183121
|
function setCanWriteFlagAndWriteMessageIfNecessary() {
|
|
183087
183122
|
canWrite = true;
|
|
183088
|
-
if (pending.
|
|
183089
|
-
writeMessage(pending.
|
|
183123
|
+
if (!pending.isEmpty()) {
|
|
183124
|
+
writeMessage(pending.dequeue());
|
|
183090
183125
|
}
|
|
183091
183126
|
}
|
|
183092
183127
|
function extractWatchDirectoryCacheKey(path, currentDriveKey) {
|
|
@@ -183156,7 +183191,7 @@ var ts;
|
|
|
183156
183191
|
this.validateDefaultNpmLocation = validateDefaultNpmLocation;
|
|
183157
183192
|
this.event = event;
|
|
183158
183193
|
this.activeRequestCount = 0;
|
|
183159
|
-
this.requestQueue =
|
|
183194
|
+
this.requestQueue = ts.createQueue();
|
|
183160
183195
|
this.requestMap = new ts.Map(); // Maps operation ID to newest requestQueue entry with that ID
|
|
183161
183196
|
/** We will lazily request the types registry on the first call to `isKnownTypesPackageName` and store it in `typesRegistryCache`. */
|
|
183162
183197
|
this.requestedRegistry = false;
|
|
@@ -183261,7 +183296,7 @@ var ts;
|
|
|
183261
183296
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
183262
183297
|
this.logger.info("Deferring request for: " + operationId);
|
|
183263
183298
|
}
|
|
183264
|
-
this.requestQueue.
|
|
183299
|
+
this.requestQueue.enqueue(queuedRequest);
|
|
183265
183300
|
this.requestMap.set(operationId, queuedRequest);
|
|
183266
183301
|
}
|
|
183267
183302
|
};
|
|
@@ -183337,8 +183372,8 @@ var ts;
|
|
|
183337
183372
|
else {
|
|
183338
183373
|
ts.Debug.fail("Received too many responses");
|
|
183339
183374
|
}
|
|
183340
|
-
while (this.requestQueue.
|
|
183341
|
-
var queuedRequest = this.requestQueue.
|
|
183375
|
+
while (!this.requestQueue.isEmpty()) {
|
|
183376
|
+
var queuedRequest = this.requestQueue.dequeue();
|
|
183342
183377
|
if (this.requestMap.get(queuedRequest.operationId) === queuedRequest) {
|
|
183343
183378
|
this.requestMap.delete(queuedRequest.operationId);
|
|
183344
183379
|
this.scheduleRequest(queuedRequest);
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -303,7 +303,7 @@ var ts;
|
|
|
303
303
|
// The following is baselined as a literal template type without intervention
|
|
304
304
|
/** The version of the TypeScript compiler release */
|
|
305
305
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
306
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
306
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220625";
|
|
307
307
|
/* @internal */
|
|
308
308
|
var Comparison;
|
|
309
309
|
(function (Comparison) {
|
|
@@ -1679,6 +1679,43 @@ var ts;
|
|
|
1679
1679
|
return createMultiMap();
|
|
1680
1680
|
}
|
|
1681
1681
|
ts.createUnderscoreEscapedMultiMap = createUnderscoreEscapedMultiMap;
|
|
1682
|
+
function createQueue(items) {
|
|
1683
|
+
var elements = (items === null || items === void 0 ? void 0 : items.slice()) || [];
|
|
1684
|
+
var headIndex = 0;
|
|
1685
|
+
function isEmpty() {
|
|
1686
|
+
return headIndex === elements.length;
|
|
1687
|
+
}
|
|
1688
|
+
function enqueue() {
|
|
1689
|
+
var items = [];
|
|
1690
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1691
|
+
items[_i] = arguments[_i];
|
|
1692
|
+
}
|
|
1693
|
+
elements.push.apply(elements, items);
|
|
1694
|
+
}
|
|
1695
|
+
function dequeue() {
|
|
1696
|
+
if (isEmpty()) {
|
|
1697
|
+
throw new Error("Queue is empty");
|
|
1698
|
+
}
|
|
1699
|
+
var result = elements[headIndex];
|
|
1700
|
+
elements[headIndex] = undefined; // Don't keep referencing dequeued item
|
|
1701
|
+
headIndex++;
|
|
1702
|
+
// If more than half of the queue is empty, copy the remaining elements to the
|
|
1703
|
+
// front and shrink the array (unless we'd be saving fewer than 100 slots)
|
|
1704
|
+
if (headIndex > 100 && headIndex > (elements.length >> 1)) {
|
|
1705
|
+
var newLength = elements.length - headIndex;
|
|
1706
|
+
elements.copyWithin(/*target*/ 0, /*start*/ headIndex);
|
|
1707
|
+
elements.length = newLength;
|
|
1708
|
+
headIndex = 0;
|
|
1709
|
+
}
|
|
1710
|
+
return result;
|
|
1711
|
+
}
|
|
1712
|
+
return {
|
|
1713
|
+
enqueue: enqueue,
|
|
1714
|
+
dequeue: dequeue,
|
|
1715
|
+
isEmpty: isEmpty,
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
ts.createQueue = createQueue;
|
|
1682
1719
|
/**
|
|
1683
1720
|
* Creates a Set with custom equality and hash code functionality. This is useful when you
|
|
1684
1721
|
* want to use something looser than object identity - e.g. "has the same span".
|
|
@@ -8669,6 +8706,7 @@ var ts;
|
|
|
8669
8706
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
8670
8707
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
8671
8708
|
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
8709
|
+
An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, ts.DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."),
|
|
8672
8710
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
8673
8711
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
8674
8712
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
|
|
@@ -35889,6 +35927,11 @@ var ts;
|
|
|
35889
35927
|
if (isOptionalChain && ts.isPrivateIdentifier(propertyAccess.name)) {
|
|
35890
35928
|
parseErrorAtRange(propertyAccess.name, ts.Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
35891
35929
|
}
|
|
35930
|
+
if (ts.isExpressionWithTypeArguments(expression) && expression.typeArguments) {
|
|
35931
|
+
var pos_2 = expression.typeArguments.pos - 1;
|
|
35932
|
+
var end = ts.skipTrivia(sourceText, expression.typeArguments.end) + 1;
|
|
35933
|
+
parseErrorAt(pos_2, end, ts.Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);
|
|
35934
|
+
}
|
|
35892
35935
|
return finishNode(propertyAccess, pos);
|
|
35893
35936
|
}
|
|
35894
35937
|
function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
|
|
@@ -39000,10 +39043,10 @@ var ts;
|
|
|
39000
39043
|
}
|
|
39001
39044
|
function checkNodePositions(node, aggressiveChecks) {
|
|
39002
39045
|
if (aggressiveChecks) {
|
|
39003
|
-
var
|
|
39046
|
+
var pos_3 = node.pos;
|
|
39004
39047
|
var visitNode_1 = function (child) {
|
|
39005
|
-
ts.Debug.assert(child.pos >=
|
|
39006
|
-
|
|
39048
|
+
ts.Debug.assert(child.pos >= pos_3);
|
|
39049
|
+
pos_3 = child.end;
|
|
39007
39050
|
};
|
|
39008
39051
|
if (ts.hasJSDocNodes(node)) {
|
|
39009
39052
|
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
|
|
@@ -39012,7 +39055,7 @@ var ts;
|
|
|
39012
39055
|
}
|
|
39013
39056
|
}
|
|
39014
39057
|
forEachChild(node, visitNode_1);
|
|
39015
|
-
ts.Debug.assert(
|
|
39058
|
+
ts.Debug.assert(pos_3 <= node.end);
|
|
39016
39059
|
}
|
|
39017
39060
|
}
|
|
39018
39061
|
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
|
|
@@ -48307,10 +48350,11 @@ var ts;
|
|
|
48307
48350
|
}
|
|
48308
48351
|
function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
48309
48352
|
var i = 0;
|
|
48310
|
-
var q =
|
|
48311
|
-
|
|
48353
|
+
var q = ts.createQueue();
|
|
48354
|
+
q.enqueue(node);
|
|
48355
|
+
while (!q.isEmpty() && i < 100) {
|
|
48312
48356
|
i++;
|
|
48313
|
-
node = q.
|
|
48357
|
+
node = q.dequeue();
|
|
48314
48358
|
if (ts.isExportsIdentifier(node) || ts.isModuleExportsAccessExpression(node)) {
|
|
48315
48359
|
return true;
|
|
48316
48360
|
}
|
|
@@ -48318,10 +48362,10 @@ var ts;
|
|
|
48318
48362
|
var symbol = lookupSymbolForName(sourceFile, node.escapedText);
|
|
48319
48363
|
if (!!symbol && !!symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {
|
|
48320
48364
|
var init = symbol.valueDeclaration.initializer;
|
|
48321
|
-
q.
|
|
48365
|
+
q.enqueue(init);
|
|
48322
48366
|
if (ts.isAssignmentExpression(init, /*excludeCompoundAssignment*/ true)) {
|
|
48323
|
-
q.
|
|
48324
|
-
q.
|
|
48367
|
+
q.enqueue(init.left);
|
|
48368
|
+
q.enqueue(init.right);
|
|
48325
48369
|
}
|
|
48326
48370
|
}
|
|
48327
48371
|
}
|
|
@@ -138604,18 +138648,18 @@ var ts;
|
|
|
138604
138648
|
|| node.kind === 106 /* SuperKeyword */) {
|
|
138605
138649
|
referenceEntries = entries && __spreadArray([], entries, true);
|
|
138606
138650
|
}
|
|
138607
|
-
else {
|
|
138608
|
-
var queue =
|
|
138651
|
+
else if (entries) {
|
|
138652
|
+
var queue = ts.createQueue(entries);
|
|
138609
138653
|
var seenNodes = new ts.Map();
|
|
138610
|
-
while (queue
|
|
138611
|
-
var entry = queue.
|
|
138654
|
+
while (!queue.isEmpty()) {
|
|
138655
|
+
var entry = queue.dequeue();
|
|
138612
138656
|
if (!ts.addToSeen(seenNodes, ts.getNodeId(entry.node))) {
|
|
138613
138657
|
continue;
|
|
138614
138658
|
}
|
|
138615
138659
|
referenceEntries = ts.append(referenceEntries, entry);
|
|
138616
138660
|
var entries_1 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos);
|
|
138617
138661
|
if (entries_1) {
|
|
138618
|
-
queue.
|
|
138662
|
+
queue.enqueue.apply(queue, entries_1);
|
|
138619
138663
|
}
|
|
138620
138664
|
}
|
|
138621
138665
|
}
|
|
@@ -177015,16 +177059,16 @@ var ts;
|
|
|
177015
177059
|
function getPerProjectReferences(projects, defaultProject, initialLocation, isForRename, getResultsForPosition, forPositionInResult) {
|
|
177016
177060
|
// If `getResultsForPosition` returns results for a project, they go in here
|
|
177017
177061
|
var resultsMap = new ts.Map();
|
|
177018
|
-
var queue =
|
|
177062
|
+
var queue = ts.createQueue();
|
|
177019
177063
|
// In order to get accurate isDefinition values for `defaultProject`,
|
|
177020
177064
|
// we need to ensure that it is searched from `initialLocation`.
|
|
177021
177065
|
// The easiest way to do this is to search it first.
|
|
177022
|
-
queue.
|
|
177066
|
+
queue.enqueue({ project: defaultProject, location: initialLocation });
|
|
177023
177067
|
// This will queue `defaultProject` a second time, but it will be dropped
|
|
177024
177068
|
// as a dup when it is dequeued.
|
|
177025
177069
|
forEachProjectInProjects(projects, initialLocation.fileName, function (project, path) {
|
|
177026
177070
|
var location = { fileName: path, pos: initialLocation.pos };
|
|
177027
|
-
queue.
|
|
177071
|
+
queue.enqueue({ project: project, location: location });
|
|
177028
177072
|
});
|
|
177029
177073
|
var projectService = defaultProject.projectService;
|
|
177030
177074
|
var cancellationToken = defaultProject.getCancellationToken();
|
|
@@ -177039,22 +177083,13 @@ var ts;
|
|
|
177039
177083
|
// The keys of resultsMap allow us to check which projects have already been searched, but we also
|
|
177040
177084
|
// maintain a set of strings because that's what `loadAncestorProjectTree` wants.
|
|
177041
177085
|
var searchedProjectKeys = new ts.Set();
|
|
177042
|
-
onCancellation: while (queue.
|
|
177043
|
-
while (queue.
|
|
177086
|
+
onCancellation: while (!queue.isEmpty()) {
|
|
177087
|
+
while (!queue.isEmpty()) {
|
|
177044
177088
|
if (cancellationToken.isCancellationRequested())
|
|
177045
177089
|
break onCancellation;
|
|
177046
|
-
var
|
|
177047
|
-
|
|
177048
|
-
;
|
|
177049
|
-
if (skipCount === queue.length) {
|
|
177050
|
-
queue.length = 0;
|
|
177051
|
-
break;
|
|
177052
|
-
}
|
|
177053
|
-
if (skipCount > 0) {
|
|
177054
|
-
queue.splice(0, skipCount);
|
|
177055
|
-
}
|
|
177056
|
-
// NB: we may still skip if it's a project reference redirect
|
|
177057
|
-
var _a = queue.shift(), project = _a.project, location = _a.location;
|
|
177090
|
+
var _a = queue.dequeue(), project = _a.project, location = _a.location;
|
|
177091
|
+
if (resultsMap.has(project))
|
|
177092
|
+
continue;
|
|
177058
177093
|
if (isLocationProjectReferenceRedirect(project, location))
|
|
177059
177094
|
continue;
|
|
177060
177095
|
var projectResults = searchPosition(project, location);
|
|
@@ -177075,7 +177110,7 @@ var ts;
|
|
|
177075
177110
|
return; // Can loop forever without this (enqueue here, dequeue above, repeat)
|
|
177076
177111
|
var location = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition);
|
|
177077
177112
|
if (location) {
|
|
177078
|
-
queue.
|
|
177113
|
+
queue.enqueue({ project: project, location: location });
|
|
177079
177114
|
}
|
|
177080
177115
|
});
|
|
177081
177116
|
}
|
|
@@ -177103,7 +177138,7 @@ var ts;
|
|
|
177103
177138
|
for (var _i = 0, _a = originalScriptInfo.containingProjects; _i < _a.length; _i++) {
|
|
177104
177139
|
var project_1 = _a[_i];
|
|
177105
177140
|
if (!project_1.isOrphan() && !resultsMap.has(project_1)) { // Optimization: don't enqueue if will be discarded
|
|
177106
|
-
queue.
|
|
177141
|
+
queue.enqueue({ project: project_1, location: originalLocation });
|
|
177107
177142
|
}
|
|
177108
177143
|
}
|
|
177109
177144
|
var symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo);
|
|
@@ -177112,7 +177147,7 @@ var ts;
|
|
|
177112
177147
|
for (var _i = 0, symlinkedProjects_2 = symlinkedProjects; _i < symlinkedProjects_2.length; _i++) {
|
|
177113
177148
|
var symlinkedProject = symlinkedProjects_2[_i];
|
|
177114
177149
|
if (!symlinkedProject.isOrphan() && !resultsMap.has(symlinkedProject)) { // Optimization: don't enqueue if will be discarded
|
|
177115
|
-
queue.
|
|
177150
|
+
queue.enqueue({ project: symlinkedProject, location: { fileName: symlinkedPath, pos: originalLocation.pos } });
|
|
177116
177151
|
}
|
|
177117
177152
|
}
|
|
177118
177153
|
});
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220625";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -1670,6 +1670,43 @@ var ts;
|
|
|
1670
1670
|
return createMultiMap();
|
|
1671
1671
|
}
|
|
1672
1672
|
ts.createUnderscoreEscapedMultiMap = createUnderscoreEscapedMultiMap;
|
|
1673
|
+
function createQueue(items) {
|
|
1674
|
+
var elements = (items === null || items === void 0 ? void 0 : items.slice()) || [];
|
|
1675
|
+
var headIndex = 0;
|
|
1676
|
+
function isEmpty() {
|
|
1677
|
+
return headIndex === elements.length;
|
|
1678
|
+
}
|
|
1679
|
+
function enqueue() {
|
|
1680
|
+
var items = [];
|
|
1681
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1682
|
+
items[_i] = arguments[_i];
|
|
1683
|
+
}
|
|
1684
|
+
elements.push.apply(elements, items);
|
|
1685
|
+
}
|
|
1686
|
+
function dequeue() {
|
|
1687
|
+
if (isEmpty()) {
|
|
1688
|
+
throw new Error("Queue is empty");
|
|
1689
|
+
}
|
|
1690
|
+
var result = elements[headIndex];
|
|
1691
|
+
elements[headIndex] = undefined; // Don't keep referencing dequeued item
|
|
1692
|
+
headIndex++;
|
|
1693
|
+
// If more than half of the queue is empty, copy the remaining elements to the
|
|
1694
|
+
// front and shrink the array (unless we'd be saving fewer than 100 slots)
|
|
1695
|
+
if (headIndex > 100 && headIndex > (elements.length >> 1)) {
|
|
1696
|
+
var newLength = elements.length - headIndex;
|
|
1697
|
+
elements.copyWithin(/*target*/ 0, /*start*/ headIndex);
|
|
1698
|
+
elements.length = newLength;
|
|
1699
|
+
headIndex = 0;
|
|
1700
|
+
}
|
|
1701
|
+
return result;
|
|
1702
|
+
}
|
|
1703
|
+
return {
|
|
1704
|
+
enqueue: enqueue,
|
|
1705
|
+
dequeue: dequeue,
|
|
1706
|
+
isEmpty: isEmpty,
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
ts.createQueue = createQueue;
|
|
1673
1710
|
/**
|
|
1674
1711
|
* Creates a Set with custom equality and hash code functionality. This is useful when you
|
|
1675
1712
|
* want to use something looser than object identity - e.g. "has the same span".
|
|
@@ -8660,6 +8697,7 @@ var ts;
|
|
|
8660
8697
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
8661
8698
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
8662
8699
|
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
8700
|
+
An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, ts.DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."),
|
|
8663
8701
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
8664
8702
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
8665
8703
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
|
|
@@ -35880,6 +35918,11 @@ var ts;
|
|
|
35880
35918
|
if (isOptionalChain && ts.isPrivateIdentifier(propertyAccess.name)) {
|
|
35881
35919
|
parseErrorAtRange(propertyAccess.name, ts.Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
35882
35920
|
}
|
|
35921
|
+
if (ts.isExpressionWithTypeArguments(expression) && expression.typeArguments) {
|
|
35922
|
+
var pos_2 = expression.typeArguments.pos - 1;
|
|
35923
|
+
var end = ts.skipTrivia(sourceText, expression.typeArguments.end) + 1;
|
|
35924
|
+
parseErrorAt(pos_2, end, ts.Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);
|
|
35925
|
+
}
|
|
35883
35926
|
return finishNode(propertyAccess, pos);
|
|
35884
35927
|
}
|
|
35885
35928
|
function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
|
|
@@ -38991,10 +39034,10 @@ var ts;
|
|
|
38991
39034
|
}
|
|
38992
39035
|
function checkNodePositions(node, aggressiveChecks) {
|
|
38993
39036
|
if (aggressiveChecks) {
|
|
38994
|
-
var
|
|
39037
|
+
var pos_3 = node.pos;
|
|
38995
39038
|
var visitNode_1 = function (child) {
|
|
38996
|
-
ts.Debug.assert(child.pos >=
|
|
38997
|
-
|
|
39039
|
+
ts.Debug.assert(child.pos >= pos_3);
|
|
39040
|
+
pos_3 = child.end;
|
|
38998
39041
|
};
|
|
38999
39042
|
if (ts.hasJSDocNodes(node)) {
|
|
39000
39043
|
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
|
|
@@ -39003,7 +39046,7 @@ var ts;
|
|
|
39003
39046
|
}
|
|
39004
39047
|
}
|
|
39005
39048
|
forEachChild(node, visitNode_1);
|
|
39006
|
-
ts.Debug.assert(
|
|
39049
|
+
ts.Debug.assert(pos_3 <= node.end);
|
|
39007
39050
|
}
|
|
39008
39051
|
}
|
|
39009
39052
|
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
|
|
@@ -48298,10 +48341,11 @@ var ts;
|
|
|
48298
48341
|
}
|
|
48299
48342
|
function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
48300
48343
|
var i = 0;
|
|
48301
|
-
var q =
|
|
48302
|
-
|
|
48344
|
+
var q = ts.createQueue();
|
|
48345
|
+
q.enqueue(node);
|
|
48346
|
+
while (!q.isEmpty() && i < 100) {
|
|
48303
48347
|
i++;
|
|
48304
|
-
node = q.
|
|
48348
|
+
node = q.dequeue();
|
|
48305
48349
|
if (ts.isExportsIdentifier(node) || ts.isModuleExportsAccessExpression(node)) {
|
|
48306
48350
|
return true;
|
|
48307
48351
|
}
|
|
@@ -48309,10 +48353,10 @@ var ts;
|
|
|
48309
48353
|
var symbol = lookupSymbolForName(sourceFile, node.escapedText);
|
|
48310
48354
|
if (!!symbol && !!symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {
|
|
48311
48355
|
var init = symbol.valueDeclaration.initializer;
|
|
48312
|
-
q.
|
|
48356
|
+
q.enqueue(init);
|
|
48313
48357
|
if (ts.isAssignmentExpression(init, /*excludeCompoundAssignment*/ true)) {
|
|
48314
|
-
q.
|
|
48315
|
-
q.
|
|
48358
|
+
q.enqueue(init.left);
|
|
48359
|
+
q.enqueue(init.right);
|
|
48316
48360
|
}
|
|
48317
48361
|
}
|
|
48318
48362
|
}
|
|
@@ -138595,18 +138639,18 @@ var ts;
|
|
|
138595
138639
|
|| node.kind === 106 /* SuperKeyword */) {
|
|
138596
138640
|
referenceEntries = entries && __spreadArray([], entries, true);
|
|
138597
138641
|
}
|
|
138598
|
-
else {
|
|
138599
|
-
var queue =
|
|
138642
|
+
else if (entries) {
|
|
138643
|
+
var queue = ts.createQueue(entries);
|
|
138600
138644
|
var seenNodes = new ts.Map();
|
|
138601
|
-
while (queue
|
|
138602
|
-
var entry = queue.
|
|
138645
|
+
while (!queue.isEmpty()) {
|
|
138646
|
+
var entry = queue.dequeue();
|
|
138603
138647
|
if (!ts.addToSeen(seenNodes, ts.getNodeId(entry.node))) {
|
|
138604
138648
|
continue;
|
|
138605
138649
|
}
|
|
138606
138650
|
referenceEntries = ts.append(referenceEntries, entry);
|
|
138607
138651
|
var entries_1 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos);
|
|
138608
138652
|
if (entries_1) {
|
|
138609
|
-
queue.
|
|
138653
|
+
queue.enqueue.apply(queue, entries_1);
|
|
138610
138654
|
}
|
|
138611
138655
|
}
|
|
138612
138656
|
}
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220625";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -1670,6 +1670,43 @@ var ts;
|
|
|
1670
1670
|
return createMultiMap();
|
|
1671
1671
|
}
|
|
1672
1672
|
ts.createUnderscoreEscapedMultiMap = createUnderscoreEscapedMultiMap;
|
|
1673
|
+
function createQueue(items) {
|
|
1674
|
+
var elements = (items === null || items === void 0 ? void 0 : items.slice()) || [];
|
|
1675
|
+
var headIndex = 0;
|
|
1676
|
+
function isEmpty() {
|
|
1677
|
+
return headIndex === elements.length;
|
|
1678
|
+
}
|
|
1679
|
+
function enqueue() {
|
|
1680
|
+
var items = [];
|
|
1681
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1682
|
+
items[_i] = arguments[_i];
|
|
1683
|
+
}
|
|
1684
|
+
elements.push.apply(elements, items);
|
|
1685
|
+
}
|
|
1686
|
+
function dequeue() {
|
|
1687
|
+
if (isEmpty()) {
|
|
1688
|
+
throw new Error("Queue is empty");
|
|
1689
|
+
}
|
|
1690
|
+
var result = elements[headIndex];
|
|
1691
|
+
elements[headIndex] = undefined; // Don't keep referencing dequeued item
|
|
1692
|
+
headIndex++;
|
|
1693
|
+
// If more than half of the queue is empty, copy the remaining elements to the
|
|
1694
|
+
// front and shrink the array (unless we'd be saving fewer than 100 slots)
|
|
1695
|
+
if (headIndex > 100 && headIndex > (elements.length >> 1)) {
|
|
1696
|
+
var newLength = elements.length - headIndex;
|
|
1697
|
+
elements.copyWithin(/*target*/ 0, /*start*/ headIndex);
|
|
1698
|
+
elements.length = newLength;
|
|
1699
|
+
headIndex = 0;
|
|
1700
|
+
}
|
|
1701
|
+
return result;
|
|
1702
|
+
}
|
|
1703
|
+
return {
|
|
1704
|
+
enqueue: enqueue,
|
|
1705
|
+
dequeue: dequeue,
|
|
1706
|
+
isEmpty: isEmpty,
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
ts.createQueue = createQueue;
|
|
1673
1710
|
/**
|
|
1674
1711
|
* Creates a Set with custom equality and hash code functionality. This is useful when you
|
|
1675
1712
|
* want to use something looser than object identity - e.g. "has the same span".
|
|
@@ -8660,6 +8697,7 @@ var ts;
|
|
|
8660
8697
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
8661
8698
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
8662
8699
|
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
8700
|
+
An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, ts.DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."),
|
|
8663
8701
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
8664
8702
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
8665
8703
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
|
|
@@ -35880,6 +35918,11 @@ var ts;
|
|
|
35880
35918
|
if (isOptionalChain && ts.isPrivateIdentifier(propertyAccess.name)) {
|
|
35881
35919
|
parseErrorAtRange(propertyAccess.name, ts.Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
35882
35920
|
}
|
|
35921
|
+
if (ts.isExpressionWithTypeArguments(expression) && expression.typeArguments) {
|
|
35922
|
+
var pos_2 = expression.typeArguments.pos - 1;
|
|
35923
|
+
var end = ts.skipTrivia(sourceText, expression.typeArguments.end) + 1;
|
|
35924
|
+
parseErrorAt(pos_2, end, ts.Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);
|
|
35925
|
+
}
|
|
35883
35926
|
return finishNode(propertyAccess, pos);
|
|
35884
35927
|
}
|
|
35885
35928
|
function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
|
|
@@ -38991,10 +39034,10 @@ var ts;
|
|
|
38991
39034
|
}
|
|
38992
39035
|
function checkNodePositions(node, aggressiveChecks) {
|
|
38993
39036
|
if (aggressiveChecks) {
|
|
38994
|
-
var
|
|
39037
|
+
var pos_3 = node.pos;
|
|
38995
39038
|
var visitNode_1 = function (child) {
|
|
38996
|
-
ts.Debug.assert(child.pos >=
|
|
38997
|
-
|
|
39039
|
+
ts.Debug.assert(child.pos >= pos_3);
|
|
39040
|
+
pos_3 = child.end;
|
|
38998
39041
|
};
|
|
38999
39042
|
if (ts.hasJSDocNodes(node)) {
|
|
39000
39043
|
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
|
|
@@ -39003,7 +39046,7 @@ var ts;
|
|
|
39003
39046
|
}
|
|
39004
39047
|
}
|
|
39005
39048
|
forEachChild(node, visitNode_1);
|
|
39006
|
-
ts.Debug.assert(
|
|
39049
|
+
ts.Debug.assert(pos_3 <= node.end);
|
|
39007
39050
|
}
|
|
39008
39051
|
}
|
|
39009
39052
|
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
|
|
@@ -48298,10 +48341,11 @@ var ts;
|
|
|
48298
48341
|
}
|
|
48299
48342
|
function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
48300
48343
|
var i = 0;
|
|
48301
|
-
var q =
|
|
48302
|
-
|
|
48344
|
+
var q = ts.createQueue();
|
|
48345
|
+
q.enqueue(node);
|
|
48346
|
+
while (!q.isEmpty() && i < 100) {
|
|
48303
48347
|
i++;
|
|
48304
|
-
node = q.
|
|
48348
|
+
node = q.dequeue();
|
|
48305
48349
|
if (ts.isExportsIdentifier(node) || ts.isModuleExportsAccessExpression(node)) {
|
|
48306
48350
|
return true;
|
|
48307
48351
|
}
|
|
@@ -48309,10 +48353,10 @@ var ts;
|
|
|
48309
48353
|
var symbol = lookupSymbolForName(sourceFile, node.escapedText);
|
|
48310
48354
|
if (!!symbol && !!symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {
|
|
48311
48355
|
var init = symbol.valueDeclaration.initializer;
|
|
48312
|
-
q.
|
|
48356
|
+
q.enqueue(init);
|
|
48313
48357
|
if (ts.isAssignmentExpression(init, /*excludeCompoundAssignment*/ true)) {
|
|
48314
|
-
q.
|
|
48315
|
-
q.
|
|
48358
|
+
q.enqueue(init.left);
|
|
48359
|
+
q.enqueue(init.right);
|
|
48316
48360
|
}
|
|
48317
48361
|
}
|
|
48318
48362
|
}
|
|
@@ -138595,18 +138639,18 @@ var ts;
|
|
|
138595
138639
|
|| node.kind === 106 /* SuperKeyword */) {
|
|
138596
138640
|
referenceEntries = entries && __spreadArray([], entries, true);
|
|
138597
138641
|
}
|
|
138598
|
-
else {
|
|
138599
|
-
var queue =
|
|
138642
|
+
else if (entries) {
|
|
138643
|
+
var queue = ts.createQueue(entries);
|
|
138600
138644
|
var seenNodes = new ts.Map();
|
|
138601
|
-
while (queue
|
|
138602
|
-
var entry = queue.
|
|
138645
|
+
while (!queue.isEmpty()) {
|
|
138646
|
+
var entry = queue.dequeue();
|
|
138603
138647
|
if (!ts.addToSeen(seenNodes, ts.getNodeId(entry.node))) {
|
|
138604
138648
|
continue;
|
|
138605
138649
|
}
|
|
138606
138650
|
referenceEntries = ts.append(referenceEntries, entry);
|
|
138607
138651
|
var entries_1 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos);
|
|
138608
138652
|
if (entries_1) {
|
|
138609
|
-
queue.
|
|
138653
|
+
queue.enqueue.apply(queue, entries_1);
|
|
138610
138654
|
}
|
|
138611
138655
|
}
|
|
138612
138656
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220625";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -1465,6 +1465,43 @@ var ts;
|
|
|
1465
1465
|
return createMultiMap();
|
|
1466
1466
|
}
|
|
1467
1467
|
ts.createUnderscoreEscapedMultiMap = createUnderscoreEscapedMultiMap;
|
|
1468
|
+
function createQueue(items) {
|
|
1469
|
+
var elements = (items === null || items === void 0 ? void 0 : items.slice()) || [];
|
|
1470
|
+
var headIndex = 0;
|
|
1471
|
+
function isEmpty() {
|
|
1472
|
+
return headIndex === elements.length;
|
|
1473
|
+
}
|
|
1474
|
+
function enqueue() {
|
|
1475
|
+
var items = [];
|
|
1476
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1477
|
+
items[_i] = arguments[_i];
|
|
1478
|
+
}
|
|
1479
|
+
elements.push.apply(elements, items);
|
|
1480
|
+
}
|
|
1481
|
+
function dequeue() {
|
|
1482
|
+
if (isEmpty()) {
|
|
1483
|
+
throw new Error("Queue is empty");
|
|
1484
|
+
}
|
|
1485
|
+
var result = elements[headIndex];
|
|
1486
|
+
elements[headIndex] = undefined; // Don't keep referencing dequeued item
|
|
1487
|
+
headIndex++;
|
|
1488
|
+
// If more than half of the queue is empty, copy the remaining elements to the
|
|
1489
|
+
// front and shrink the array (unless we'd be saving fewer than 100 slots)
|
|
1490
|
+
if (headIndex > 100 && headIndex > (elements.length >> 1)) {
|
|
1491
|
+
var newLength = elements.length - headIndex;
|
|
1492
|
+
elements.copyWithin(/*target*/ 0, /*start*/ headIndex);
|
|
1493
|
+
elements.length = newLength;
|
|
1494
|
+
headIndex = 0;
|
|
1495
|
+
}
|
|
1496
|
+
return result;
|
|
1497
|
+
}
|
|
1498
|
+
return {
|
|
1499
|
+
enqueue: enqueue,
|
|
1500
|
+
dequeue: dequeue,
|
|
1501
|
+
isEmpty: isEmpty,
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
ts.createQueue = createQueue;
|
|
1468
1505
|
/**
|
|
1469
1506
|
* Creates a Set with custom equality and hash code functionality. This is useful when you
|
|
1470
1507
|
* want to use something looser than object identity - e.g. "has the same span".
|
|
@@ -8455,6 +8492,7 @@ var ts;
|
|
|
8455
8492
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
8456
8493
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
8457
8494
|
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
8495
|
+
An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, ts.DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."),
|
|
8458
8496
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
8459
8497
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
8460
8498
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
|
|
@@ -35675,6 +35713,11 @@ var ts;
|
|
|
35675
35713
|
if (isOptionalChain && ts.isPrivateIdentifier(propertyAccess.name)) {
|
|
35676
35714
|
parseErrorAtRange(propertyAccess.name, ts.Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
35677
35715
|
}
|
|
35716
|
+
if (ts.isExpressionWithTypeArguments(expression) && expression.typeArguments) {
|
|
35717
|
+
var pos_2 = expression.typeArguments.pos - 1;
|
|
35718
|
+
var end = ts.skipTrivia(sourceText, expression.typeArguments.end) + 1;
|
|
35719
|
+
parseErrorAt(pos_2, end, ts.Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);
|
|
35720
|
+
}
|
|
35678
35721
|
return finishNode(propertyAccess, pos);
|
|
35679
35722
|
}
|
|
35680
35723
|
function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
|
|
@@ -38786,10 +38829,10 @@ var ts;
|
|
|
38786
38829
|
}
|
|
38787
38830
|
function checkNodePositions(node, aggressiveChecks) {
|
|
38788
38831
|
if (aggressiveChecks) {
|
|
38789
|
-
var
|
|
38832
|
+
var pos_3 = node.pos;
|
|
38790
38833
|
var visitNode_1 = function (child) {
|
|
38791
|
-
ts.Debug.assert(child.pos >=
|
|
38792
|
-
|
|
38834
|
+
ts.Debug.assert(child.pos >= pos_3);
|
|
38835
|
+
pos_3 = child.end;
|
|
38793
38836
|
};
|
|
38794
38837
|
if (ts.hasJSDocNodes(node)) {
|
|
38795
38838
|
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
|
|
@@ -38798,7 +38841,7 @@ var ts;
|
|
|
38798
38841
|
}
|
|
38799
38842
|
}
|
|
38800
38843
|
forEachChild(node, visitNode_1);
|
|
38801
|
-
ts.Debug.assert(
|
|
38844
|
+
ts.Debug.assert(pos_3 <= node.end);
|
|
38802
38845
|
}
|
|
38803
38846
|
}
|
|
38804
38847
|
function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
|
|
@@ -48093,10 +48136,11 @@ var ts;
|
|
|
48093
48136
|
}
|
|
48094
48137
|
function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
48095
48138
|
var i = 0;
|
|
48096
|
-
var q =
|
|
48097
|
-
|
|
48139
|
+
var q = ts.createQueue();
|
|
48140
|
+
q.enqueue(node);
|
|
48141
|
+
while (!q.isEmpty() && i < 100) {
|
|
48098
48142
|
i++;
|
|
48099
|
-
node = q.
|
|
48143
|
+
node = q.dequeue();
|
|
48100
48144
|
if (ts.isExportsIdentifier(node) || ts.isModuleExportsAccessExpression(node)) {
|
|
48101
48145
|
return true;
|
|
48102
48146
|
}
|
|
@@ -48104,10 +48148,10 @@ var ts;
|
|
|
48104
48148
|
var symbol = lookupSymbolForName(sourceFile, node.escapedText);
|
|
48105
48149
|
if (!!symbol && !!symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {
|
|
48106
48150
|
var init = symbol.valueDeclaration.initializer;
|
|
48107
|
-
q.
|
|
48151
|
+
q.enqueue(init);
|
|
48108
48152
|
if (ts.isAssignmentExpression(init, /*excludeCompoundAssignment*/ true)) {
|
|
48109
|
-
q.
|
|
48110
|
-
q.
|
|
48153
|
+
q.enqueue(init.left);
|
|
48154
|
+
q.enqueue(init.right);
|
|
48111
48155
|
}
|
|
48112
48156
|
}
|
|
48113
48157
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.8.0-dev.
|
|
5
|
+
"version": "4.8.0-dev.20220625",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|