@typescript-deploys/pr-build 5.8.0-pr-60950-9 → 5.8.0-pr-60384-4
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 +2 -5
- package/lib/typescript.js +22 -19
- package/package.json +1 -1
package/lib/_tsc.js
CHANGED
|
@@ -41545,7 +41545,7 @@ function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directo
|
|
|
41545
41545
|
);
|
|
41546
41546
|
}
|
|
41547
41547
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
41548
|
-
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
41548
|
+
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ || state.conditions.includes("import") ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
41549
41549
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
41550
41550
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
41551
41551
|
if (priorityExtensions) {
|
|
@@ -42866,16 +42866,13 @@ function createBinder() {
|
|
|
42866
42866
|
function bindForStatement(node) {
|
|
42867
42867
|
const preLoopLabel = setContinueTarget(node, createLoopLabel());
|
|
42868
42868
|
const preBodyLabel = createBranchLabel();
|
|
42869
|
-
const preIncrementorLabel = createBranchLabel();
|
|
42870
42869
|
const postLoopLabel = createBranchLabel();
|
|
42871
42870
|
bind(node.initializer);
|
|
42872
42871
|
addAntecedent(preLoopLabel, currentFlow);
|
|
42873
42872
|
currentFlow = preLoopLabel;
|
|
42874
42873
|
bindCondition(node.condition, preBodyLabel, postLoopLabel);
|
|
42875
42874
|
currentFlow = finishFlowLabel(preBodyLabel);
|
|
42876
|
-
bindIterativeStatement(node.statement, postLoopLabel,
|
|
42877
|
-
addAntecedent(preIncrementorLabel, currentFlow);
|
|
42878
|
-
currentFlow = finishFlowLabel(preIncrementorLabel);
|
|
42875
|
+
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
|
|
42879
42876
|
bind(node.incrementor);
|
|
42880
42877
|
addAntecedent(preLoopLabel, currentFlow);
|
|
42881
42878
|
currentFlow = finishFlowLabel(postLoopLabel);
|
package/lib/typescript.js
CHANGED
|
@@ -46037,7 +46037,7 @@ function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directo
|
|
|
46037
46037
|
);
|
|
46038
46038
|
}
|
|
46039
46039
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
46040
|
-
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
46040
|
+
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ || state.conditions.includes("import") ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
46041
46041
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
46042
46042
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
46043
46043
|
if (priorityExtensions) {
|
|
@@ -47376,16 +47376,13 @@ function createBinder() {
|
|
|
47376
47376
|
function bindForStatement(node) {
|
|
47377
47377
|
const preLoopLabel = setContinueTarget(node, createLoopLabel());
|
|
47378
47378
|
const preBodyLabel = createBranchLabel();
|
|
47379
|
-
const preIncrementorLabel = createBranchLabel();
|
|
47380
47379
|
const postLoopLabel = createBranchLabel();
|
|
47381
47380
|
bind(node.initializer);
|
|
47382
47381
|
addAntecedent(preLoopLabel, currentFlow);
|
|
47383
47382
|
currentFlow = preLoopLabel;
|
|
47384
47383
|
bindCondition(node.condition, preBodyLabel, postLoopLabel);
|
|
47385
47384
|
currentFlow = finishFlowLabel(preBodyLabel);
|
|
47386
|
-
bindIterativeStatement(node.statement, postLoopLabel,
|
|
47387
|
-
addAntecedent(preIncrementorLabel, currentFlow);
|
|
47388
|
-
currentFlow = finishFlowLabel(preIncrementorLabel);
|
|
47385
|
+
bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
|
|
47389
47386
|
bind(node.incrementor);
|
|
47390
47387
|
addAntecedent(preLoopLabel, currentFlow);
|
|
47391
47388
|
currentFlow = finishFlowLabel(postLoopLabel);
|
|
@@ -173568,7 +173565,10 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles
|
|
|
173568
173565
|
const { parent: parent2 } = node;
|
|
173569
173566
|
const typeChecker = program.getTypeChecker();
|
|
173570
173567
|
if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) {
|
|
173571
|
-
|
|
173568
|
+
const def = getDefinitionFromOverriddenMember(typeChecker, node);
|
|
173569
|
+
if (def !== void 0 || node.kind !== 164 /* OverrideKeyword */) {
|
|
173570
|
+
return def || emptyArray;
|
|
173571
|
+
}
|
|
173572
173572
|
}
|
|
173573
173573
|
if (isJumpStatementTarget(node)) {
|
|
173574
173574
|
const label = getTargetLabel(node.parent, node.text);
|
|
@@ -173582,9 +173582,6 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles
|
|
|
173582
173582
|
)] : void 0;
|
|
173583
173583
|
}
|
|
173584
173584
|
switch (node.kind) {
|
|
173585
|
-
case 107 /* ReturnKeyword */:
|
|
173586
|
-
const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n));
|
|
173587
|
-
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;
|
|
173588
173585
|
case 90 /* DefaultKeyword */:
|
|
173589
173586
|
if (!isDefaultClause(node.parent)) {
|
|
173590
173587
|
break;
|
|
@@ -173597,15 +173594,14 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles
|
|
|
173597
173594
|
}
|
|
173598
173595
|
break;
|
|
173599
173596
|
}
|
|
173600
|
-
|
|
173601
|
-
|
|
173602
|
-
|
|
173603
|
-
|
|
173604
|
-
|
|
173605
|
-
|
|
173606
|
-
|
|
173607
|
-
|
|
173608
|
-
return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;
|
|
173597
|
+
let findFunctionDecl;
|
|
173598
|
+
switch (node.kind) {
|
|
173599
|
+
case 107 /* ReturnKeyword */:
|
|
173600
|
+
case 135 /* AwaitKeyword */:
|
|
173601
|
+
case 127 /* YieldKeyword */:
|
|
173602
|
+
findFunctionDecl = isFunctionLikeDeclaration;
|
|
173603
|
+
const functionDeclaration = findAncestor(node, findFunctionDecl);
|
|
173604
|
+
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;
|
|
173609
173605
|
}
|
|
173610
173606
|
if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) {
|
|
173611
173607
|
const classDecl = node.parent.parent;
|
|
@@ -173655,6 +173651,9 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles
|
|
|
173655
173651
|
}];
|
|
173656
173652
|
}
|
|
173657
173653
|
}
|
|
173654
|
+
if (isModifier(node) && (isClassElement(parent2) || isNamedDeclaration(parent2))) {
|
|
173655
|
+
symbol = parent2.symbol;
|
|
173656
|
+
}
|
|
173658
173657
|
if (!symbol) {
|
|
173659
173658
|
return concatenate(fileReferenceDefinition, getDefinitionInfoForIndexSignatures(node, typeChecker));
|
|
173660
173659
|
}
|
|
@@ -173851,12 +173850,16 @@ function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
|
|
|
173851
173850
|
false
|
|
173852
173851
|
);
|
|
173853
173852
|
}
|
|
173854
|
-
|
|
173853
|
+
let { symbol, failedAliasResolution } = getSymbol(
|
|
173855
173854
|
node,
|
|
173856
173855
|
typeChecker,
|
|
173857
173856
|
/*stopAtAlias*/
|
|
173858
173857
|
false
|
|
173859
173858
|
);
|
|
173859
|
+
if (isModifier(node) && (isClassElement(node.parent) || isNamedDeclaration(node.parent))) {
|
|
173860
|
+
symbol = node.parent.symbol;
|
|
173861
|
+
failedAliasResolution = false;
|
|
173862
|
+
}
|
|
173860
173863
|
if (!symbol) return void 0;
|
|
173861
173864
|
const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node);
|
|
173862
173865
|
const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker);
|
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.8.0-pr-
|
|
5
|
+
"version": "5.8.0-pr-60384-4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|