@typescript-deploys/pr-build 5.5.0-pr-57133-18 → 5.5.0-pr-57133-22
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 +36 -26
- package/lib/tsserver.js +36 -26
- package/lib/typescript.js +37 -27
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -82555,6 +82555,15 @@ function createTypeChecker(host) {
|
|
|
82555
82555
|
}
|
|
82556
82556
|
return false;
|
|
82557
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
|
+
}
|
|
82558
82567
|
function isRequiredInitializedParameter(parameter) {
|
|
82559
82568
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
82560
82569
|
}
|
|
@@ -82914,8 +82923,7 @@ function createTypeChecker(host) {
|
|
|
82914
82923
|
isTopLevelValueImportEqualsWithEntityName,
|
|
82915
82924
|
isDeclarationVisible,
|
|
82916
82925
|
isImplementationOfOverload,
|
|
82917
|
-
|
|
82918
|
-
isOptionalUninitializedParameterProperty,
|
|
82926
|
+
requiresAddingImplicitUndefined,
|
|
82919
82927
|
isExpandoFunctionDeclaration,
|
|
82920
82928
|
getPropertiesOfContainerFunction,
|
|
82921
82929
|
createTypeOfDeclaration,
|
|
@@ -108473,38 +108481,41 @@ function transformDeclarations(context) {
|
|
|
108473
108481
|
if (shouldPrintWithInitializer(node)) {
|
|
108474
108482
|
return;
|
|
108475
108483
|
}
|
|
108476
|
-
const
|
|
108477
|
-
if (type && !
|
|
108484
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
108485
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
108478
108486
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
108479
108487
|
}
|
|
108480
|
-
if (!getParseTreeNode(node)) {
|
|
108481
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108482
|
-
}
|
|
108483
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
108484
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108485
|
-
}
|
|
108486
108488
|
errorNameNode = node.name;
|
|
108487
108489
|
let oldDiag;
|
|
108488
108490
|
if (!suppressNewDiagnosticContexts) {
|
|
108489
108491
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
108490
108492
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
108491
108493
|
}
|
|
108492
|
-
|
|
108493
|
-
|
|
108494
|
-
|
|
108495
|
-
|
|
108496
|
-
|
|
108497
|
-
|
|
108498
|
-
|
|
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);
|
|
108499
108513
|
}
|
|
108500
|
-
|
|
108501
|
-
|
|
108502
|
-
|
|
108503
|
-
if (!suppressNewDiagnosticContexts) {
|
|
108504
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
108505
|
-
}
|
|
108506
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108514
|
+
errorNameNode = void 0;
|
|
108515
|
+
if (!suppressNewDiagnosticContexts) {
|
|
108516
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
108507
108517
|
}
|
|
108518
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108508
108519
|
}
|
|
108509
108520
|
function isDeclarationAndNotVisible(node) {
|
|
108510
108521
|
node = getParseTreeNode(node);
|
|
@@ -110697,8 +110708,7 @@ var notImplementedResolver = {
|
|
|
110697
110708
|
isLateBound: (_node) => false,
|
|
110698
110709
|
collectLinkedAliases: notImplemented,
|
|
110699
110710
|
isImplementationOfOverload: notImplemented,
|
|
110700
|
-
|
|
110701
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
110711
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
110702
110712
|
isExpandoFunctionDeclaration: notImplemented,
|
|
110703
110713
|
getPropertiesOfContainerFunction: notImplemented,
|
|
110704
110714
|
createTypeOfDeclaration: notImplemented,
|
package/lib/tsserver.js
CHANGED
|
@@ -87274,6 +87274,15 @@ function createTypeChecker(host) {
|
|
|
87274
87274
|
}
|
|
87275
87275
|
return false;
|
|
87276
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
|
+
}
|
|
87277
87286
|
function isRequiredInitializedParameter(parameter) {
|
|
87278
87287
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
87279
87288
|
}
|
|
@@ -87633,8 +87642,7 @@ function createTypeChecker(host) {
|
|
|
87633
87642
|
isTopLevelValueImportEqualsWithEntityName,
|
|
87634
87643
|
isDeclarationVisible,
|
|
87635
87644
|
isImplementationOfOverload,
|
|
87636
|
-
|
|
87637
|
-
isOptionalUninitializedParameterProperty,
|
|
87645
|
+
requiresAddingImplicitUndefined,
|
|
87638
87646
|
isExpandoFunctionDeclaration,
|
|
87639
87647
|
getPropertiesOfContainerFunction,
|
|
87640
87648
|
createTypeOfDeclaration,
|
|
@@ -113379,38 +113387,41 @@ function transformDeclarations(context) {
|
|
|
113379
113387
|
if (shouldPrintWithInitializer(node)) {
|
|
113380
113388
|
return;
|
|
113381
113389
|
}
|
|
113382
|
-
const
|
|
113383
|
-
if (type && !
|
|
113390
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
113391
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
113384
113392
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
113385
113393
|
}
|
|
113386
|
-
if (!getParseTreeNode(node)) {
|
|
113387
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113388
|
-
}
|
|
113389
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
113390
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113391
|
-
}
|
|
113392
113394
|
errorNameNode = node.name;
|
|
113393
113395
|
let oldDiag;
|
|
113394
113396
|
if (!suppressNewDiagnosticContexts) {
|
|
113395
113397
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
113396
113398
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
113397
113399
|
}
|
|
113398
|
-
|
|
113399
|
-
|
|
113400
|
-
|
|
113401
|
-
|
|
113402
|
-
|
|
113403
|
-
|
|
113404
|
-
|
|
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);
|
|
113405
113419
|
}
|
|
113406
|
-
|
|
113407
|
-
|
|
113408
|
-
|
|
113409
|
-
if (!suppressNewDiagnosticContexts) {
|
|
113410
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113411
|
-
}
|
|
113412
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113420
|
+
errorNameNode = void 0;
|
|
113421
|
+
if (!suppressNewDiagnosticContexts) {
|
|
113422
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113413
113423
|
}
|
|
113424
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113414
113425
|
}
|
|
113415
113426
|
function isDeclarationAndNotVisible(node) {
|
|
113416
113427
|
node = getParseTreeNode(node);
|
|
@@ -115614,8 +115625,7 @@ var notImplementedResolver = {
|
|
|
115614
115625
|
isLateBound: (_node) => false,
|
|
115615
115626
|
collectLinkedAliases: notImplemented,
|
|
115616
115627
|
isImplementationOfOverload: notImplemented,
|
|
115617
|
-
|
|
115618
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
115628
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
115619
115629
|
isExpandoFunctionDeclaration: notImplemented,
|
|
115620
115630
|
getPropertiesOfContainerFunction: notImplemented,
|
|
115621
115631
|
createTypeOfDeclaration: notImplemented,
|
package/lib/typescript.js
CHANGED
|
@@ -87274,6 +87274,15 @@ function createTypeChecker(host) {
|
|
|
87274
87274
|
}
|
|
87275
87275
|
return false;
|
|
87276
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
|
+
}
|
|
87277
87286
|
function isRequiredInitializedParameter(parameter) {
|
|
87278
87287
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
87279
87288
|
}
|
|
@@ -87633,8 +87642,7 @@ function createTypeChecker(host) {
|
|
|
87633
87642
|
isTopLevelValueImportEqualsWithEntityName,
|
|
87634
87643
|
isDeclarationVisible,
|
|
87635
87644
|
isImplementationOfOverload,
|
|
87636
|
-
|
|
87637
|
-
isOptionalUninitializedParameterProperty,
|
|
87645
|
+
requiresAddingImplicitUndefined,
|
|
87638
87646
|
isExpandoFunctionDeclaration,
|
|
87639
87647
|
getPropertiesOfContainerFunction,
|
|
87640
87648
|
createTypeOfDeclaration,
|
|
@@ -113379,38 +113387,41 @@ function transformDeclarations(context) {
|
|
|
113379
113387
|
if (shouldPrintWithInitializer(node)) {
|
|
113380
113388
|
return;
|
|
113381
113389
|
}
|
|
113382
|
-
const
|
|
113383
|
-
if (type && !
|
|
113390
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
113391
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
113384
113392
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
113385
113393
|
}
|
|
113386
|
-
if (!getParseTreeNode(node)) {
|
|
113387
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113388
|
-
}
|
|
113389
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
113390
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113391
|
-
}
|
|
113392
113394
|
errorNameNode = node.name;
|
|
113393
113395
|
let oldDiag;
|
|
113394
113396
|
if (!suppressNewDiagnosticContexts) {
|
|
113395
113397
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
113396
113398
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
113397
113399
|
}
|
|
113398
|
-
|
|
113399
|
-
|
|
113400
|
-
|
|
113401
|
-
|
|
113402
|
-
|
|
113403
|
-
|
|
113404
|
-
|
|
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);
|
|
113405
113419
|
}
|
|
113406
|
-
|
|
113407
|
-
|
|
113408
|
-
|
|
113409
|
-
if (!suppressNewDiagnosticContexts) {
|
|
113410
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113411
|
-
}
|
|
113412
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113420
|
+
errorNameNode = void 0;
|
|
113421
|
+
if (!suppressNewDiagnosticContexts) {
|
|
113422
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113413
113423
|
}
|
|
113424
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113414
113425
|
}
|
|
113415
113426
|
function isDeclarationAndNotVisible(node) {
|
|
113416
113427
|
node = getParseTreeNode(node);
|
|
@@ -115614,8 +115625,7 @@ var notImplementedResolver = {
|
|
|
115614
115625
|
isLateBound: (_node) => false,
|
|
115615
115626
|
collectLinkedAliases: notImplemented,
|
|
115616
115627
|
isImplementationOfOverload: notImplemented,
|
|
115617
|
-
|
|
115618
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
115628
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
115619
115629
|
isExpandoFunctionDeclaration: notImplemented,
|
|
115620
115630
|
getPropertiesOfContainerFunction: notImplemented,
|
|
115621
115631
|
createTypeOfDeclaration: notImplemented,
|
|
@@ -189679,5 +189689,5 @@ if (typeof console !== "undefined") {
|
|
|
189679
189689
|
writeFileEnsuringDirectories,
|
|
189680
189690
|
zipWith
|
|
189681
189691
|
});
|
|
189682
|
-
})(typeof module !== "undefined" && module.exports ? module : { exports: ts });
|
|
189692
|
+
})(typeof module !== "undefined" && module.exports ? (ts = module.exports, module) : { exports: ts });
|
|
189683
189693
|
//# sourceMappingURL=typescript.js.map
|
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.5.0-pr-57133-
|
|
5
|
+
"version": "5.5.0-pr-57133-22",
|
|
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": "248b26b904ffcf51d2433551c5bc519932226d88"
|
|
118
118
|
}
|