@typescript-deploys/pr-build 5.3.0-pr-55991-50 → 5.3.0-pr-56020-20
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 +57 -14
- package/lib/tsserver.js +57 -14
- package/lib/typescript.js +57 -14
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20231009`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -13637,6 +13637,7 @@ function tryGetModuleSpecifierFromDeclaration(node) {
|
|
|
13637
13637
|
true
|
|
13638
13638
|
))) == null ? void 0 : _a.arguments[0];
|
|
13639
13639
|
case 272 /* ImportDeclaration */:
|
|
13640
|
+
case 278 /* ExportDeclaration */:
|
|
13640
13641
|
return tryCast(node.moduleSpecifier, isStringLiteralLike);
|
|
13641
13642
|
case 271 /* ImportEqualsDeclaration */:
|
|
13642
13643
|
return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);
|
|
@@ -13648,6 +13649,8 @@ function tryGetModuleSpecifierFromDeclaration(node) {
|
|
|
13648
13649
|
return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike);
|
|
13649
13650
|
case 276 /* ImportSpecifier */:
|
|
13650
13651
|
return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike);
|
|
13652
|
+
case 205 /* ImportType */:
|
|
13653
|
+
return isLiteralImportTypeNode(node) ? node.argument.literal : void 0;
|
|
13651
13654
|
default:
|
|
13652
13655
|
Debug.assertNever(node);
|
|
13653
13656
|
}
|
|
@@ -65732,7 +65735,7 @@ function createTypeChecker(host) {
|
|
|
65732
65735
|
return createFlowType(narrowedType, isIncomplete(flowType));
|
|
65733
65736
|
}
|
|
65734
65737
|
function getTypeAtSwitchClause(flow) {
|
|
65735
|
-
const expr = flow.switchStatement.expression;
|
|
65738
|
+
const expr = skipParentheses(flow.switchStatement.expression);
|
|
65736
65739
|
const flowType = getTypeAtFlowNode(flow.antecedent);
|
|
65737
65740
|
let type = getTypeFromFlowType(flowType);
|
|
65738
65741
|
if (isMatchingReference(reference, expr)) {
|
|
@@ -66289,8 +66292,8 @@ function createTypeChecker(host) {
|
|
|
66289
66292
|
function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) {
|
|
66290
66293
|
const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);
|
|
66291
66294
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
66292
|
-
|
|
66293
|
-
|
|
66295
|
+
for (let i = 0; i < clauseStart; i++) {
|
|
66296
|
+
const clause = switchStatement.caseBlock.clauses[i];
|
|
66294
66297
|
if (clause.kind === 296 /* CaseClause */) {
|
|
66295
66298
|
type = narrowType(
|
|
66296
66299
|
type,
|
|
@@ -66301,8 +66304,8 @@ function createTypeChecker(host) {
|
|
|
66301
66304
|
}
|
|
66302
66305
|
}
|
|
66303
66306
|
if (hasDefaultClause) {
|
|
66304
|
-
|
|
66305
|
-
|
|
66307
|
+
for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) {
|
|
66308
|
+
const clause = switchStatement.caseBlock.clauses[i];
|
|
66306
66309
|
if (clause.kind === 296 /* CaseClause */) {
|
|
66307
66310
|
type = narrowType(
|
|
66308
66311
|
type,
|
|
@@ -66315,9 +66318,6 @@ function createTypeChecker(host) {
|
|
|
66315
66318
|
return type;
|
|
66316
66319
|
}
|
|
66317
66320
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
66318
|
-
return narrowTypeForTrueClauses(type, clauses);
|
|
66319
|
-
}
|
|
66320
|
-
function narrowTypeForTrueClauses(type, clauses) {
|
|
66321
66321
|
return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(
|
|
66322
66322
|
type,
|
|
66323
66323
|
clause.expression,
|
|
@@ -73351,8 +73351,20 @@ function createTypeChecker(host) {
|
|
|
73351
73351
|
let hasReturnWithNoExpression = functionHasImplicitReturn(func);
|
|
73352
73352
|
let hasReturnOfTypeNever = false;
|
|
73353
73353
|
forEachReturnStatement(func.body, (returnStatement) => {
|
|
73354
|
-
|
|
73354
|
+
let expr = returnStatement.expression;
|
|
73355
73355
|
if (expr) {
|
|
73356
|
+
expr = skipParentheses(
|
|
73357
|
+
expr,
|
|
73358
|
+
/*excludeJSDocTypeAssertions*/
|
|
73359
|
+
true
|
|
73360
|
+
);
|
|
73361
|
+
if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) {
|
|
73362
|
+
expr = skipParentheses(
|
|
73363
|
+
expr.expression,
|
|
73364
|
+
/*excludeJSDocTypeAssertions*/
|
|
73365
|
+
true
|
|
73366
|
+
);
|
|
73367
|
+
}
|
|
73356
73368
|
if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) {
|
|
73357
73369
|
hasReturnOfTypeNever = true;
|
|
73358
73370
|
return;
|
|
@@ -82329,7 +82341,16 @@ function createTypeChecker(host) {
|
|
|
82329
82341
|
}
|
|
82330
82342
|
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled);
|
|
82331
82343
|
},
|
|
82332
|
-
isImportRequiredByAugmentation
|
|
82344
|
+
isImportRequiredByAugmentation,
|
|
82345
|
+
tryFindAmbientModule: (moduleReferenceExpression) => {
|
|
82346
|
+
const node = getParseTreeNode(moduleReferenceExpression);
|
|
82347
|
+
const moduleSpecifier = node && isStringLiteralLike(node) ? node.text : void 0;
|
|
82348
|
+
return moduleSpecifier !== void 0 ? tryFindAmbientModule(
|
|
82349
|
+
moduleSpecifier,
|
|
82350
|
+
/*withAugmentations*/
|
|
82351
|
+
true
|
|
82352
|
+
) : void 0;
|
|
82353
|
+
}
|
|
82333
82354
|
};
|
|
82334
82355
|
function isImportRequiredByAugmentation(node) {
|
|
82335
82356
|
const file = getSourceFileOfNode(node);
|
|
@@ -107089,6 +107110,17 @@ function transformDeclarations(context) {
|
|
|
107089
107110
|
const container = getSourceFileOfNode(node);
|
|
107090
107111
|
refs.set(getOriginalNodeId(container), container);
|
|
107091
107112
|
}
|
|
107113
|
+
function trackReferencedAmbientModuleFromImport(node) {
|
|
107114
|
+
const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(node);
|
|
107115
|
+
const symbol = moduleSpecifier && resolver.tryFindAmbientModule(moduleSpecifier);
|
|
107116
|
+
if (symbol == null ? void 0 : symbol.declarations) {
|
|
107117
|
+
for (const decl of symbol.declarations) {
|
|
107118
|
+
if (isAmbientModule(decl) && getSourceFileOfNode(decl) !== currentSourceFile) {
|
|
107119
|
+
trackReferencedAmbientModule(decl, symbol);
|
|
107120
|
+
}
|
|
107121
|
+
}
|
|
107122
|
+
}
|
|
107123
|
+
}
|
|
107092
107124
|
function handleSymbolAccessibilityError(symbolAccessibilityResult) {
|
|
107093
107125
|
if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) {
|
|
107094
107126
|
if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) {
|
|
@@ -108036,6 +108068,7 @@ function transformDeclarations(context) {
|
|
|
108036
108068
|
case 205 /* ImportType */: {
|
|
108037
108069
|
if (!isLiteralImportTypeNode(input))
|
|
108038
108070
|
return cleanup(input);
|
|
108071
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
108039
108072
|
return cleanup(factory2.updateImportTypeNode(
|
|
108040
108073
|
input,
|
|
108041
108074
|
factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
|
|
@@ -108087,6 +108120,7 @@ function transformDeclarations(context) {
|
|
|
108087
108120
|
resultHasExternalModuleIndicator = true;
|
|
108088
108121
|
}
|
|
108089
108122
|
resultHasScopeMarker = true;
|
|
108123
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
108090
108124
|
return factory2.updateExportDeclaration(
|
|
108091
108125
|
input,
|
|
108092
108126
|
input.modifiers,
|
|
@@ -108161,10 +108195,18 @@ function transformDeclarations(context) {
|
|
|
108161
108195
|
return;
|
|
108162
108196
|
switch (input.kind) {
|
|
108163
108197
|
case 271 /* ImportEqualsDeclaration */: {
|
|
108164
|
-
|
|
108198
|
+
const transformed = transformImportEqualsDeclaration(input);
|
|
108199
|
+
if (transformed) {
|
|
108200
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
108201
|
+
}
|
|
108202
|
+
return transformed;
|
|
108165
108203
|
}
|
|
108166
108204
|
case 272 /* ImportDeclaration */: {
|
|
108167
|
-
|
|
108205
|
+
const transformed = transformImportDeclaration(input);
|
|
108206
|
+
if (transformed) {
|
|
108207
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
108208
|
+
}
|
|
108209
|
+
return transformed;
|
|
108168
108210
|
}
|
|
108169
108211
|
}
|
|
108170
108212
|
if (isDeclaration(input) && isDeclarationAndNotVisible(input))
|
|
@@ -109767,7 +109809,8 @@ var notImplementedResolver = {
|
|
|
109767
109809
|
getSymbolOfExternalModuleSpecifier: notImplemented,
|
|
109768
109810
|
isBindingCapturedByNode: notImplemented,
|
|
109769
109811
|
getDeclarationStatementsForSourceFile: notImplemented,
|
|
109770
|
-
isImportRequiredByAugmentation: notImplemented
|
|
109812
|
+
isImportRequiredByAugmentation: notImplemented,
|
|
109813
|
+
tryFindAmbientModule: notImplemented
|
|
109771
109814
|
};
|
|
109772
109815
|
function createSourceFilesFromBundleBuildInfo(bundle, buildInfoDirectory, host) {
|
|
109773
109816
|
var _a;
|
package/lib/tsserver.js
CHANGED
|
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/compiler/corePublic.ts
|
|
2330
2330
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-insiders.20231009`;
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -17481,6 +17481,7 @@ function tryGetModuleSpecifierFromDeclaration(node) {
|
|
|
17481
17481
|
true
|
|
17482
17482
|
))) == null ? void 0 : _a.arguments[0];
|
|
17483
17483
|
case 272 /* ImportDeclaration */:
|
|
17484
|
+
case 278 /* ExportDeclaration */:
|
|
17484
17485
|
return tryCast(node.moduleSpecifier, isStringLiteralLike);
|
|
17485
17486
|
case 271 /* ImportEqualsDeclaration */:
|
|
17486
17487
|
return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);
|
|
@@ -17492,6 +17493,8 @@ function tryGetModuleSpecifierFromDeclaration(node) {
|
|
|
17492
17493
|
return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike);
|
|
17493
17494
|
case 276 /* ImportSpecifier */:
|
|
17494
17495
|
return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike);
|
|
17496
|
+
case 205 /* ImportType */:
|
|
17497
|
+
return isLiteralImportTypeNode(node) ? node.argument.literal : void 0;
|
|
17495
17498
|
default:
|
|
17496
17499
|
Debug.assertNever(node);
|
|
17497
17500
|
}
|
|
@@ -70444,7 +70447,7 @@ function createTypeChecker(host) {
|
|
|
70444
70447
|
return createFlowType(narrowedType, isIncomplete(flowType));
|
|
70445
70448
|
}
|
|
70446
70449
|
function getTypeAtSwitchClause(flow) {
|
|
70447
|
-
const expr = flow.switchStatement.expression;
|
|
70450
|
+
const expr = skipParentheses(flow.switchStatement.expression);
|
|
70448
70451
|
const flowType = getTypeAtFlowNode(flow.antecedent);
|
|
70449
70452
|
let type = getTypeFromFlowType(flowType);
|
|
70450
70453
|
if (isMatchingReference(reference, expr)) {
|
|
@@ -71001,8 +71004,8 @@ function createTypeChecker(host) {
|
|
|
71001
71004
|
function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) {
|
|
71002
71005
|
const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);
|
|
71003
71006
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
71004
|
-
|
|
71005
|
-
|
|
71007
|
+
for (let i = 0; i < clauseStart; i++) {
|
|
71008
|
+
const clause = switchStatement.caseBlock.clauses[i];
|
|
71006
71009
|
if (clause.kind === 296 /* CaseClause */) {
|
|
71007
71010
|
type = narrowType(
|
|
71008
71011
|
type,
|
|
@@ -71013,8 +71016,8 @@ function createTypeChecker(host) {
|
|
|
71013
71016
|
}
|
|
71014
71017
|
}
|
|
71015
71018
|
if (hasDefaultClause) {
|
|
71016
|
-
|
|
71017
|
-
|
|
71019
|
+
for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) {
|
|
71020
|
+
const clause = switchStatement.caseBlock.clauses[i];
|
|
71018
71021
|
if (clause.kind === 296 /* CaseClause */) {
|
|
71019
71022
|
type = narrowType(
|
|
71020
71023
|
type,
|
|
@@ -71027,9 +71030,6 @@ function createTypeChecker(host) {
|
|
|
71027
71030
|
return type;
|
|
71028
71031
|
}
|
|
71029
71032
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
71030
|
-
return narrowTypeForTrueClauses(type, clauses);
|
|
71031
|
-
}
|
|
71032
|
-
function narrowTypeForTrueClauses(type, clauses) {
|
|
71033
71033
|
return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(
|
|
71034
71034
|
type,
|
|
71035
71035
|
clause.expression,
|
|
@@ -78063,8 +78063,20 @@ function createTypeChecker(host) {
|
|
|
78063
78063
|
let hasReturnWithNoExpression = functionHasImplicitReturn(func);
|
|
78064
78064
|
let hasReturnOfTypeNever = false;
|
|
78065
78065
|
forEachReturnStatement(func.body, (returnStatement) => {
|
|
78066
|
-
|
|
78066
|
+
let expr = returnStatement.expression;
|
|
78067
78067
|
if (expr) {
|
|
78068
|
+
expr = skipParentheses(
|
|
78069
|
+
expr,
|
|
78070
|
+
/*excludeJSDocTypeAssertions*/
|
|
78071
|
+
true
|
|
78072
|
+
);
|
|
78073
|
+
if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) {
|
|
78074
|
+
expr = skipParentheses(
|
|
78075
|
+
expr.expression,
|
|
78076
|
+
/*excludeJSDocTypeAssertions*/
|
|
78077
|
+
true
|
|
78078
|
+
);
|
|
78079
|
+
}
|
|
78068
78080
|
if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) {
|
|
78069
78081
|
hasReturnOfTypeNever = true;
|
|
78070
78082
|
return;
|
|
@@ -87041,7 +87053,16 @@ function createTypeChecker(host) {
|
|
|
87041
87053
|
}
|
|
87042
87054
|
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled);
|
|
87043
87055
|
},
|
|
87044
|
-
isImportRequiredByAugmentation
|
|
87056
|
+
isImportRequiredByAugmentation,
|
|
87057
|
+
tryFindAmbientModule: (moduleReferenceExpression) => {
|
|
87058
|
+
const node = getParseTreeNode(moduleReferenceExpression);
|
|
87059
|
+
const moduleSpecifier = node && isStringLiteralLike(node) ? node.text : void 0;
|
|
87060
|
+
return moduleSpecifier !== void 0 ? tryFindAmbientModule(
|
|
87061
|
+
moduleSpecifier,
|
|
87062
|
+
/*withAugmentations*/
|
|
87063
|
+
true
|
|
87064
|
+
) : void 0;
|
|
87065
|
+
}
|
|
87045
87066
|
};
|
|
87046
87067
|
function isImportRequiredByAugmentation(node) {
|
|
87047
87068
|
const file = getSourceFileOfNode(node);
|
|
@@ -111972,6 +111993,17 @@ function transformDeclarations(context) {
|
|
|
111972
111993
|
const container = getSourceFileOfNode(node);
|
|
111973
111994
|
refs.set(getOriginalNodeId(container), container);
|
|
111974
111995
|
}
|
|
111996
|
+
function trackReferencedAmbientModuleFromImport(node) {
|
|
111997
|
+
const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(node);
|
|
111998
|
+
const symbol = moduleSpecifier && resolver.tryFindAmbientModule(moduleSpecifier);
|
|
111999
|
+
if (symbol == null ? void 0 : symbol.declarations) {
|
|
112000
|
+
for (const decl of symbol.declarations) {
|
|
112001
|
+
if (isAmbientModule(decl) && getSourceFileOfNode(decl) !== currentSourceFile) {
|
|
112002
|
+
trackReferencedAmbientModule(decl, symbol);
|
|
112003
|
+
}
|
|
112004
|
+
}
|
|
112005
|
+
}
|
|
112006
|
+
}
|
|
111975
112007
|
function handleSymbolAccessibilityError(symbolAccessibilityResult) {
|
|
111976
112008
|
if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) {
|
|
111977
112009
|
if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) {
|
|
@@ -112919,6 +112951,7 @@ function transformDeclarations(context) {
|
|
|
112919
112951
|
case 205 /* ImportType */: {
|
|
112920
112952
|
if (!isLiteralImportTypeNode(input))
|
|
112921
112953
|
return cleanup(input);
|
|
112954
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
112922
112955
|
return cleanup(factory2.updateImportTypeNode(
|
|
112923
112956
|
input,
|
|
112924
112957
|
factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
|
|
@@ -112970,6 +113003,7 @@ function transformDeclarations(context) {
|
|
|
112970
113003
|
resultHasExternalModuleIndicator = true;
|
|
112971
113004
|
}
|
|
112972
113005
|
resultHasScopeMarker = true;
|
|
113006
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
112973
113007
|
return factory2.updateExportDeclaration(
|
|
112974
113008
|
input,
|
|
112975
113009
|
input.modifiers,
|
|
@@ -113044,10 +113078,18 @@ function transformDeclarations(context) {
|
|
|
113044
113078
|
return;
|
|
113045
113079
|
switch (input.kind) {
|
|
113046
113080
|
case 271 /* ImportEqualsDeclaration */: {
|
|
113047
|
-
|
|
113081
|
+
const transformed = transformImportEqualsDeclaration(input);
|
|
113082
|
+
if (transformed) {
|
|
113083
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
113084
|
+
}
|
|
113085
|
+
return transformed;
|
|
113048
113086
|
}
|
|
113049
113087
|
case 272 /* ImportDeclaration */: {
|
|
113050
|
-
|
|
113088
|
+
const transformed = transformImportDeclaration(input);
|
|
113089
|
+
if (transformed) {
|
|
113090
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
113091
|
+
}
|
|
113092
|
+
return transformed;
|
|
113051
113093
|
}
|
|
113052
113094
|
}
|
|
113053
113095
|
if (isDeclaration(input) && isDeclarationAndNotVisible(input))
|
|
@@ -114661,7 +114703,8 @@ var notImplementedResolver = {
|
|
|
114661
114703
|
getSymbolOfExternalModuleSpecifier: notImplemented,
|
|
114662
114704
|
isBindingCapturedByNode: notImplemented,
|
|
114663
114705
|
getDeclarationStatementsForSourceFile: notImplemented,
|
|
114664
|
-
isImportRequiredByAugmentation: notImplemented
|
|
114706
|
+
isImportRequiredByAugmentation: notImplemented,
|
|
114707
|
+
tryFindAmbientModule: notImplemented
|
|
114665
114708
|
};
|
|
114666
114709
|
function createSourceFilesFromBundleBuildInfo(bundle, buildInfoDirectory, host) {
|
|
114667
114710
|
var _a;
|
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.20231009`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -14864,6 +14864,7 @@ ${lanes.join("\n")}
|
|
|
14864
14864
|
true
|
|
14865
14865
|
))) == null ? void 0 : _a.arguments[0];
|
|
14866
14866
|
case 272 /* ImportDeclaration */:
|
|
14867
|
+
case 278 /* ExportDeclaration */:
|
|
14867
14868
|
return tryCast(node.moduleSpecifier, isStringLiteralLike);
|
|
14868
14869
|
case 271 /* ImportEqualsDeclaration */:
|
|
14869
14870
|
return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);
|
|
@@ -14875,6 +14876,8 @@ ${lanes.join("\n")}
|
|
|
14875
14876
|
return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike);
|
|
14876
14877
|
case 276 /* ImportSpecifier */:
|
|
14877
14878
|
return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike);
|
|
14879
|
+
case 205 /* ImportType */:
|
|
14880
|
+
return isLiteralImportTypeNode(node) ? node.argument.literal : void 0;
|
|
14878
14881
|
default:
|
|
14879
14882
|
Debug.assertNever(node);
|
|
14880
14883
|
}
|
|
@@ -68211,7 +68214,7 @@ ${lanes.join("\n")}
|
|
|
68211
68214
|
return createFlowType(narrowedType, isIncomplete(flowType));
|
|
68212
68215
|
}
|
|
68213
68216
|
function getTypeAtSwitchClause(flow) {
|
|
68214
|
-
const expr = flow.switchStatement.expression;
|
|
68217
|
+
const expr = skipParentheses(flow.switchStatement.expression);
|
|
68215
68218
|
const flowType = getTypeAtFlowNode(flow.antecedent);
|
|
68216
68219
|
let type = getTypeFromFlowType(flowType);
|
|
68217
68220
|
if (isMatchingReference(reference, expr)) {
|
|
@@ -68768,8 +68771,8 @@ ${lanes.join("\n")}
|
|
|
68768
68771
|
function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) {
|
|
68769
68772
|
const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);
|
|
68770
68773
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
68771
|
-
|
|
68772
|
-
|
|
68774
|
+
for (let i = 0; i < clauseStart; i++) {
|
|
68775
|
+
const clause = switchStatement.caseBlock.clauses[i];
|
|
68773
68776
|
if (clause.kind === 296 /* CaseClause */) {
|
|
68774
68777
|
type = narrowType(
|
|
68775
68778
|
type,
|
|
@@ -68780,8 +68783,8 @@ ${lanes.join("\n")}
|
|
|
68780
68783
|
}
|
|
68781
68784
|
}
|
|
68782
68785
|
if (hasDefaultClause) {
|
|
68783
|
-
|
|
68784
|
-
|
|
68786
|
+
for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) {
|
|
68787
|
+
const clause = switchStatement.caseBlock.clauses[i];
|
|
68785
68788
|
if (clause.kind === 296 /* CaseClause */) {
|
|
68786
68789
|
type = narrowType(
|
|
68787
68790
|
type,
|
|
@@ -68794,9 +68797,6 @@ ${lanes.join("\n")}
|
|
|
68794
68797
|
return type;
|
|
68795
68798
|
}
|
|
68796
68799
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
68797
|
-
return narrowTypeForTrueClauses(type, clauses);
|
|
68798
|
-
}
|
|
68799
|
-
function narrowTypeForTrueClauses(type, clauses) {
|
|
68800
68800
|
return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(
|
|
68801
68801
|
type,
|
|
68802
68802
|
clause.expression,
|
|
@@ -75830,8 +75830,20 @@ ${lanes.join("\n")}
|
|
|
75830
75830
|
let hasReturnWithNoExpression = functionHasImplicitReturn(func);
|
|
75831
75831
|
let hasReturnOfTypeNever = false;
|
|
75832
75832
|
forEachReturnStatement(func.body, (returnStatement) => {
|
|
75833
|
-
|
|
75833
|
+
let expr = returnStatement.expression;
|
|
75834
75834
|
if (expr) {
|
|
75835
|
+
expr = skipParentheses(
|
|
75836
|
+
expr,
|
|
75837
|
+
/*excludeJSDocTypeAssertions*/
|
|
75838
|
+
true
|
|
75839
|
+
);
|
|
75840
|
+
if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) {
|
|
75841
|
+
expr = skipParentheses(
|
|
75842
|
+
expr.expression,
|
|
75843
|
+
/*excludeJSDocTypeAssertions*/
|
|
75844
|
+
true
|
|
75845
|
+
);
|
|
75846
|
+
}
|
|
75835
75847
|
if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) {
|
|
75836
75848
|
hasReturnOfTypeNever = true;
|
|
75837
75849
|
return;
|
|
@@ -84808,7 +84820,16 @@ ${lanes.join("\n")}
|
|
|
84808
84820
|
}
|
|
84809
84821
|
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled);
|
|
84810
84822
|
},
|
|
84811
|
-
isImportRequiredByAugmentation
|
|
84823
|
+
isImportRequiredByAugmentation,
|
|
84824
|
+
tryFindAmbientModule: (moduleReferenceExpression) => {
|
|
84825
|
+
const node = getParseTreeNode(moduleReferenceExpression);
|
|
84826
|
+
const moduleSpecifier = node && isStringLiteralLike(node) ? node.text : void 0;
|
|
84827
|
+
return moduleSpecifier !== void 0 ? tryFindAmbientModule(
|
|
84828
|
+
moduleSpecifier,
|
|
84829
|
+
/*withAugmentations*/
|
|
84830
|
+
true
|
|
84831
|
+
) : void 0;
|
|
84832
|
+
}
|
|
84812
84833
|
};
|
|
84813
84834
|
function isImportRequiredByAugmentation(node) {
|
|
84814
84835
|
const file = getSourceFileOfNode(node);
|
|
@@ -110048,6 +110069,17 @@ ${lanes.join("\n")}
|
|
|
110048
110069
|
const container = getSourceFileOfNode(node);
|
|
110049
110070
|
refs.set(getOriginalNodeId(container), container);
|
|
110050
110071
|
}
|
|
110072
|
+
function trackReferencedAmbientModuleFromImport(node) {
|
|
110073
|
+
const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(node);
|
|
110074
|
+
const symbol = moduleSpecifier && resolver.tryFindAmbientModule(moduleSpecifier);
|
|
110075
|
+
if (symbol == null ? void 0 : symbol.declarations) {
|
|
110076
|
+
for (const decl of symbol.declarations) {
|
|
110077
|
+
if (isAmbientModule(decl) && getSourceFileOfNode(decl) !== currentSourceFile) {
|
|
110078
|
+
trackReferencedAmbientModule(decl, symbol);
|
|
110079
|
+
}
|
|
110080
|
+
}
|
|
110081
|
+
}
|
|
110082
|
+
}
|
|
110051
110083
|
function handleSymbolAccessibilityError(symbolAccessibilityResult) {
|
|
110052
110084
|
if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) {
|
|
110053
110085
|
if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) {
|
|
@@ -110995,6 +111027,7 @@ ${lanes.join("\n")}
|
|
|
110995
111027
|
case 205 /* ImportType */: {
|
|
110996
111028
|
if (!isLiteralImportTypeNode(input))
|
|
110997
111029
|
return cleanup(input);
|
|
111030
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
110998
111031
|
return cleanup(factory2.updateImportTypeNode(
|
|
110999
111032
|
input,
|
|
111000
111033
|
factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
|
|
@@ -111046,6 +111079,7 @@ ${lanes.join("\n")}
|
|
|
111046
111079
|
resultHasExternalModuleIndicator = true;
|
|
111047
111080
|
}
|
|
111048
111081
|
resultHasScopeMarker = true;
|
|
111082
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
111049
111083
|
return factory2.updateExportDeclaration(
|
|
111050
111084
|
input,
|
|
111051
111085
|
input.modifiers,
|
|
@@ -111120,10 +111154,18 @@ ${lanes.join("\n")}
|
|
|
111120
111154
|
return;
|
|
111121
111155
|
switch (input.kind) {
|
|
111122
111156
|
case 271 /* ImportEqualsDeclaration */: {
|
|
111123
|
-
|
|
111157
|
+
const transformed = transformImportEqualsDeclaration(input);
|
|
111158
|
+
if (transformed) {
|
|
111159
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
111160
|
+
}
|
|
111161
|
+
return transformed;
|
|
111124
111162
|
}
|
|
111125
111163
|
case 272 /* ImportDeclaration */: {
|
|
111126
|
-
|
|
111164
|
+
const transformed = transformImportDeclaration(input);
|
|
111165
|
+
if (transformed) {
|
|
111166
|
+
trackReferencedAmbientModuleFromImport(input);
|
|
111167
|
+
}
|
|
111168
|
+
return transformed;
|
|
111127
111169
|
}
|
|
111128
111170
|
}
|
|
111129
111171
|
if (isDeclaration(input) && isDeclarationAndNotVisible(input))
|
|
@@ -117610,7 +117652,8 @@ ${lanes.join("\n")}
|
|
|
117610
117652
|
getSymbolOfExternalModuleSpecifier: notImplemented,
|
|
117611
117653
|
isBindingCapturedByNode: notImplemented,
|
|
117612
117654
|
getDeclarationStatementsForSourceFile: notImplemented,
|
|
117613
|
-
isImportRequiredByAugmentation: notImplemented
|
|
117655
|
+
isImportRequiredByAugmentation: notImplemented,
|
|
117656
|
+
tryFindAmbientModule: notImplemented
|
|
117614
117657
|
};
|
|
117615
117658
|
createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
|
117616
117659
|
createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
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.20231009`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
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-56020-20",
|
|
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": "255c2861a6df15f9f602ff6c283a577d34f58fab"
|
|
118
118
|
}
|