@typescript-deploys/pr-build 5.5.0-pr-57575-33 → 5.5.0-pr-57133-25
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 +38 -36
- package/lib/tsserver.js +38 -36
- package/lib/typescript.js +179020 -178822
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -1215,7 +1215,7 @@ function skipWhile(array, predicate) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
1217
|
function isNodeLikeSystem() {
|
|
1218
|
-
return typeof process !== "undefined" && !!process.nextTick && !process.browser
|
|
1218
|
+
return typeof process !== "undefined" && !!process.nextTick && !process.browser;
|
|
1219
1219
|
}
|
|
1220
1220
|
|
|
1221
1221
|
// src/compiler/debug.ts
|
|
@@ -44606,11 +44606,7 @@ function createTypeChecker(host) {
|
|
|
44606
44606
|
}
|
|
44607
44607
|
});
|
|
44608
44608
|
function addDeclarationDiagnostic(id, message2) {
|
|
44609
|
-
return (declaration) =>
|
|
44610
|
-
if (!isTypeDeclaration(declaration) && declaration.kind !== 263 /* ClassDeclaration */ && declaration.kind !== 267 /* ModuleDeclaration */) {
|
|
44611
|
-
diagnostics.add(createDiagnosticForNode(declaration, message2, id));
|
|
44612
|
-
}
|
|
44613
|
-
};
|
|
44609
|
+
return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id));
|
|
44614
44610
|
}
|
|
44615
44611
|
}
|
|
44616
44612
|
function getSymbolLinks(symbol) {
|
|
@@ -79468,7 +79464,6 @@ function createTypeChecker(host) {
|
|
|
79468
79464
|
case "symbol":
|
|
79469
79465
|
case "void":
|
|
79470
79466
|
case "object":
|
|
79471
|
-
case "undefined":
|
|
79472
79467
|
error(name, message, name.escapedText);
|
|
79473
79468
|
}
|
|
79474
79469
|
}
|
|
@@ -80529,9 +80524,6 @@ function createTypeChecker(host) {
|
|
|
80529
80524
|
registerForUnusedIdentifiersCheck(node);
|
|
80530
80525
|
}
|
|
80531
80526
|
}
|
|
80532
|
-
if (node.name.kind === 80 /* Identifier */) {
|
|
80533
|
-
checkTypeNameIsReserved(node.name, Diagnostics.Namespace_name_cannot_be_0);
|
|
80534
|
-
}
|
|
80535
80527
|
addLazyDiagnostic(checkModuleDeclarationDiagnostics);
|
|
80536
80528
|
function checkModuleDeclarationDiagnostics() {
|
|
80537
80529
|
var _a, _b;
|
|
@@ -82563,6 +82555,15 @@ function createTypeChecker(host) {
|
|
|
82563
82555
|
}
|
|
82564
82556
|
return false;
|
|
82565
82557
|
}
|
|
82558
|
+
function declaredParameterTypeContainsUndefined(parameter) {
|
|
82559
|
+
if (!parameter.type)
|
|
82560
|
+
return false;
|
|
82561
|
+
const type = getTypeFromTypeNode(parameter.type);
|
|
82562
|
+
return containsUndefinedType(type);
|
|
82563
|
+
}
|
|
82564
|
+
function requiresAddingImplicitUndefined(parameter) {
|
|
82565
|
+
return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter);
|
|
82566
|
+
}
|
|
82566
82567
|
function isRequiredInitializedParameter(parameter) {
|
|
82567
82568
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
82568
82569
|
}
|
|
@@ -82922,8 +82923,7 @@ function createTypeChecker(host) {
|
|
|
82922
82923
|
isTopLevelValueImportEqualsWithEntityName,
|
|
82923
82924
|
isDeclarationVisible,
|
|
82924
82925
|
isImplementationOfOverload,
|
|
82925
|
-
|
|
82926
|
-
isOptionalUninitializedParameterProperty,
|
|
82926
|
+
requiresAddingImplicitUndefined,
|
|
82927
82927
|
isExpandoFunctionDeclaration,
|
|
82928
82928
|
getPropertiesOfContainerFunction,
|
|
82929
82929
|
createTypeOfDeclaration,
|
|
@@ -108481,38 +108481,41 @@ function transformDeclarations(context) {
|
|
|
108481
108481
|
if (shouldPrintWithInitializer(node)) {
|
|
108482
108482
|
return;
|
|
108483
108483
|
}
|
|
108484
|
-
const
|
|
108485
|
-
if (type && !
|
|
108484
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
108485
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
108486
108486
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
108487
108487
|
}
|
|
108488
|
-
if (!getParseTreeNode(node)) {
|
|
108489
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108490
|
-
}
|
|
108491
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
108492
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108493
|
-
}
|
|
108494
108488
|
errorNameNode = node.name;
|
|
108495
108489
|
let oldDiag;
|
|
108496
108490
|
if (!suppressNewDiagnosticContexts) {
|
|
108497
108491
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
108498
108492
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
108499
108493
|
}
|
|
108500
|
-
|
|
108501
|
-
|
|
108502
|
-
|
|
108503
|
-
|
|
108504
|
-
|
|
108505
|
-
|
|
108506
|
-
|
|
108494
|
+
let typeNode;
|
|
108495
|
+
switch (node.kind) {
|
|
108496
|
+
case 169 /* Parameter */:
|
|
108497
|
+
case 171 /* PropertySignature */:
|
|
108498
|
+
case 172 /* PropertyDeclaration */:
|
|
108499
|
+
case 208 /* BindingElement */:
|
|
108500
|
+
case 260 /* VariableDeclaration */:
|
|
108501
|
+
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldAddImplicitUndefined);
|
|
108502
|
+
break;
|
|
108503
|
+
case 262 /* FunctionDeclaration */:
|
|
108504
|
+
case 180 /* ConstructSignature */:
|
|
108505
|
+
case 173 /* MethodSignature */:
|
|
108506
|
+
case 174 /* MethodDeclaration */:
|
|
108507
|
+
case 177 /* GetAccessor */:
|
|
108508
|
+
case 179 /* CallSignature */:
|
|
108509
|
+
typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
|
|
108510
|
+
break;
|
|
108511
|
+
default:
|
|
108512
|
+
Debug.assertNever(node);
|
|
108507
108513
|
}
|
|
108508
|
-
|
|
108509
|
-
|
|
108510
|
-
|
|
108511
|
-
if (!suppressNewDiagnosticContexts) {
|
|
108512
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
108513
|
-
}
|
|
108514
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108514
|
+
errorNameNode = void 0;
|
|
108515
|
+
if (!suppressNewDiagnosticContexts) {
|
|
108516
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
108515
108517
|
}
|
|
108518
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108516
108519
|
}
|
|
108517
108520
|
function isDeclarationAndNotVisible(node) {
|
|
108518
108521
|
node = getParseTreeNode(node);
|
|
@@ -110705,8 +110708,7 @@ var notImplementedResolver = {
|
|
|
110705
110708
|
isLateBound: (_node) => false,
|
|
110706
110709
|
collectLinkedAliases: notImplemented,
|
|
110707
110710
|
isImplementationOfOverload: notImplemented,
|
|
110708
|
-
|
|
110709
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
110711
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
110710
110712
|
isExpandoFunctionDeclaration: notImplemented,
|
|
110711
110713
|
getPropertiesOfContainerFunction: notImplemented,
|
|
110712
110714
|
createTypeOfDeclaration: notImplemented,
|
package/lib/tsserver.js
CHANGED
|
@@ -3936,7 +3936,7 @@ function skipWhile(array, predicate) {
|
|
|
3936
3936
|
}
|
|
3937
3937
|
}
|
|
3938
3938
|
function isNodeLikeSystem() {
|
|
3939
|
-
return typeof process !== "undefined" && !!process.nextTick && !process.browser
|
|
3939
|
+
return typeof process !== "undefined" && !!process.nextTick && !process.browser;
|
|
3940
3940
|
}
|
|
3941
3941
|
|
|
3942
3942
|
// src/compiler/debug.ts
|
|
@@ -49325,11 +49325,7 @@ function createTypeChecker(host) {
|
|
|
49325
49325
|
}
|
|
49326
49326
|
});
|
|
49327
49327
|
function addDeclarationDiagnostic(id, message2) {
|
|
49328
|
-
return (declaration) =>
|
|
49329
|
-
if (!isTypeDeclaration(declaration) && declaration.kind !== 263 /* ClassDeclaration */ && declaration.kind !== 267 /* ModuleDeclaration */) {
|
|
49330
|
-
diagnostics.add(createDiagnosticForNode(declaration, message2, id));
|
|
49331
|
-
}
|
|
49332
|
-
};
|
|
49328
|
+
return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id));
|
|
49333
49329
|
}
|
|
49334
49330
|
}
|
|
49335
49331
|
function getSymbolLinks(symbol) {
|
|
@@ -84187,7 +84183,6 @@ function createTypeChecker(host) {
|
|
|
84187
84183
|
case "symbol":
|
|
84188
84184
|
case "void":
|
|
84189
84185
|
case "object":
|
|
84190
|
-
case "undefined":
|
|
84191
84186
|
error2(name, message, name.escapedText);
|
|
84192
84187
|
}
|
|
84193
84188
|
}
|
|
@@ -85248,9 +85243,6 @@ function createTypeChecker(host) {
|
|
|
85248
85243
|
registerForUnusedIdentifiersCheck(node);
|
|
85249
85244
|
}
|
|
85250
85245
|
}
|
|
85251
|
-
if (node.name.kind === 80 /* Identifier */) {
|
|
85252
|
-
checkTypeNameIsReserved(node.name, Diagnostics.Namespace_name_cannot_be_0);
|
|
85253
|
-
}
|
|
85254
85246
|
addLazyDiagnostic(checkModuleDeclarationDiagnostics);
|
|
85255
85247
|
function checkModuleDeclarationDiagnostics() {
|
|
85256
85248
|
var _a, _b;
|
|
@@ -87282,6 +87274,15 @@ function createTypeChecker(host) {
|
|
|
87282
87274
|
}
|
|
87283
87275
|
return false;
|
|
87284
87276
|
}
|
|
87277
|
+
function declaredParameterTypeContainsUndefined(parameter) {
|
|
87278
|
+
if (!parameter.type)
|
|
87279
|
+
return false;
|
|
87280
|
+
const type = getTypeFromTypeNode(parameter.type);
|
|
87281
|
+
return containsUndefinedType(type);
|
|
87282
|
+
}
|
|
87283
|
+
function requiresAddingImplicitUndefined(parameter) {
|
|
87284
|
+
return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter);
|
|
87285
|
+
}
|
|
87285
87286
|
function isRequiredInitializedParameter(parameter) {
|
|
87286
87287
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
87287
87288
|
}
|
|
@@ -87641,8 +87642,7 @@ function createTypeChecker(host) {
|
|
|
87641
87642
|
isTopLevelValueImportEqualsWithEntityName,
|
|
87642
87643
|
isDeclarationVisible,
|
|
87643
87644
|
isImplementationOfOverload,
|
|
87644
|
-
|
|
87645
|
-
isOptionalUninitializedParameterProperty,
|
|
87645
|
+
requiresAddingImplicitUndefined,
|
|
87646
87646
|
isExpandoFunctionDeclaration,
|
|
87647
87647
|
getPropertiesOfContainerFunction,
|
|
87648
87648
|
createTypeOfDeclaration,
|
|
@@ -113387,38 +113387,41 @@ function transformDeclarations(context) {
|
|
|
113387
113387
|
if (shouldPrintWithInitializer(node)) {
|
|
113388
113388
|
return;
|
|
113389
113389
|
}
|
|
113390
|
-
const
|
|
113391
|
-
if (type && !
|
|
113390
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
113391
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
113392
113392
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
113393
113393
|
}
|
|
113394
|
-
if (!getParseTreeNode(node)) {
|
|
113395
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113396
|
-
}
|
|
113397
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
113398
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113399
|
-
}
|
|
113400
113394
|
errorNameNode = node.name;
|
|
113401
113395
|
let oldDiag;
|
|
113402
113396
|
if (!suppressNewDiagnosticContexts) {
|
|
113403
113397
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
113404
113398
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
113405
113399
|
}
|
|
113406
|
-
|
|
113407
|
-
|
|
113408
|
-
|
|
113409
|
-
|
|
113410
|
-
|
|
113411
|
-
|
|
113412
|
-
|
|
113400
|
+
let typeNode;
|
|
113401
|
+
switch (node.kind) {
|
|
113402
|
+
case 169 /* Parameter */:
|
|
113403
|
+
case 171 /* PropertySignature */:
|
|
113404
|
+
case 172 /* PropertyDeclaration */:
|
|
113405
|
+
case 208 /* BindingElement */:
|
|
113406
|
+
case 260 /* VariableDeclaration */:
|
|
113407
|
+
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldAddImplicitUndefined);
|
|
113408
|
+
break;
|
|
113409
|
+
case 262 /* FunctionDeclaration */:
|
|
113410
|
+
case 180 /* ConstructSignature */:
|
|
113411
|
+
case 173 /* MethodSignature */:
|
|
113412
|
+
case 174 /* MethodDeclaration */:
|
|
113413
|
+
case 177 /* GetAccessor */:
|
|
113414
|
+
case 179 /* CallSignature */:
|
|
113415
|
+
typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
|
|
113416
|
+
break;
|
|
113417
|
+
default:
|
|
113418
|
+
Debug.assertNever(node);
|
|
113413
113419
|
}
|
|
113414
|
-
|
|
113415
|
-
|
|
113416
|
-
|
|
113417
|
-
if (!suppressNewDiagnosticContexts) {
|
|
113418
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113419
|
-
}
|
|
113420
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113420
|
+
errorNameNode = void 0;
|
|
113421
|
+
if (!suppressNewDiagnosticContexts) {
|
|
113422
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113421
113423
|
}
|
|
113424
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113422
113425
|
}
|
|
113423
113426
|
function isDeclarationAndNotVisible(node) {
|
|
113424
113427
|
node = getParseTreeNode(node);
|
|
@@ -115622,8 +115625,7 @@ var notImplementedResolver = {
|
|
|
115622
115625
|
isLateBound: (_node) => false,
|
|
115623
115626
|
collectLinkedAliases: notImplemented,
|
|
115624
115627
|
isImplementationOfOverload: notImplemented,
|
|
115625
|
-
|
|
115626
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
115628
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
115627
115629
|
isExpandoFunctionDeclaration: notImplemented,
|
|
115628
115630
|
getPropertiesOfContainerFunction: notImplemented,
|
|
115629
115631
|
createTypeOfDeclaration: notImplemented,
|