@typescript-deploys/pr-build 5.3.0-pr-55887-9 → 5.3.0-pr-55860-30
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 +95 -105
- package/lib/tsserver.js +95 -105
- package/lib/typescript.js +95 -105
- package/lib/typingsInstaller.js +2 -2
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230928`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -7961,6 +7961,7 @@ ${lanes.join("\n")}
|
|
|
7961
7961
|
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
7962
7962
|
Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."),
|
|
7963
7963
|
Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."),
|
|
7964
|
+
The_type_of_this_declaration_is_ambiguous_and_may_be_observed_as_either_0_or_1: diag(2860, 1 /* Error */, "The_type_of_this_declaration_is_ambiguous_and_may_be_observed_as_either_0_or_1_2860", "The type of this declaration is ambiguous and may be observed as either '{0}' or '{1}'."),
|
|
7964
7965
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
7965
7966
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
7966
7967
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -17430,7 +17431,6 @@ ${lanes.join("\n")}
|
|
|
17430
17431
|
this.exportSymbol = void 0;
|
|
17431
17432
|
this.constEnumOnlyModule = void 0;
|
|
17432
17433
|
this.isReferenced = void 0;
|
|
17433
|
-
this.isInitialized = void 0;
|
|
17434
17434
|
this.isAssigned = void 0;
|
|
17435
17435
|
this.links = void 0;
|
|
17436
17436
|
}
|
|
@@ -46003,16 +46003,11 @@ ${lanes.join("\n")}
|
|
|
46003
46003
|
checkSourceFileWithEagerDiagnostics(file);
|
|
46004
46004
|
Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */));
|
|
46005
46005
|
diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName));
|
|
46006
|
-
|
|
46007
|
-
|
|
46008
|
-
|
|
46009
|
-
|
|
46010
|
-
|
|
46011
|
-
}
|
|
46012
|
-
},
|
|
46013
|
-
/*checkUnused*/
|
|
46014
|
-
true
|
|
46015
|
-
);
|
|
46006
|
+
checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => {
|
|
46007
|
+
if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
|
|
46008
|
+
(diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ });
|
|
46009
|
+
}
|
|
46010
|
+
});
|
|
46016
46011
|
return diagnostics2 || emptyArray;
|
|
46017
46012
|
} finally {
|
|
46018
46013
|
cancellationToken = void 0;
|
|
@@ -46509,7 +46504,7 @@ ${lanes.join("\n")}
|
|
|
46509
46504
|
var deferredGlobalClassAccessorDecoratorTargetType;
|
|
46510
46505
|
var deferredGlobalClassAccessorDecoratorResultType;
|
|
46511
46506
|
var deferredGlobalClassFieldDecoratorContextType;
|
|
46512
|
-
var
|
|
46507
|
+
var allPotentiallyUnusedIdentifiers = /* @__PURE__ */ new Map();
|
|
46513
46508
|
var flowLoopStart = 0;
|
|
46514
46509
|
var flowLoopCount = 0;
|
|
46515
46510
|
var sharedFlowCount = 0;
|
|
@@ -46552,6 +46547,7 @@ ${lanes.join("\n")}
|
|
|
46552
46547
|
var potentialReflectCollisions = [];
|
|
46553
46548
|
var potentialUnusedRenamedBindingElementsInTypes = [];
|
|
46554
46549
|
var awaitedTypeStack = [];
|
|
46550
|
+
var ambiguousVariableDeclarationsWhenWidened = [];
|
|
46555
46551
|
var diagnostics = createDiagnosticCollection();
|
|
46556
46552
|
var suggestionDiagnostics = createDiagnosticCollection();
|
|
46557
46553
|
var typeofType = createTypeofType();
|
|
@@ -47220,10 +47216,10 @@ ${lanes.join("\n")}
|
|
|
47220
47216
|
function isConstAssertion(location) {
|
|
47221
47217
|
return isAssertionExpression(location) && isConstTypeReference(location.type) || isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression);
|
|
47222
47218
|
}
|
|
47223
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true
|
|
47224
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions,
|
|
47219
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true) {
|
|
47220
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, getSymbol2);
|
|
47225
47221
|
}
|
|
47226
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions,
|
|
47222
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
47227
47223
|
var _a, _b, _c;
|
|
47228
47224
|
const originalLocation = location;
|
|
47229
47225
|
let result;
|
|
@@ -47449,9 +47445,6 @@ ${lanes.join("\n")}
|
|
|
47449
47445
|
if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) {
|
|
47450
47446
|
result.isReferenced |= meaning;
|
|
47451
47447
|
}
|
|
47452
|
-
if (isWritten && result) {
|
|
47453
|
-
result.isInitialized = true;
|
|
47454
|
-
}
|
|
47455
47448
|
if (!result) {
|
|
47456
47449
|
if (lastLocation) {
|
|
47457
47450
|
Debug.assertNode(lastLocation, isSourceFile);
|
|
@@ -66959,10 +66952,7 @@ ${lanes.join("\n")}
|
|
|
66959
66952
|
node,
|
|
66960
66953
|
!isWriteOnlyAccess(node),
|
|
66961
66954
|
/*excludeGlobals*/
|
|
66962
|
-
false
|
|
66963
|
-
/*getSpellingSuggestions*/
|
|
66964
|
-
void 0,
|
|
66965
|
-
isWriteAccess(node)
|
|
66955
|
+
false
|
|
66966
66956
|
) || unknownSymbol;
|
|
66967
66957
|
}
|
|
66968
66958
|
return links.resolvedSymbol;
|
|
@@ -72396,8 +72386,6 @@ ${lanes.join("\n")}
|
|
|
72396
72386
|
false,
|
|
72397
72387
|
/*getSpellingSuggestions*/
|
|
72398
72388
|
true,
|
|
72399
|
-
/*isWritten*/
|
|
72400
|
-
false,
|
|
72401
72389
|
(symbols, name, meaning2) => {
|
|
72402
72390
|
Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
72403
72391
|
const symbol = getSymbol2(symbols, name, meaning2);
|
|
@@ -77852,7 +77840,7 @@ ${lanes.join("\n")}
|
|
|
77852
77840
|
}
|
|
77853
77841
|
}
|
|
77854
77842
|
if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) {
|
|
77855
|
-
|
|
77843
|
+
registerForUnusedIdentifiersCheck(node);
|
|
77856
77844
|
}
|
|
77857
77845
|
}
|
|
77858
77846
|
}
|
|
@@ -78397,7 +78385,7 @@ ${lanes.join("\n")}
|
|
|
78397
78385
|
}
|
|
78398
78386
|
}
|
|
78399
78387
|
}
|
|
78400
|
-
|
|
78388
|
+
registerForUnusedIdentifiersCheck(node);
|
|
78401
78389
|
}
|
|
78402
78390
|
function checkTemplateLiteralType(node) {
|
|
78403
78391
|
for (const span of node.templateSpans) {
|
|
@@ -79383,27 +79371,25 @@ ${lanes.join("\n")}
|
|
|
79383
79371
|
}
|
|
79384
79372
|
}
|
|
79385
79373
|
}
|
|
79386
|
-
function
|
|
79387
|
-
addLazyDiagnostic(
|
|
79388
|
-
function
|
|
79374
|
+
function registerForUnusedIdentifiersCheck(node) {
|
|
79375
|
+
addLazyDiagnostic(registerForUnusedIdentifiersCheckDiagnostics);
|
|
79376
|
+
function registerForUnusedIdentifiersCheckDiagnostics() {
|
|
79389
79377
|
const sourceFile = getSourceFileOfNode(node);
|
|
79390
|
-
let
|
|
79391
|
-
if (!
|
|
79392
|
-
|
|
79393
|
-
|
|
79378
|
+
let potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path);
|
|
79379
|
+
if (!potentiallyUnusedIdentifiers) {
|
|
79380
|
+
potentiallyUnusedIdentifiers = [];
|
|
79381
|
+
allPotentiallyUnusedIdentifiers.set(sourceFile.path, potentiallyUnusedIdentifiers);
|
|
79394
79382
|
}
|
|
79395
|
-
|
|
79383
|
+
potentiallyUnusedIdentifiers.push(node);
|
|
79396
79384
|
}
|
|
79397
79385
|
}
|
|
79398
|
-
function
|
|
79386
|
+
function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) {
|
|
79399
79387
|
for (const node of potentiallyUnusedIdentifiers) {
|
|
79400
79388
|
switch (node.kind) {
|
|
79401
79389
|
case 263 /* ClassDeclaration */:
|
|
79402
79390
|
case 231 /* ClassExpression */:
|
|
79403
|
-
|
|
79404
|
-
|
|
79405
|
-
checkUnusedTypeParameters(node, addDiagnostic);
|
|
79406
|
-
}
|
|
79391
|
+
checkUnusedClassMembers(node, addDiagnostic);
|
|
79392
|
+
checkUnusedTypeParameters(node, addDiagnostic);
|
|
79407
79393
|
break;
|
|
79408
79394
|
case 312 /* SourceFile */:
|
|
79409
79395
|
case 267 /* ModuleDeclaration */:
|
|
@@ -79412,12 +79398,7 @@ ${lanes.join("\n")}
|
|
|
79412
79398
|
case 248 /* ForStatement */:
|
|
79413
79399
|
case 249 /* ForInStatement */:
|
|
79414
79400
|
case 250 /* ForOfStatement */:
|
|
79415
|
-
|
|
79416
|
-
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
|
79417
|
-
}
|
|
79418
|
-
if (checkUninitialized) {
|
|
79419
|
-
checkUninitializedLocals(node);
|
|
79420
|
-
}
|
|
79401
|
+
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
|
79421
79402
|
break;
|
|
79422
79403
|
case 176 /* Constructor */:
|
|
79423
79404
|
case 218 /* FunctionExpression */:
|
|
@@ -79426,15 +79407,10 @@ ${lanes.join("\n")}
|
|
|
79426
79407
|
case 174 /* MethodDeclaration */:
|
|
79427
79408
|
case 177 /* GetAccessor */:
|
|
79428
79409
|
case 178 /* SetAccessor */:
|
|
79429
|
-
if (
|
|
79430
|
-
|
|
79431
|
-
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
|
79432
|
-
}
|
|
79433
|
-
checkUnusedTypeParameters(node, addDiagnostic);
|
|
79434
|
-
}
|
|
79435
|
-
if (checkUninitialized) {
|
|
79436
|
-
checkUninitializedLocals(node);
|
|
79410
|
+
if (node.body) {
|
|
79411
|
+
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
|
79437
79412
|
}
|
|
79413
|
+
checkUnusedTypeParameters(node, addDiagnostic);
|
|
79438
79414
|
break;
|
|
79439
79415
|
case 173 /* MethodSignature */:
|
|
79440
79416
|
case 179 /* CallSignature */:
|
|
@@ -79443,14 +79419,10 @@ ${lanes.join("\n")}
|
|
|
79443
79419
|
case 185 /* ConstructorType */:
|
|
79444
79420
|
case 265 /* TypeAliasDeclaration */:
|
|
79445
79421
|
case 264 /* InterfaceDeclaration */:
|
|
79446
|
-
|
|
79447
|
-
checkUnusedTypeParameters(node, addDiagnostic);
|
|
79448
|
-
}
|
|
79422
|
+
checkUnusedTypeParameters(node, addDiagnostic);
|
|
79449
79423
|
break;
|
|
79450
79424
|
case 195 /* InferType */:
|
|
79451
|
-
|
|
79452
|
-
checkUnusedInferTypeParameter(node, addDiagnostic);
|
|
79453
|
-
}
|
|
79425
|
+
checkUnusedInferTypeParameter(node, addDiagnostic);
|
|
79454
79426
|
break;
|
|
79455
79427
|
default:
|
|
79456
79428
|
Debug.assertNever(node, "Node should not have been registered for unused identifiers check");
|
|
@@ -79640,26 +79612,6 @@ ${lanes.join("\n")}
|
|
|
79640
79612
|
}
|
|
79641
79613
|
});
|
|
79642
79614
|
}
|
|
79643
|
-
function checkUninitializedLocals(nodeWithLocals) {
|
|
79644
|
-
nodeWithLocals.locals.forEach((local) => {
|
|
79645
|
-
if (!(local.flags & 3 /* Variable */) || local.isInitialized || !local.isReferenced) {
|
|
79646
|
-
return;
|
|
79647
|
-
}
|
|
79648
|
-
const declaration = local.valueDeclaration;
|
|
79649
|
-
if (!declaration) {
|
|
79650
|
-
return;
|
|
79651
|
-
}
|
|
79652
|
-
if (isVariableDeclaration(declaration)) {
|
|
79653
|
-
if (getCombinedNodeFlagsCached(declaration) & 33554432 /* Ambient */ || declaration.exclamationToken || declaration.initializer || !declaration.type) {
|
|
79654
|
-
return;
|
|
79655
|
-
}
|
|
79656
|
-
const type = getTypeFromTypeNode(declaration.type);
|
|
79657
|
-
if (!(type.flags & 3 /* AnyOrUnknown */) && !containsUndefinedType(type)) {
|
|
79658
|
-
error2(declaration, Diagnostics.Variable_0_is_used_before_being_assigned, idText(declaration.name));
|
|
79659
|
-
}
|
|
79660
|
-
}
|
|
79661
|
-
});
|
|
79662
|
-
}
|
|
79663
79615
|
function checkPotentialUncheckedRenamedBindingElementsInTypes() {
|
|
79664
79616
|
var _a;
|
|
79665
79617
|
for (const node of potentialUnusedRenamedBindingElementsInTypes) {
|
|
@@ -79706,7 +79658,7 @@ ${lanes.join("\n")}
|
|
|
79706
79658
|
forEach(node.statements, checkSourceElement);
|
|
79707
79659
|
}
|
|
79708
79660
|
if (node.locals) {
|
|
79709
|
-
|
|
79661
|
+
registerForUnusedIdentifiersCheck(node);
|
|
79710
79662
|
}
|
|
79711
79663
|
}
|
|
79712
79664
|
function checkCollisionWithArgumentsInGeneratedCode(node) {
|
|
@@ -80055,6 +80007,29 @@ ${lanes.join("\n")}
|
|
|
80055
80007
|
}
|
|
80056
80008
|
checkCollisionsForDeclarationName(node, node.name);
|
|
80057
80009
|
}
|
|
80010
|
+
function canHaveLiteralInitializer2(node2) {
|
|
80011
|
+
switch (node2.kind) {
|
|
80012
|
+
case 172 /* PropertyDeclaration */:
|
|
80013
|
+
case 171 /* PropertySignature */:
|
|
80014
|
+
return !hasEffectiveModifier(node2, 8 /* Private */);
|
|
80015
|
+
case 169 /* Parameter */:
|
|
80016
|
+
case 260 /* VariableDeclaration */:
|
|
80017
|
+
return true;
|
|
80018
|
+
}
|
|
80019
|
+
return false;
|
|
80020
|
+
}
|
|
80021
|
+
function shouldPrintWithInitializer(node2) {
|
|
80022
|
+
return canHaveLiteralInitializer2(node2) && isLiteralConstDeclaration(node2);
|
|
80023
|
+
}
|
|
80024
|
+
function isPrivateDeclaration(node2) {
|
|
80025
|
+
return hasEffectiveModifier(node2, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node2);
|
|
80026
|
+
}
|
|
80027
|
+
if (getEmitDeclarations(compilerOptions) && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) && !shouldPrintWithInitializer(node) && !isPrivateDeclaration(node)) {
|
|
80028
|
+
const widenedLiteralType = getWidenedLiteralType(type);
|
|
80029
|
+
if (!isTypeIdenticalTo(type, widenedLiteralType)) {
|
|
80030
|
+
ambiguousVariableDeclarationsWhenWidened.push([node, type, widenedLiteralType]);
|
|
80031
|
+
}
|
|
80032
|
+
}
|
|
80058
80033
|
}
|
|
80059
80034
|
function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) {
|
|
80060
80035
|
const nextDeclarationName = getNameOfDeclaration(nextDeclaration);
|
|
@@ -80256,7 +80231,7 @@ ${lanes.join("\n")}
|
|
|
80256
80231
|
checkExpression(node.incrementor);
|
|
80257
80232
|
checkSourceElement(node.statement);
|
|
80258
80233
|
if (node.locals) {
|
|
80259
|
-
|
|
80234
|
+
registerForUnusedIdentifiersCheck(node);
|
|
80260
80235
|
}
|
|
80261
80236
|
}
|
|
80262
80237
|
function checkForOfStatement(node) {
|
|
@@ -80295,7 +80270,7 @@ ${lanes.join("\n")}
|
|
|
80295
80270
|
}
|
|
80296
80271
|
checkSourceElement(node.statement);
|
|
80297
80272
|
if (node.locals) {
|
|
80298
|
-
|
|
80273
|
+
registerForUnusedIdentifiersCheck(node);
|
|
80299
80274
|
}
|
|
80300
80275
|
}
|
|
80301
80276
|
function checkForInStatement(node) {
|
|
@@ -80327,7 +80302,7 @@ ${lanes.join("\n")}
|
|
|
80327
80302
|
}
|
|
80328
80303
|
checkSourceElement(node.statement);
|
|
80329
80304
|
if (node.locals) {
|
|
80330
|
-
|
|
80305
|
+
registerForUnusedIdentifiersCheck(node);
|
|
80331
80306
|
}
|
|
80332
80307
|
}
|
|
80333
80308
|
function checkRightHandSideOfForOf(statement) {
|
|
@@ -81059,7 +81034,7 @@ ${lanes.join("\n")}
|
|
|
81059
81034
|
}
|
|
81060
81035
|
});
|
|
81061
81036
|
if (node.caseBlock.locals) {
|
|
81062
|
-
|
|
81037
|
+
registerForUnusedIdentifiersCheck(node.caseBlock);
|
|
81063
81038
|
}
|
|
81064
81039
|
}
|
|
81065
81040
|
function checkLabeledStatement(node) {
|
|
@@ -81399,7 +81374,7 @@ ${lanes.join("\n")}
|
|
|
81399
81374
|
}
|
|
81400
81375
|
function checkClassExpressionDeferred(node) {
|
|
81401
81376
|
forEach(node.members, checkSourceElement);
|
|
81402
|
-
|
|
81377
|
+
registerForUnusedIdentifiersCheck(node);
|
|
81403
81378
|
}
|
|
81404
81379
|
function checkClassDeclaration(node) {
|
|
81405
81380
|
const firstDecorator = find(node.modifiers, isDecorator);
|
|
@@ -81411,7 +81386,7 @@ ${lanes.join("\n")}
|
|
|
81411
81386
|
}
|
|
81412
81387
|
checkClassLikeDeclaration(node);
|
|
81413
81388
|
forEach(node.members, checkSourceElement);
|
|
81414
|
-
|
|
81389
|
+
registerForUnusedIdentifiersCheck(node);
|
|
81415
81390
|
}
|
|
81416
81391
|
function checkClassLikeDeclaration(node) {
|
|
81417
81392
|
checkGrammarClassLikeDeclaration(node);
|
|
@@ -81972,7 +81947,7 @@ ${lanes.join("\n")}
|
|
|
81972
81947
|
forEach(node.members, checkSourceElement);
|
|
81973
81948
|
addLazyDiagnostic(() => {
|
|
81974
81949
|
checkTypeForDuplicateIndexSignatures(node);
|
|
81975
|
-
|
|
81950
|
+
registerForUnusedIdentifiersCheck(node);
|
|
81976
81951
|
});
|
|
81977
81952
|
}
|
|
81978
81953
|
function checkTypeAliasDeclaration(node) {
|
|
@@ -81986,7 +81961,7 @@ ${lanes.join("\n")}
|
|
|
81986
81961
|
}
|
|
81987
81962
|
} else {
|
|
81988
81963
|
checkSourceElement(node.type);
|
|
81989
|
-
|
|
81964
|
+
registerForUnusedIdentifiersCheck(node);
|
|
81990
81965
|
}
|
|
81991
81966
|
}
|
|
81992
81967
|
function computeEnumMemberValues(node) {
|
|
@@ -82257,7 +82232,7 @@ ${lanes.join("\n")}
|
|
|
82257
82232
|
if (node.body) {
|
|
82258
82233
|
checkSourceElement(node.body);
|
|
82259
82234
|
if (!isGlobalScopeAugmentation(node)) {
|
|
82260
|
-
|
|
82235
|
+
registerForUnusedIdentifiersCheck(node);
|
|
82261
82236
|
}
|
|
82262
82237
|
}
|
|
82263
82238
|
addLazyDiagnostic(checkModuleDeclarationDiagnostics);
|
|
@@ -83255,8 +83230,8 @@ ${lanes.join("\n")}
|
|
|
83255
83230
|
return Debug.assertNever(kind);
|
|
83256
83231
|
}
|
|
83257
83232
|
}
|
|
83258
|
-
function
|
|
83259
|
-
return
|
|
83233
|
+
function getPotentiallyUnusedIdentifiers(sourceFile) {
|
|
83234
|
+
return allPotentiallyUnusedIdentifiers.get(sourceFile.path) || emptyArray;
|
|
83260
83235
|
}
|
|
83261
83236
|
function checkSourceFileWorker(node) {
|
|
83262
83237
|
const links = getNodeLinks(node);
|
|
@@ -83270,30 +83245,42 @@ ${lanes.join("\n")}
|
|
|
83270
83245
|
clear(potentialWeakMapSetCollisions);
|
|
83271
83246
|
clear(potentialReflectCollisions);
|
|
83272
83247
|
clear(potentialUnusedRenamedBindingElementsInTypes);
|
|
83248
|
+
clear(ambiguousVariableDeclarationsWhenWidened);
|
|
83273
83249
|
forEach(node.statements, checkSourceElement);
|
|
83274
83250
|
checkSourceElement(node.endOfFileToken);
|
|
83275
83251
|
checkDeferredNodes(node);
|
|
83276
83252
|
if (isExternalOrCommonJsModule(node)) {
|
|
83277
|
-
|
|
83253
|
+
registerForUnusedIdentifiersCheck(node);
|
|
83278
83254
|
}
|
|
83279
83255
|
addLazyDiagnostic(() => {
|
|
83280
|
-
|
|
83281
|
-
|
|
83282
|
-
|
|
83283
|
-
|
|
83284
|
-
|
|
83285
|
-
|
|
83286
|
-
diagnostics.add(diag2);
|
|
83287
|
-
}
|
|
83288
|
-
},
|
|
83289
|
-
checkUnused,
|
|
83290
|
-
strictNullChecks
|
|
83291
|
-
);
|
|
83256
|
+
if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) {
|
|
83257
|
+
checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => {
|
|
83258
|
+
if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
|
|
83259
|
+
diagnostics.add(diag2);
|
|
83260
|
+
}
|
|
83261
|
+
});
|
|
83292
83262
|
}
|
|
83293
83263
|
if (!node.isDeclarationFile) {
|
|
83294
83264
|
checkPotentialUncheckedRenamedBindingElementsInTypes();
|
|
83295
83265
|
}
|
|
83296
83266
|
});
|
|
83267
|
+
addLazyDiagnostic(() => {
|
|
83268
|
+
function isVisibleExternally(elem) {
|
|
83269
|
+
if (isOmittedExpression(elem)) {
|
|
83270
|
+
return false;
|
|
83271
|
+
}
|
|
83272
|
+
if (isBindingPattern(elem.name)) {
|
|
83273
|
+
return some(elem.name.elements, isVisibleExternally);
|
|
83274
|
+
} else {
|
|
83275
|
+
return isDeclarationVisible(elem);
|
|
83276
|
+
}
|
|
83277
|
+
}
|
|
83278
|
+
for (const [node2, type, widenedLiteralType] of ambiguousVariableDeclarationsWhenWidened) {
|
|
83279
|
+
if (isVisibleExternally(node2)) {
|
|
83280
|
+
error2(node2.name, Diagnostics.The_type_of_this_declaration_is_ambiguous_and_may_be_observed_as_either_0_or_1, typeToString(widenedLiteralType), typeToString(type));
|
|
83281
|
+
}
|
|
83282
|
+
}
|
|
83283
|
+
});
|
|
83297
83284
|
if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && !node.isDeclarationFile && isExternalModule(node)) {
|
|
83298
83285
|
checkImportsForTypeOnlyConversion(node);
|
|
83299
83286
|
}
|
|
@@ -83316,6 +83303,9 @@ ${lanes.join("\n")}
|
|
|
83316
83303
|
forEach(potentialReflectCollisions, checkReflectCollision);
|
|
83317
83304
|
clear(potentialReflectCollisions);
|
|
83318
83305
|
}
|
|
83306
|
+
if (ambiguousVariableDeclarationsWhenWidened.length) {
|
|
83307
|
+
clear(ambiguousVariableDeclarationsWhenWidened);
|
|
83308
|
+
}
|
|
83319
83309
|
links.flags |= 1 /* TypeChecked */;
|
|
83320
83310
|
}
|
|
83321
83311
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230928`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -6028,6 +6028,7 @@ var Diagnostics = {
|
|
|
6028
6028
|
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
6029
6029
|
Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."),
|
|
6030
6030
|
Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."),
|
|
6031
|
+
The_type_of_this_declaration_is_ambiguous_and_may_be_observed_as_either_0_or_1: diag(2860, 1 /* Error */, "The_type_of_this_declaration_is_ambiguous_and_may_be_observed_as_either_0_or_1_2860", "The type of this declaration is ambiguous and may be observed as either '{0}' or '{1}'."),
|
|
6031
6032
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6032
6033
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6033
6034
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -11086,7 +11087,6 @@ function Symbol4(flags, name) {
|
|
|
11086
11087
|
this.exportSymbol = void 0;
|
|
11087
11088
|
this.constEnumOnlyModule = void 0;
|
|
11088
11089
|
this.isReferenced = void 0;
|
|
11089
|
-
this.isInitialized = void 0;
|
|
11090
11090
|
this.isAssigned = void 0;
|
|
11091
11091
|
this.links = void 0;
|
|
11092
11092
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.3.0-pr-
|
|
5
|
+
"version": "5.3.0-pr-55860-30",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "c7b225f75ae6c946cd97ab7bc95c0929e5bf7282"
|
|
118
118
|
}
|