@typescript-deploys/pr-build 5.5.0-pr-58364-29 → 5.5.0-pr-58655-2
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 +79 -263
- package/lib/typescript.js +107 -263
- package/package.json +1 -1
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.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240525`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -1518,15 +1518,6 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
1518
1518
|
);
|
|
1519
1519
|
}
|
|
1520
1520
|
Debug2.formatNodeFlags = formatNodeFlags;
|
|
1521
|
-
function formatNodeCheckFlags(flags) {
|
|
1522
|
-
return formatEnum(
|
|
1523
|
-
flags,
|
|
1524
|
-
NodeCheckFlags,
|
|
1525
|
-
/*isFlags*/
|
|
1526
|
-
true
|
|
1527
|
-
);
|
|
1528
|
-
}
|
|
1529
|
-
Debug2.formatNodeCheckFlags = formatNodeCheckFlags;
|
|
1530
1521
|
function formatModifierFlags(flags) {
|
|
1531
1522
|
return formatEnum(
|
|
1532
1523
|
flags,
|
|
@@ -3539,34 +3530,6 @@ var SymbolFlags = /* @__PURE__ */ ((SymbolFlags2) => {
|
|
|
3539
3530
|
SymbolFlags2[SymbolFlags2["LateBindingContainer"] = 6256] = "LateBindingContainer";
|
|
3540
3531
|
return SymbolFlags2;
|
|
3541
3532
|
})(SymbolFlags || {});
|
|
3542
|
-
var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags3) => {
|
|
3543
|
-
NodeCheckFlags3[NodeCheckFlags3["None"] = 0] = "None";
|
|
3544
|
-
NodeCheckFlags3[NodeCheckFlags3["TypeChecked"] = 1] = "TypeChecked";
|
|
3545
|
-
NodeCheckFlags3[NodeCheckFlags3["LexicalThis"] = 2] = "LexicalThis";
|
|
3546
|
-
NodeCheckFlags3[NodeCheckFlags3["CaptureThis"] = 4] = "CaptureThis";
|
|
3547
|
-
NodeCheckFlags3[NodeCheckFlags3["CaptureNewTarget"] = 8] = "CaptureNewTarget";
|
|
3548
|
-
NodeCheckFlags3[NodeCheckFlags3["SuperInstance"] = 16] = "SuperInstance";
|
|
3549
|
-
NodeCheckFlags3[NodeCheckFlags3["SuperStatic"] = 32] = "SuperStatic";
|
|
3550
|
-
NodeCheckFlags3[NodeCheckFlags3["ContextChecked"] = 64] = "ContextChecked";
|
|
3551
|
-
NodeCheckFlags3[NodeCheckFlags3["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
|
|
3552
|
-
NodeCheckFlags3[NodeCheckFlags3["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
|
|
3553
|
-
NodeCheckFlags3[NodeCheckFlags3["CaptureArguments"] = 512] = "CaptureArguments";
|
|
3554
|
-
NodeCheckFlags3[NodeCheckFlags3["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
|
|
3555
|
-
NodeCheckFlags3[NodeCheckFlags3["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
|
|
3556
|
-
NodeCheckFlags3[NodeCheckFlags3["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
|
|
3557
|
-
NodeCheckFlags3[NodeCheckFlags3["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
|
|
3558
|
-
NodeCheckFlags3[NodeCheckFlags3["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
|
|
3559
|
-
NodeCheckFlags3[NodeCheckFlags3["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
|
|
3560
|
-
NodeCheckFlags3[NodeCheckFlags3["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter";
|
|
3561
|
-
NodeCheckFlags3[NodeCheckFlags3["AssignmentsMarked"] = 131072] = "AssignmentsMarked";
|
|
3562
|
-
NodeCheckFlags3[NodeCheckFlags3["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference";
|
|
3563
|
-
NodeCheckFlags3[NodeCheckFlags3["ConstructorReference"] = 536870912] = "ConstructorReference";
|
|
3564
|
-
NodeCheckFlags3[NodeCheckFlags3["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers";
|
|
3565
|
-
NodeCheckFlags3[NodeCheckFlags3["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer";
|
|
3566
|
-
NodeCheckFlags3[NodeCheckFlags3["InCheckIdentifier"] = 4194304] = "InCheckIdentifier";
|
|
3567
|
-
NodeCheckFlags3[NodeCheckFlags3["LazyFlags"] = 539358128] = "LazyFlags";
|
|
3568
|
-
return NodeCheckFlags3;
|
|
3569
|
-
})(NodeCheckFlags || {});
|
|
3570
3533
|
var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
3571
3534
|
TypeFlags2[TypeFlags2["Any"] = 1] = "Any";
|
|
3572
3535
|
TypeFlags2[TypeFlags2["Unknown"] = 2] = "Unknown";
|
|
@@ -35917,7 +35880,7 @@ var commandOptionsWithoutBuild = [
|
|
|
35917
35880
|
showInSimplifiedHelpView: false,
|
|
35918
35881
|
category: Diagnostics.Compiler_Diagnostics,
|
|
35919
35882
|
description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,
|
|
35920
|
-
transpileOptionValue:
|
|
35883
|
+
transpileOptionValue: void 0,
|
|
35921
35884
|
defaultValueDescription: false,
|
|
35922
35885
|
affectsSemanticDiagnostics: true,
|
|
35923
35886
|
affectsBuildInfo: true,
|
|
@@ -47714,22 +47677,10 @@ function createTypeChecker(host) {
|
|
|
47714
47677
|
return !!aliasDeclarationLinks.typeOnlyDeclaration;
|
|
47715
47678
|
}
|
|
47716
47679
|
function getTypeOnlyAliasDeclaration(symbol, include) {
|
|
47717
|
-
var _a;
|
|
47718
47680
|
if (!(symbol.flags & 2097152 /* Alias */)) {
|
|
47719
47681
|
return void 0;
|
|
47720
47682
|
}
|
|
47721
47683
|
const links = getSymbolLinks(symbol);
|
|
47722
|
-
if (links.typeOnlyDeclaration === void 0) {
|
|
47723
|
-
links.typeOnlyDeclaration = false;
|
|
47724
|
-
const resolved = resolveSymbol(symbol);
|
|
47725
|
-
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
47726
|
-
(_a = symbol.declarations) == null ? void 0 : _a[0],
|
|
47727
|
-
getDeclarationOfAliasSymbol(symbol) && getImmediateAliasedSymbol(symbol),
|
|
47728
|
-
resolved,
|
|
47729
|
-
/*overwriteEmpty*/
|
|
47730
|
-
true
|
|
47731
|
-
);
|
|
47732
|
-
}
|
|
47733
47684
|
if (include === void 0) {
|
|
47734
47685
|
return links.typeOnlyDeclaration || void 0;
|
|
47735
47686
|
}
|
|
@@ -53113,6 +53064,25 @@ function createTypeChecker(host) {
|
|
|
53113
53064
|
function serializeSignatures(kind, input, baseType, outputKind) {
|
|
53114
53065
|
const signatures = getSignaturesOfType(input, kind);
|
|
53115
53066
|
if (kind === 1 /* Construct */) {
|
|
53067
|
+
let privateProtected = 0;
|
|
53068
|
+
for (const s of signatures) {
|
|
53069
|
+
if (s.declaration) {
|
|
53070
|
+
privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */);
|
|
53071
|
+
}
|
|
53072
|
+
}
|
|
53073
|
+
if (privateProtected) {
|
|
53074
|
+
return [setTextRange2(
|
|
53075
|
+
context,
|
|
53076
|
+
factory.createConstructorDeclaration(
|
|
53077
|
+
factory.createModifiersFromModifierFlags(privateProtected),
|
|
53078
|
+
/*parameters*/
|
|
53079
|
+
[],
|
|
53080
|
+
/*body*/
|
|
53081
|
+
void 0
|
|
53082
|
+
),
|
|
53083
|
+
signatures[0].declaration
|
|
53084
|
+
)];
|
|
53085
|
+
}
|
|
53116
53086
|
if (!baseType && every(signatures, (s) => length(s.parameters) === 0)) {
|
|
53117
53087
|
return [];
|
|
53118
53088
|
}
|
|
@@ -53144,25 +53114,6 @@ function createTypeChecker(host) {
|
|
|
53144
53114
|
}
|
|
53145
53115
|
}
|
|
53146
53116
|
}
|
|
53147
|
-
let privateProtected = 0;
|
|
53148
|
-
for (const s of signatures) {
|
|
53149
|
-
if (s.declaration) {
|
|
53150
|
-
privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */);
|
|
53151
|
-
}
|
|
53152
|
-
}
|
|
53153
|
-
if (privateProtected) {
|
|
53154
|
-
return [setTextRange2(
|
|
53155
|
-
context,
|
|
53156
|
-
factory.createConstructorDeclaration(
|
|
53157
|
-
factory.createModifiersFromModifierFlags(privateProtected),
|
|
53158
|
-
/*parameters*/
|
|
53159
|
-
[],
|
|
53160
|
-
/*body*/
|
|
53161
|
-
void 0
|
|
53162
|
-
),
|
|
53163
|
-
signatures[0].declaration
|
|
53164
|
-
)];
|
|
53165
|
-
}
|
|
53166
53117
|
}
|
|
53167
53118
|
const results2 = [];
|
|
53168
53119
|
for (const sig of signatures) {
|
|
@@ -69226,6 +69177,9 @@ function createTypeChecker(host) {
|
|
|
69226
69177
|
if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) {
|
|
69227
69178
|
return markJsxAliasReferenced(location);
|
|
69228
69179
|
}
|
|
69180
|
+
if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
|
|
69181
|
+
return markAsyncFunctionAliasReferenced(location);
|
|
69182
|
+
}
|
|
69229
69183
|
if (isImportEqualsDeclaration(location)) {
|
|
69230
69184
|
if (isInternalModuleImportEqualsDeclaration(location) || checkExternalImportOrExportDeclaration(location)) {
|
|
69231
69185
|
return markImportEqualsAliasReferenced(location);
|
|
@@ -69235,9 +69189,6 @@ function createTypeChecker(host) {
|
|
|
69235
69189
|
if (isExportSpecifier(location)) {
|
|
69236
69190
|
return markExportSpecifierAliasReferenced(location);
|
|
69237
69191
|
}
|
|
69238
|
-
if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
|
|
69239
|
-
markAsyncFunctionAliasReferenced(location);
|
|
69240
|
-
}
|
|
69241
69192
|
if (!compilerOptions.emitDecoratorMetadata) {
|
|
69242
69193
|
return;
|
|
69243
69194
|
}
|
|
@@ -69575,12 +69526,18 @@ function createTypeChecker(host) {
|
|
|
69575
69526
|
}
|
|
69576
69527
|
return type;
|
|
69577
69528
|
}
|
|
69578
|
-
function
|
|
69579
|
-
if (isThisInTypeQuery(node))
|
|
69529
|
+
function checkIdentifier(node, checkMode) {
|
|
69530
|
+
if (isThisInTypeQuery(node)) {
|
|
69531
|
+
return checkThisExpression(node);
|
|
69532
|
+
}
|
|
69533
|
+
const symbol = getResolvedSymbol(node);
|
|
69534
|
+
if (symbol === unknownSymbol) {
|
|
69535
|
+
return errorType;
|
|
69536
|
+
}
|
|
69580
69537
|
if (symbol === argumentsSymbol) {
|
|
69581
69538
|
if (isInPropertyInitializerOrClassStaticBlock(node)) {
|
|
69582
69539
|
error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers);
|
|
69583
|
-
return;
|
|
69540
|
+
return errorType;
|
|
69584
69541
|
}
|
|
69585
69542
|
let container = getContainingFunction(node);
|
|
69586
69543
|
if (container) {
|
|
@@ -69599,14 +69556,17 @@ function createTypeChecker(host) {
|
|
|
69599
69556
|
}
|
|
69600
69557
|
}
|
|
69601
69558
|
}
|
|
69602
|
-
return;
|
|
69559
|
+
return getTypeOfSymbol(symbol);
|
|
69560
|
+
}
|
|
69561
|
+
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
69562
|
+
markLinkedReferences(node, 1 /* Identifier */);
|
|
69603
69563
|
}
|
|
69604
69564
|
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
69605
69565
|
const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node);
|
|
69606
69566
|
if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
|
|
69607
69567
|
addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
|
|
69608
69568
|
}
|
|
69609
|
-
|
|
69569
|
+
let declaration = localOrExportSymbol.valueDeclaration;
|
|
69610
69570
|
if (declaration && localOrExportSymbol.flags & 32 /* Class */) {
|
|
69611
69571
|
if (isClassLike(declaration) && declaration.name !== node) {
|
|
69612
69572
|
let container = getThisContainer(
|
|
@@ -69633,27 +69593,6 @@ function createTypeChecker(host) {
|
|
|
69633
69593
|
}
|
|
69634
69594
|
}
|
|
69635
69595
|
checkNestedBlockScopedBinding(node, symbol);
|
|
69636
|
-
}
|
|
69637
|
-
function checkIdentifier(node, checkMode) {
|
|
69638
|
-
if (isThisInTypeQuery(node)) {
|
|
69639
|
-
return checkThisExpression(node);
|
|
69640
|
-
}
|
|
69641
|
-
const symbol = getResolvedSymbol(node);
|
|
69642
|
-
if (symbol === unknownSymbol) {
|
|
69643
|
-
return errorType;
|
|
69644
|
-
}
|
|
69645
|
-
checkIdentifierCalculateNodeCheckFlags(node, symbol);
|
|
69646
|
-
if (symbol === argumentsSymbol) {
|
|
69647
|
-
if (isInPropertyInitializerOrClassStaticBlock(node)) {
|
|
69648
|
-
return errorType;
|
|
69649
|
-
}
|
|
69650
|
-
return getTypeOfSymbol(symbol);
|
|
69651
|
-
}
|
|
69652
|
-
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
69653
|
-
markLinkedReferences(node, 1 /* Identifier */);
|
|
69654
|
-
}
|
|
69655
|
-
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
69656
|
-
let declaration = localOrExportSymbol.valueDeclaration;
|
|
69657
69596
|
let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode);
|
|
69658
69597
|
const assignmentKind = getAssignmentTargetKind(node);
|
|
69659
69598
|
if (assignmentKind) {
|
|
@@ -84640,6 +84579,7 @@ function createTypeChecker(host) {
|
|
|
84640
84579
|
if (links.isDeclarationWithCollidingName === void 0) {
|
|
84641
84580
|
const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration);
|
|
84642
84581
|
if (isStatementWithLocals(container) || isSymbolOfDestructuredElementOfCatchBinding(symbol)) {
|
|
84582
|
+
const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
|
|
84643
84583
|
if (resolveName(
|
|
84644
84584
|
container.parent,
|
|
84645
84585
|
symbol.escapedName,
|
|
@@ -84650,8 +84590,8 @@ function createTypeChecker(host) {
|
|
|
84650
84590
|
false
|
|
84651
84591
|
)) {
|
|
84652
84592
|
links.isDeclarationWithCollidingName = true;
|
|
84653
|
-
} else if (
|
|
84654
|
-
const isDeclaredInLoop =
|
|
84593
|
+
} else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
|
|
84594
|
+
const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
|
|
84655
84595
|
const inLoopInitializer = isIterationStatement(
|
|
84656
84596
|
container,
|
|
84657
84597
|
/*lookInLabeledStatements*/
|
|
@@ -84733,9 +84673,6 @@ function createTypeChecker(host) {
|
|
|
84733
84673
|
if (!symbol) {
|
|
84734
84674
|
return false;
|
|
84735
84675
|
}
|
|
84736
|
-
const container = getSourceFileOfNode(symbol.valueDeclaration);
|
|
84737
|
-
const fileSymbol = container && getSymbolOfDeclaration(container);
|
|
84738
|
-
void resolveExternalModuleSymbol(fileSymbol);
|
|
84739
84676
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
84740
84677
|
if (target === unknownSymbol) {
|
|
84741
84678
|
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
@@ -84834,108 +84771,6 @@ function createTypeChecker(host) {
|
|
|
84834
84771
|
if (nodeId < 0 || nodeId >= nodeLinks.length) return 0;
|
|
84835
84772
|
return ((_a = nodeLinks[nodeId]) == null ? void 0 : _a.flags) || 0;
|
|
84836
84773
|
}
|
|
84837
|
-
function hasNodeCheckFlag(node, flag) {
|
|
84838
|
-
calculateNodeCheckFlagWorker(node, flag);
|
|
84839
|
-
return !!(getNodeCheckFlags(node) & flag);
|
|
84840
|
-
}
|
|
84841
|
-
function calculateNodeCheckFlagWorker(node, flag) {
|
|
84842
|
-
if (!compilerOptions.noCheck) {
|
|
84843
|
-
return;
|
|
84844
|
-
}
|
|
84845
|
-
const links = getNodeLinks(node);
|
|
84846
|
-
if (links.calculatedFlags & flag) {
|
|
84847
|
-
return;
|
|
84848
|
-
}
|
|
84849
|
-
switch (flag) {
|
|
84850
|
-
case 16 /* SuperInstance */:
|
|
84851
|
-
case 32 /* SuperStatic */:
|
|
84852
|
-
return checkSingleSuperExpression(node);
|
|
84853
|
-
case 128 /* MethodWithSuperPropertyAccessInAsync */:
|
|
84854
|
-
case 256 /* MethodWithSuperPropertyAssignmentInAsync */:
|
|
84855
|
-
case 2097152 /* ContainsSuperPropertyInStaticInitializer */:
|
|
84856
|
-
return checkChildSuperExpressions(node);
|
|
84857
|
-
case 512 /* CaptureArguments */:
|
|
84858
|
-
case 8192 /* ContainsCapturedBlockScopeBinding */:
|
|
84859
|
-
case 65536 /* NeedsLoopOutParameter */:
|
|
84860
|
-
case 262144 /* ContainsConstructorReference */:
|
|
84861
|
-
return checkChildIdentifiers(node);
|
|
84862
|
-
case 536870912 /* ConstructorReference */:
|
|
84863
|
-
return checkSingleIdentifier(node);
|
|
84864
|
-
case 4096 /* LoopWithCapturedBlockScopedBinding */:
|
|
84865
|
-
case 32768 /* BlockScopedBindingInLoop */:
|
|
84866
|
-
case 16384 /* CapturedBlockScopedBinding */:
|
|
84867
|
-
return checkContainingBlockScopeBindingUses(node);
|
|
84868
|
-
default:
|
|
84869
|
-
return Debug.assertNever(flag, `Unhandled node check flag calculation: ${Debug.formatNodeCheckFlags(flag)}`);
|
|
84870
|
-
}
|
|
84871
|
-
function forEachNodeRecursively(root, cb) {
|
|
84872
|
-
const rootResult = cb(root, root.parent);
|
|
84873
|
-
if (rootResult === "skip") return void 0;
|
|
84874
|
-
if (rootResult) return rootResult;
|
|
84875
|
-
return forEachChildRecursively(root, cb);
|
|
84876
|
-
}
|
|
84877
|
-
function checkSuperExpressions(node2) {
|
|
84878
|
-
const links2 = getNodeLinks(node2);
|
|
84879
|
-
if (links2.calculatedFlags & flag) return "skip";
|
|
84880
|
-
links2.calculatedFlags |= 128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */ | 2097152 /* ContainsSuperPropertyInStaticInitializer */;
|
|
84881
|
-
checkSingleSuperExpression(node2);
|
|
84882
|
-
return void 0;
|
|
84883
|
-
}
|
|
84884
|
-
function checkChildSuperExpressions(node2) {
|
|
84885
|
-
forEachNodeRecursively(node2, checkSuperExpressions);
|
|
84886
|
-
}
|
|
84887
|
-
function checkSingleSuperExpression(node2) {
|
|
84888
|
-
const nodeLinks2 = getNodeLinks(node2);
|
|
84889
|
-
nodeLinks2.calculatedFlags |= 16 /* SuperInstance */ | 32 /* SuperStatic */;
|
|
84890
|
-
if (node2.kind === 108 /* SuperKeyword */) {
|
|
84891
|
-
checkSuperExpression(node2);
|
|
84892
|
-
}
|
|
84893
|
-
}
|
|
84894
|
-
function checkIdentifiers(node2) {
|
|
84895
|
-
const links2 = getNodeLinks(node2);
|
|
84896
|
-
if (links2.calculatedFlags & flag) return "skip";
|
|
84897
|
-
links2.calculatedFlags |= 512 /* CaptureArguments */ | 8192 /* ContainsCapturedBlockScopeBinding */ | 65536 /* NeedsLoopOutParameter */ | 262144 /* ContainsConstructorReference */;
|
|
84898
|
-
checkSingleIdentifier(node2);
|
|
84899
|
-
return void 0;
|
|
84900
|
-
}
|
|
84901
|
-
function checkChildIdentifiers(node2) {
|
|
84902
|
-
forEachNodeRecursively(node2, checkIdentifiers);
|
|
84903
|
-
}
|
|
84904
|
-
function checkSingleIdentifier(node2) {
|
|
84905
|
-
const nodeLinks2 = getNodeLinks(node2);
|
|
84906
|
-
nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
|
|
84907
|
-
if (isIdentifier(node2) && isExpressionNode(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
|
|
84908
|
-
const s = getSymbolAtLocation(
|
|
84909
|
-
node2,
|
|
84910
|
-
/*ignoreErrors*/
|
|
84911
|
-
true
|
|
84912
|
-
);
|
|
84913
|
-
if (s && s !== unknownSymbol) {
|
|
84914
|
-
checkIdentifierCalculateNodeCheckFlags(node2, s);
|
|
84915
|
-
}
|
|
84916
|
-
}
|
|
84917
|
-
}
|
|
84918
|
-
function checkBlockScopeBindings(node2) {
|
|
84919
|
-
const links2 = getNodeLinks(node2);
|
|
84920
|
-
if (links2.calculatedFlags & flag) return "skip";
|
|
84921
|
-
links2.calculatedFlags |= 4096 /* LoopWithCapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */ | 16384 /* CapturedBlockScopedBinding */;
|
|
84922
|
-
checkSingleBlockScopeBinding(node2);
|
|
84923
|
-
return void 0;
|
|
84924
|
-
}
|
|
84925
|
-
function checkContainingBlockScopeBindingUses(node2) {
|
|
84926
|
-
const scope = getEnclosingBlockScopeContainer(isDeclarationName(node2) ? node2.parent : node2);
|
|
84927
|
-
forEachNodeRecursively(scope, checkBlockScopeBindings);
|
|
84928
|
-
}
|
|
84929
|
-
function checkSingleBlockScopeBinding(node2) {
|
|
84930
|
-
checkSingleIdentifier(node2);
|
|
84931
|
-
if (isComputedPropertyName(node2)) {
|
|
84932
|
-
checkComputedPropertyName(node2);
|
|
84933
|
-
}
|
|
84934
|
-
if (isPrivateIdentifier(node2) && isClassElement(node2.parent)) {
|
|
84935
|
-
setNodeLinksForPrivateIdentifierScope(node2.parent);
|
|
84936
|
-
}
|
|
84937
|
-
}
|
|
84938
|
-
}
|
|
84939
84774
|
function getEnumMemberValue(node) {
|
|
84940
84775
|
computeEnumMemberValues(node.parent);
|
|
84941
84776
|
return getNodeLinks(node).enumMemberValue ?? evaluatorResult(
|
|
@@ -84956,15 +84791,7 @@ function createTypeChecker(host) {
|
|
|
84956
84791
|
if (node.kind === 306 /* EnumMember */) {
|
|
84957
84792
|
return getEnumMemberValue(node).value;
|
|
84958
84793
|
}
|
|
84959
|
-
|
|
84960
|
-
void checkExpressionCached(node);
|
|
84961
|
-
}
|
|
84962
|
-
const symbol = getNodeLinks(node).resolvedSymbol || (isEntityNameExpression(node) ? resolveEntityName(
|
|
84963
|
-
node,
|
|
84964
|
-
111551 /* Value */,
|
|
84965
|
-
/*ignoreErrors*/
|
|
84966
|
-
true
|
|
84967
|
-
) : void 0);
|
|
84794
|
+
const symbol = getNodeLinks(node).resolvedSymbol;
|
|
84968
84795
|
if (symbol && symbol.flags & 8 /* EnumMember */) {
|
|
84969
84796
|
const member = symbol.valueDeclaration;
|
|
84970
84797
|
if (isEnumConst(member.parent)) {
|
|
@@ -85315,10 +85142,9 @@ function createTypeChecker(host) {
|
|
|
85315
85142
|
const node = getParseTreeNode(nodeIn);
|
|
85316
85143
|
return node && canCollectSymbolAliasAccessabilityData ? isReferencedAliasDeclaration(node, checkChildren) : true;
|
|
85317
85144
|
},
|
|
85318
|
-
|
|
85145
|
+
getNodeCheckFlags: (nodeIn) => {
|
|
85319
85146
|
const node = getParseTreeNode(nodeIn);
|
|
85320
|
-
|
|
85321
|
-
return hasNodeCheckFlag(node, flag);
|
|
85147
|
+
return node ? getNodeCheckFlags(node) : 0;
|
|
85322
85148
|
},
|
|
85323
85149
|
isTopLevelValueImportEqualsWithEntityName,
|
|
85324
85150
|
isDeclarationVisible,
|
|
@@ -85341,10 +85167,6 @@ function createTypeChecker(host) {
|
|
|
85341
85167
|
return node ? getEnumMemberValue(node) : void 0;
|
|
85342
85168
|
},
|
|
85343
85169
|
collectLinkedAliases,
|
|
85344
|
-
markLinkedReferences: (nodeIn) => {
|
|
85345
|
-
const node = getParseTreeNode(nodeIn);
|
|
85346
|
-
return node && markLinkedReferences(node, 0 /* Unspecified */);
|
|
85347
|
-
},
|
|
85348
85170
|
getReferencedValueDeclaration,
|
|
85349
85171
|
getReferencedValueDeclarations,
|
|
85350
85172
|
getTypeReferenceSerializationKind,
|
|
@@ -93136,7 +92958,7 @@ function transformClassFields(context) {
|
|
|
93136
92958
|
containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));
|
|
93137
92959
|
} else if (isPrivateIdentifierClassElementDeclaration(member)) {
|
|
93138
92960
|
containsInstancePrivateElements = true;
|
|
93139
|
-
if (resolver.
|
|
92961
|
+
if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) {
|
|
93140
92962
|
facts |= 2 /* NeedsClassConstructorReference */;
|
|
93141
92963
|
}
|
|
93142
92964
|
} else if (isPropertyDeclaration(member)) {
|
|
@@ -93243,7 +93065,7 @@ function transformClassFields(context) {
|
|
|
93243
93065
|
if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {
|
|
93244
93066
|
getClassLexicalEnvironment().classThis = node.emitNode.classThis;
|
|
93245
93067
|
}
|
|
93246
|
-
const isClassWithConstructorReference = resolver.
|
|
93068
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */;
|
|
93247
93069
|
const isExport = hasSyntacticModifier(node, 32 /* Export */);
|
|
93248
93070
|
const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
|
|
93249
93071
|
let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);
|
|
@@ -93305,14 +93127,15 @@ function transformClassFields(context) {
|
|
|
93305
93127
|
var _a, _b, _c;
|
|
93306
93128
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
93307
93129
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
93308
|
-
const
|
|
93309
|
-
const
|
|
93130
|
+
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
93131
|
+
const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */;
|
|
93310
93132
|
let temp;
|
|
93311
93133
|
function createClassTempVar() {
|
|
93312
93134
|
var _a2;
|
|
93313
93135
|
if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) {
|
|
93314
93136
|
return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;
|
|
93315
93137
|
}
|
|
93138
|
+
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
93316
93139
|
const temp2 = factory2.createTempVariable(
|
|
93317
93140
|
requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration,
|
|
93318
93141
|
/*reservedInNestedScopes*/
|
|
@@ -93880,7 +93703,7 @@ function transformClassFields(context) {
|
|
|
93880
93703
|
const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
93881
93704
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
93882
93705
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
93883
|
-
if (resolver.
|
|
93706
|
+
if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
|
|
93884
93707
|
addBlockScopedVariable(generatedName);
|
|
93885
93708
|
} else {
|
|
93886
93709
|
hoistVariableDeclaration(generatedName);
|
|
@@ -94034,7 +93857,7 @@ function transformClassFields(context) {
|
|
|
94034
93857
|
prefix,
|
|
94035
93858
|
suffix
|
|
94036
93859
|
);
|
|
94037
|
-
if (resolver.
|
|
93860
|
+
if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
|
|
94038
93861
|
addBlockScopedVariable(identifier);
|
|
94039
93862
|
} else {
|
|
94040
93863
|
hoistVariableDeclaration(identifier);
|
|
@@ -94273,7 +94096,7 @@ function transformClassFields(context) {
|
|
|
94273
94096
|
}
|
|
94274
94097
|
function trySubstituteClassAlias(node) {
|
|
94275
94098
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
94276
|
-
if (resolver.
|
|
94099
|
+
if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
|
|
94277
94100
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
94278
94101
|
if (declaration) {
|
|
94279
94102
|
const classAlias = classAliases[declaration.id];
|
|
@@ -95140,7 +94963,7 @@ function transformLegacyDecorators(context) {
|
|
|
95140
94963
|
}
|
|
95141
94964
|
}
|
|
95142
94965
|
function getClassAliasIfNeeded(node) {
|
|
95143
|
-
if (resolver.
|
|
94966
|
+
if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) {
|
|
95144
94967
|
enableSubstitutionForClassAliases();
|
|
95145
94968
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
95146
94969
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -95173,7 +94996,7 @@ function transformLegacyDecorators(context) {
|
|
|
95173
94996
|
}
|
|
95174
94997
|
function trySubstituteClassAlias(node) {
|
|
95175
94998
|
if (classAliases) {
|
|
95176
|
-
if (resolver.
|
|
94999
|
+
if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
|
|
95177
95000
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
95178
95001
|
if (declaration) {
|
|
95179
95002
|
const classAlias = classAliases[declaration.id];
|
|
@@ -97482,7 +97305,7 @@ function transformES2017(context) {
|
|
|
97482
97305
|
hasSuperElementAccess = false;
|
|
97483
97306
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
97484
97307
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
97485
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ &&
|
|
97308
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
|
|
97486
97309
|
if (emitSuperHelpers) {
|
|
97487
97310
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
97488
97311
|
if (capturedSuperProperties.size) {
|
|
@@ -97493,9 +97316,9 @@ function transformES2017(context) {
|
|
|
97493
97316
|
updated = factory2.updateBlock(updated, statements);
|
|
97494
97317
|
}
|
|
97495
97318
|
if (hasSuperElementAccess) {
|
|
97496
|
-
if (resolver.
|
|
97319
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
97497
97320
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
97498
|
-
} else if (resolver.
|
|
97321
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
97499
97322
|
addEmitHelper(updated, asyncSuperHelper);
|
|
97500
97323
|
}
|
|
97501
97324
|
}
|
|
@@ -97562,7 +97385,7 @@ function transformES2017(context) {
|
|
|
97562
97385
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
97563
97386
|
const isArrowFunction2 = node.kind === 219 /* ArrowFunction */;
|
|
97564
97387
|
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
97565
|
-
const hasLexicalArguments = resolver.
|
|
97388
|
+
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
97566
97389
|
const captureLexicalArguments = hasLexicalArguments && !lexicalArgumentsBinding;
|
|
97567
97390
|
if (captureLexicalArguments) {
|
|
97568
97391
|
lexicalArgumentsBinding = factory2.createUniqueName("arguments");
|
|
@@ -97617,7 +97440,7 @@ function transformES2017(context) {
|
|
|
97617
97440
|
)
|
|
97618
97441
|
)
|
|
97619
97442
|
);
|
|
97620
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ &&
|
|
97443
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
97621
97444
|
if (emitSuperHelpers) {
|
|
97622
97445
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
97623
97446
|
if (capturedSuperProperties.size) {
|
|
@@ -97636,9 +97459,9 @@ function transformES2017(context) {
|
|
|
97636
97459
|
);
|
|
97637
97460
|
setTextRange(block, node.body);
|
|
97638
97461
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
97639
|
-
if (resolver.
|
|
97462
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
97640
97463
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
97641
|
-
} else if (resolver.
|
|
97464
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
97642
97465
|
addEmitHelper(block, asyncSuperHelper);
|
|
97643
97466
|
}
|
|
97644
97467
|
}
|
|
@@ -97697,7 +97520,7 @@ function transformES2017(context) {
|
|
|
97697
97520
|
}
|
|
97698
97521
|
function onEmitNode(hint, node, emitCallback) {
|
|
97699
97522
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
97700
|
-
const superContainerFlags =
|
|
97523
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
97701
97524
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
97702
97525
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
97703
97526
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -97801,7 +97624,7 @@ function transformES2017(context) {
|
|
|
97801
97624
|
}
|
|
97802
97625
|
}
|
|
97803
97626
|
function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
97804
|
-
const hasBinding = resolver.
|
|
97627
|
+
const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
|
|
97805
97628
|
const accessors = [];
|
|
97806
97629
|
names.forEach((_, key) => {
|
|
97807
97630
|
const name = unescapeLeadingUnderscores(key);
|
|
@@ -98896,7 +98719,7 @@ function transformES2018(context) {
|
|
|
98896
98719
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
98897
98720
|
)
|
|
98898
98721
|
);
|
|
98899
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ &&
|
|
98722
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
98900
98723
|
if (emitSuperHelpers) {
|
|
98901
98724
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
98902
98725
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
@@ -98906,9 +98729,9 @@ function transformES2018(context) {
|
|
|
98906
98729
|
outerStatements.push(returnStatement);
|
|
98907
98730
|
const block = factory2.updateBlock(node.body, outerStatements);
|
|
98908
98731
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
98909
|
-
if (resolver.
|
|
98732
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
98910
98733
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
98911
|
-
} else if (resolver.
|
|
98734
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
98912
98735
|
addEmitHelper(block, asyncSuperHelper);
|
|
98913
98736
|
}
|
|
98914
98737
|
}
|
|
@@ -99041,7 +98864,7 @@ function transformES2018(context) {
|
|
|
99041
98864
|
}
|
|
99042
98865
|
function onEmitNode(hint, node, emitCallback) {
|
|
99043
98866
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
99044
|
-
const superContainerFlags =
|
|
98867
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
99045
98868
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
99046
98869
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
99047
98870
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -102746,8 +102569,9 @@ function transformES2015(context) {
|
|
|
102746
102569
|
return createRange(pos, end);
|
|
102747
102570
|
}
|
|
102748
102571
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
102749
|
-
const
|
|
102750
|
-
const
|
|
102572
|
+
const flags = resolver.getNodeCheckFlags(node);
|
|
102573
|
+
const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
|
|
102574
|
+
const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
|
|
102751
102575
|
const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
|
|
102752
102576
|
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
|
|
102753
102577
|
return emitExplicitInitializer;
|
|
@@ -103198,7 +103022,7 @@ function transformES2015(context) {
|
|
|
103198
103022
|
return factory2.inlineExpressions(expressions);
|
|
103199
103023
|
}
|
|
103200
103024
|
function shouldConvertPartOfIterationStatement(node) {
|
|
103201
|
-
return resolver.
|
|
103025
|
+
return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
|
|
103202
103026
|
}
|
|
103203
103027
|
function shouldConvertInitializerOfForStatement(node) {
|
|
103204
103028
|
return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
|
|
@@ -103213,7 +103037,7 @@ function transformES2015(context) {
|
|
|
103213
103037
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
103214
103038
|
}
|
|
103215
103039
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
103216
|
-
return resolver.
|
|
103040
|
+
return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
|
|
103217
103041
|
}
|
|
103218
103042
|
function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
|
|
103219
103043
|
if (!state.hoistedLocalVariables) {
|
|
@@ -103762,11 +103586,11 @@ function transformES2015(context) {
|
|
|
103762
103586
|
void 0,
|
|
103763
103587
|
name
|
|
103764
103588
|
));
|
|
103765
|
-
const
|
|
103766
|
-
if (
|
|
103589
|
+
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
103590
|
+
if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
103767
103591
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
103768
103592
|
let flags = 0 /* None */;
|
|
103769
|
-
if (
|
|
103593
|
+
if (checkFlags & 65536 /* NeedsLoopOutParameter */) {
|
|
103770
103594
|
flags |= 1 /* Body */;
|
|
103771
103595
|
}
|
|
103772
103596
|
if (isForStatement(container)) {
|
|
@@ -112795,9 +112619,6 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
112795
112619
|
emitSkipped = true;
|
|
112796
112620
|
return;
|
|
112797
112621
|
}
|
|
112798
|
-
if (compilerOptions.noCheck) {
|
|
112799
|
-
(isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(markLinkedReferences);
|
|
112800
|
-
}
|
|
112801
112622
|
const transform = transformNodes(
|
|
112802
112623
|
resolver,
|
|
112803
112624
|
host,
|
|
@@ -112932,13 +112753,6 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
112932
112753
|
}
|
|
112933
112754
|
forEachChild(node, collectLinkedAliases);
|
|
112934
112755
|
}
|
|
112935
|
-
function markLinkedReferences(file) {
|
|
112936
|
-
forEachChildRecursively(file, (n) => {
|
|
112937
|
-
if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32 /* Export */)) return "skip";
|
|
112938
|
-
if (isImportDeclaration(n)) return "skip";
|
|
112939
|
-
resolver.markLinkedReferences(n);
|
|
112940
|
-
});
|
|
112941
|
-
}
|
|
112942
112756
|
function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform, printer, mapOptions) {
|
|
112943
112757
|
const sourceFileOrBundle = transform.transformed[0];
|
|
112944
112758
|
const bundle = sourceFileOrBundle.kind === 308 /* Bundle */ ? sourceFileOrBundle : void 0;
|
|
@@ -113070,11 +112884,10 @@ var notImplementedResolver = {
|
|
|
113070
112884
|
isValueAliasDeclaration: notImplemented,
|
|
113071
112885
|
isReferencedAliasDeclaration: notImplemented,
|
|
113072
112886
|
isTopLevelValueImportEqualsWithEntityName: notImplemented,
|
|
113073
|
-
|
|
112887
|
+
getNodeCheckFlags: notImplemented,
|
|
113074
112888
|
isDeclarationVisible: notImplemented,
|
|
113075
112889
|
isLateBound: (_node) => false,
|
|
113076
112890
|
collectLinkedAliases: notImplemented,
|
|
113077
|
-
markLinkedReferences: notImplemented,
|
|
113078
112891
|
isImplementationOfOverload: notImplemented,
|
|
113079
112892
|
requiresAddingImplicitUndefined: notImplemented,
|
|
113080
112893
|
isExpandoFunctionDeclaration: notImplemented,
|
|
@@ -121164,6 +120977,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121164
120977
|
if (options.noEmit) {
|
|
121165
120978
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
|
|
121166
120979
|
}
|
|
120980
|
+
if (!options.emitDeclarationOnly) {
|
|
120981
|
+
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noCheck", "emitDeclarationOnly");
|
|
120982
|
+
}
|
|
121167
120983
|
}
|
|
121168
120984
|
if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
|
|
121169
120985
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
|