@typescript-deploys/pr-build 5.3.0-pr-56281-6 → 5.4.0-pr-56183-8
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/lib.es2016.d.ts +1 -0
- package/lib/lib.es2016.intl.d.ts +31 -0
- package/lib/lib.es5.d.ts +0 -12
- package/lib/tsc.js +437 -229
- package/lib/tsserver.js +605 -338
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +614 -349
- package/lib/typingsInstaller.js +4 -2
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -17,8 +17,8 @@ and limitations under the License.
|
|
|
17
17
|
"use strict";
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
|
-
var versionMajorMinor = "5.
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
20
|
+
var versionMajorMinor = "5.4";
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20231103`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -23404,7 +23404,7 @@ function createEmitHelperFactory(context) {
|
|
|
23404
23404
|
]
|
|
23405
23405
|
);
|
|
23406
23406
|
}
|
|
23407
|
-
function createAwaiterHelper(hasLexicalThis,
|
|
23407
|
+
function createAwaiterHelper(hasLexicalThis, argumentsExpression, promiseConstructor, parameters, body) {
|
|
23408
23408
|
context.requestEmitHelper(awaiterHelper);
|
|
23409
23409
|
const generatorFunc = factory2.createFunctionExpression(
|
|
23410
23410
|
/*modifiers*/
|
|
@@ -23414,8 +23414,7 @@ function createEmitHelperFactory(context) {
|
|
|
23414
23414
|
void 0,
|
|
23415
23415
|
/*typeParameters*/
|
|
23416
23416
|
void 0,
|
|
23417
|
-
|
|
23418
|
-
[],
|
|
23417
|
+
parameters ?? [],
|
|
23419
23418
|
/*type*/
|
|
23420
23419
|
void 0,
|
|
23421
23420
|
body
|
|
@@ -23427,7 +23426,7 @@ function createEmitHelperFactory(context) {
|
|
|
23427
23426
|
void 0,
|
|
23428
23427
|
[
|
|
23429
23428
|
hasLexicalThis ? factory2.createThis() : factory2.createVoidZero(),
|
|
23430
|
-
|
|
23429
|
+
argumentsExpression ?? factory2.createVoidZero(),
|
|
23431
23430
|
promiseConstructor ? createExpressionFromEntityName(factory2, promiseConstructor) : factory2.createVoidZero(),
|
|
23432
23431
|
generatorFunc
|
|
23433
23432
|
]
|
|
@@ -33842,6 +33841,7 @@ var libEntries = [
|
|
|
33842
33841
|
["es2015.symbol", "lib.es2015.symbol.d.ts"],
|
|
33843
33842
|
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
|
|
33844
33843
|
["es2016.array.include", "lib.es2016.array.include.d.ts"],
|
|
33844
|
+
["es2016.intl", "lib.es2016.intl.d.ts"],
|
|
33845
33845
|
["es2017.date", "lib.es2017.date.d.ts"],
|
|
33846
33846
|
["es2017.object", "lib.es2017.object.d.ts"],
|
|
33847
33847
|
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
|
|
@@ -34173,6 +34173,7 @@ var targetOptionDeclaration = {
|
|
|
34173
34173
|
affectsModuleResolution: true,
|
|
34174
34174
|
affectsEmit: true,
|
|
34175
34175
|
affectsBuildInfo: true,
|
|
34176
|
+
deprecatedKeys: /* @__PURE__ */ new Set(["es3"]),
|
|
34176
34177
|
paramType: Diagnostics.VERSION,
|
|
34177
34178
|
showInSimplifiedHelpView: true,
|
|
34178
34179
|
category: Diagnostics.Language_and_Environment,
|
|
@@ -40034,6 +40035,9 @@ function createBinder() {
|
|
|
40034
40035
|
case 213 /* CallExpression */:
|
|
40035
40036
|
return hasNarrowableArgument(expr);
|
|
40036
40037
|
case 217 /* ParenthesizedExpression */:
|
|
40038
|
+
if (isJSDocTypeAssertion(expr)) {
|
|
40039
|
+
return false;
|
|
40040
|
+
}
|
|
40037
40041
|
case 235 /* NonNullExpression */:
|
|
40038
40042
|
return isNarrowingExpression(expr.expression);
|
|
40039
40043
|
case 226 /* BinaryExpression */:
|
|
@@ -55007,33 +55011,20 @@ function createTypeChecker(host) {
|
|
|
55007
55011
|
return emptyArray;
|
|
55008
55012
|
}
|
|
55009
55013
|
function getSignaturesOfType(type, kind) {
|
|
55010
|
-
|
|
55011
|
-
|
|
55012
|
-
let memberName;
|
|
55013
|
-
if (everyType(type2, (t) => {
|
|
55014
|
-
var _a;
|
|
55015
|
-
return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
55016
|
-
})) {
|
|
55017
|
-
if (type2.arrayFallbackSignatures) {
|
|
55018
|
-
return type2.arrayFallbackSignatures;
|
|
55019
|
-
}
|
|
55020
|
-
const arrayArg = mapType(type2, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
55021
|
-
const arrayType = createArrayType(arrayArg, someType(type2, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
55022
|
-
return type2.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind2);
|
|
55023
|
-
}
|
|
55024
|
-
}
|
|
55025
|
-
return void 0;
|
|
55026
|
-
}
|
|
55027
|
-
let result = carveoutResult(type, kind);
|
|
55028
|
-
if (result)
|
|
55029
|
-
return result;
|
|
55030
|
-
if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
|
|
55014
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
55015
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
55031
55016
|
if (type.arrayFallbackSignatures) {
|
|
55032
55017
|
return type.arrayFallbackSignatures;
|
|
55033
55018
|
}
|
|
55034
|
-
|
|
55035
|
-
|
|
55036
|
-
|
|
55019
|
+
let memberName;
|
|
55020
|
+
if (everyType(type, (t) => {
|
|
55021
|
+
var _a;
|
|
55022
|
+
return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
55023
|
+
})) {
|
|
55024
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
55025
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
55026
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
55027
|
+
}
|
|
55037
55028
|
type.arrayFallbackSignatures = result;
|
|
55038
55029
|
}
|
|
55039
55030
|
return result;
|
|
@@ -66879,15 +66870,23 @@ function createTypeChecker(host) {
|
|
|
66879
66870
|
error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers);
|
|
66880
66871
|
return errorType;
|
|
66881
66872
|
}
|
|
66882
|
-
|
|
66883
|
-
if (
|
|
66884
|
-
if (
|
|
66885
|
-
|
|
66886
|
-
|
|
66887
|
-
|
|
66873
|
+
let container = getContainingFunction(node);
|
|
66874
|
+
if (container) {
|
|
66875
|
+
if (languageVersion < 2 /* ES2015 */) {
|
|
66876
|
+
if (container.kind === 219 /* ArrowFunction */) {
|
|
66877
|
+
error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
|
|
66878
|
+
} else if (hasSyntacticModifier(container, 1024 /* Async */)) {
|
|
66879
|
+
error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
|
|
66880
|
+
}
|
|
66881
|
+
}
|
|
66882
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
66883
|
+
while (container && isArrowFunction(container)) {
|
|
66884
|
+
container = getContainingFunction(container);
|
|
66885
|
+
if (container) {
|
|
66886
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
66887
|
+
}
|
|
66888
66888
|
}
|
|
66889
66889
|
}
|
|
66890
|
-
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
66891
66890
|
return getTypeOfSymbol(symbol);
|
|
66892
66891
|
}
|
|
66893
66892
|
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
@@ -68112,6 +68111,17 @@ function createTypeChecker(host) {
|
|
|
68112
68111
|
isTypeAssignableTo
|
|
68113
68112
|
);
|
|
68114
68113
|
}
|
|
68114
|
+
function filterContextualTypeForLiteralExpressionOfObject(node, contextualType) {
|
|
68115
|
+
if (!isLiteralExpressionOfObject(node)) {
|
|
68116
|
+
return contextualType;
|
|
68117
|
+
}
|
|
68118
|
+
return filterType(contextualType, (t) => {
|
|
68119
|
+
if (!t.symbol || !(t.symbol.flags & 32 /* Class */)) {
|
|
68120
|
+
return true;
|
|
68121
|
+
}
|
|
68122
|
+
return every(getPropertiesOfType(t), (p) => !p.valueDeclaration || !isNamedDeclaration(p.valueDeclaration) || !isPrivateIdentifier(p.valueDeclaration.name) && !(getDeclarationModifierFlagsFromSymbol(p) & 6 /* NonPublicAccessibilityModifier */));
|
|
68123
|
+
});
|
|
68124
|
+
}
|
|
68115
68125
|
function getApparentTypeOfContextualType(node, contextFlags) {
|
|
68116
68126
|
const contextualType = isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node, contextFlags) : getContextualType(node, contextFlags);
|
|
68117
68127
|
const instantiatedType = instantiateContextualType(contextualType, node, contextFlags);
|
|
@@ -68155,7 +68165,6 @@ function createTypeChecker(host) {
|
|
|
68155
68165
|
return type;
|
|
68156
68166
|
}
|
|
68157
68167
|
function getContextualType(node, contextFlags) {
|
|
68158
|
-
var _a;
|
|
68159
68168
|
if (node.flags & 67108864 /* InWithStatement */) {
|
|
68160
68169
|
return void 0;
|
|
68161
68170
|
}
|
|
@@ -68167,6 +68176,14 @@ function createTypeChecker(host) {
|
|
|
68167
68176
|
if (index >= 0) {
|
|
68168
68177
|
return contextualTypes[index];
|
|
68169
68178
|
}
|
|
68179
|
+
const contextualType = getContextualTypeWorker(node, contextFlags);
|
|
68180
|
+
if (!contextualType) {
|
|
68181
|
+
return void 0;
|
|
68182
|
+
}
|
|
68183
|
+
return filterContextualTypeForLiteralExpressionOfObject(node, contextualType);
|
|
68184
|
+
}
|
|
68185
|
+
function getContextualTypeWorker(node, contextFlags) {
|
|
68186
|
+
var _a;
|
|
68170
68187
|
const { parent } = node;
|
|
68171
68188
|
switch (parent.kind) {
|
|
68172
68189
|
case 260 /* VariableDeclaration */:
|
|
@@ -74947,10 +74964,11 @@ function createTypeChecker(host) {
|
|
|
74947
74964
|
return node;
|
|
74948
74965
|
}
|
|
74949
74966
|
function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {
|
|
74967
|
+
const filteredContextualType = filterContextualTypeForLiteralExpressionOfObject(node, contextualType);
|
|
74950
74968
|
const contextNode = getContextNode(node);
|
|
74951
74969
|
pushContextualType(
|
|
74952
74970
|
contextNode,
|
|
74953
|
-
|
|
74971
|
+
filteredContextualType,
|
|
74954
74972
|
/*isCache*/
|
|
74955
74973
|
false
|
|
74956
74974
|
);
|
|
@@ -74960,7 +74978,7 @@ function createTypeChecker(host) {
|
|
|
74960
74978
|
inferenceContext.intraExpressionInferenceSites = void 0;
|
|
74961
74979
|
}
|
|
74962
74980
|
const result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(
|
|
74963
|
-
|
|
74981
|
+
filteredContextualType,
|
|
74964
74982
|
node,
|
|
74965
74983
|
/*contextFlags*/
|
|
74966
74984
|
void 0
|
|
@@ -86754,6 +86772,12 @@ function setPrivateIdentifier(privateEnv, name, entry) {
|
|
|
86754
86772
|
function accessPrivateIdentifier(env, name) {
|
|
86755
86773
|
return walkUpLexicalEnvironments(env, (env2) => getPrivateIdentifier(env2.privateEnv, name));
|
|
86756
86774
|
}
|
|
86775
|
+
function isSimpleParameter(node) {
|
|
86776
|
+
return !node.initializer && isIdentifier(node.name);
|
|
86777
|
+
}
|
|
86778
|
+
function isSimpleParameterList(nodes) {
|
|
86779
|
+
return every(nodes, isSimpleParameter);
|
|
86780
|
+
}
|
|
86757
86781
|
|
|
86758
86782
|
// src/compiler/transformers/destructuring.ts
|
|
86759
86783
|
function flattenDestructuringAssignment(node, visitor, context, level, needsValue, createAssignmentCallback) {
|
|
@@ -94230,6 +94254,7 @@ function transformES2017(context) {
|
|
|
94230
94254
|
let enclosingFunctionParameterNames;
|
|
94231
94255
|
let capturedSuperProperties;
|
|
94232
94256
|
let hasSuperElementAccess;
|
|
94257
|
+
let lexicalArgumentsBinding;
|
|
94233
94258
|
const substitutedSuperAccessors = [];
|
|
94234
94259
|
let contextFlags = 0 /* None */;
|
|
94235
94260
|
const previousOnEmitNode = context.onEmitNode;
|
|
@@ -94280,9 +94305,30 @@ function transformES2017(context) {
|
|
|
94280
94305
|
function visitDefault(node) {
|
|
94281
94306
|
return visitEachChild(node, visitor, context);
|
|
94282
94307
|
}
|
|
94308
|
+
function argumentsVisitor(node) {
|
|
94309
|
+
switch (node.kind) {
|
|
94310
|
+
case 218 /* FunctionExpression */:
|
|
94311
|
+
case 262 /* FunctionDeclaration */:
|
|
94312
|
+
case 174 /* MethodDeclaration */:
|
|
94313
|
+
case 177 /* GetAccessor */:
|
|
94314
|
+
case 178 /* SetAccessor */:
|
|
94315
|
+
case 176 /* Constructor */:
|
|
94316
|
+
return node;
|
|
94317
|
+
case 169 /* Parameter */:
|
|
94318
|
+
case 208 /* BindingElement */:
|
|
94319
|
+
case 260 /* VariableDeclaration */:
|
|
94320
|
+
break;
|
|
94321
|
+
case 80 /* Identifier */:
|
|
94322
|
+
if (lexicalArgumentsBinding && resolver.isArgumentsLocalBinding(node)) {
|
|
94323
|
+
return lexicalArgumentsBinding;
|
|
94324
|
+
}
|
|
94325
|
+
break;
|
|
94326
|
+
}
|
|
94327
|
+
return visitEachChild(node, argumentsVisitor, context);
|
|
94328
|
+
}
|
|
94283
94329
|
function visitor(node) {
|
|
94284
94330
|
if ((node.transformFlags & 256 /* ContainsES2017 */) === 0) {
|
|
94285
|
-
return node;
|
|
94331
|
+
return lexicalArgumentsBinding ? argumentsVisitor(node) : node;
|
|
94286
94332
|
}
|
|
94287
94333
|
switch (node.kind) {
|
|
94288
94334
|
case 134 /* AsyncKeyword */:
|
|
@@ -94440,15 +94486,23 @@ function transformES2017(context) {
|
|
|
94440
94486
|
);
|
|
94441
94487
|
}
|
|
94442
94488
|
function visitConstructorDeclaration(node) {
|
|
94443
|
-
|
|
94489
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94490
|
+
lexicalArgumentsBinding = void 0;
|
|
94491
|
+
const updated = factory2.updateConstructorDeclaration(
|
|
94444
94492
|
node,
|
|
94445
94493
|
visitNodes2(node.modifiers, visitor, isModifier),
|
|
94446
94494
|
visitParameterList(node.parameters, visitor, context),
|
|
94447
94495
|
transformMethodBody(node)
|
|
94448
94496
|
);
|
|
94497
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94498
|
+
return updated;
|
|
94449
94499
|
}
|
|
94450
94500
|
function visitMethodDeclaration(node) {
|
|
94451
|
-
|
|
94501
|
+
let parameters;
|
|
94502
|
+
const functionFlags = getFunctionFlags(node);
|
|
94503
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94504
|
+
lexicalArgumentsBinding = void 0;
|
|
94505
|
+
const updated = factory2.updateMethodDeclaration(
|
|
94452
94506
|
node,
|
|
94453
94507
|
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
94454
94508
|
node.asteriskToken,
|
|
@@ -94457,14 +94511,18 @@ function transformES2017(context) {
|
|
|
94457
94511
|
void 0,
|
|
94458
94512
|
/*typeParameters*/
|
|
94459
94513
|
void 0,
|
|
94460
|
-
visitParameterList(node.parameters, visitor, context),
|
|
94514
|
+
parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),
|
|
94461
94515
|
/*type*/
|
|
94462
94516
|
void 0,
|
|
94463
|
-
|
|
94517
|
+
functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : transformMethodBody(node)
|
|
94464
94518
|
);
|
|
94519
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94520
|
+
return updated;
|
|
94465
94521
|
}
|
|
94466
94522
|
function visitGetAccessorDeclaration(node) {
|
|
94467
|
-
|
|
94523
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94524
|
+
lexicalArgumentsBinding = void 0;
|
|
94525
|
+
const updated = factory2.updateGetAccessorDeclaration(
|
|
94468
94526
|
node,
|
|
94469
94527
|
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
94470
94528
|
node.name,
|
|
@@ -94473,55 +94531,75 @@ function transformES2017(context) {
|
|
|
94473
94531
|
void 0,
|
|
94474
94532
|
transformMethodBody(node)
|
|
94475
94533
|
);
|
|
94534
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94535
|
+
return updated;
|
|
94476
94536
|
}
|
|
94477
94537
|
function visitSetAccessorDeclaration(node) {
|
|
94478
|
-
|
|
94538
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94539
|
+
lexicalArgumentsBinding = void 0;
|
|
94540
|
+
const updated = factory2.updateSetAccessorDeclaration(
|
|
94479
94541
|
node,
|
|
94480
94542
|
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
94481
94543
|
node.name,
|
|
94482
94544
|
visitParameterList(node.parameters, visitor, context),
|
|
94483
94545
|
transformMethodBody(node)
|
|
94484
94546
|
);
|
|
94547
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94548
|
+
return updated;
|
|
94485
94549
|
}
|
|
94486
94550
|
function visitFunctionDeclaration(node) {
|
|
94487
|
-
|
|
94551
|
+
let parameters;
|
|
94552
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94553
|
+
lexicalArgumentsBinding = void 0;
|
|
94554
|
+
const functionFlags = getFunctionFlags(node);
|
|
94555
|
+
const updated = factory2.updateFunctionDeclaration(
|
|
94488
94556
|
node,
|
|
94489
94557
|
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
94490
94558
|
node.asteriskToken,
|
|
94491
94559
|
node.name,
|
|
94492
94560
|
/*typeParameters*/
|
|
94493
94561
|
void 0,
|
|
94494
|
-
visitParameterList(node.parameters, visitor, context),
|
|
94562
|
+
parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),
|
|
94495
94563
|
/*type*/
|
|
94496
94564
|
void 0,
|
|
94497
|
-
|
|
94565
|
+
functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)
|
|
94498
94566
|
);
|
|
94567
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94568
|
+
return updated;
|
|
94499
94569
|
}
|
|
94500
94570
|
function visitFunctionExpression(node) {
|
|
94501
|
-
|
|
94571
|
+
let parameters;
|
|
94572
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94573
|
+
lexicalArgumentsBinding = void 0;
|
|
94574
|
+
const functionFlags = getFunctionFlags(node);
|
|
94575
|
+
const updated = factory2.updateFunctionExpression(
|
|
94502
94576
|
node,
|
|
94503
94577
|
visitNodes2(node.modifiers, visitor, isModifier),
|
|
94504
94578
|
node.asteriskToken,
|
|
94505
94579
|
node.name,
|
|
94506
94580
|
/*typeParameters*/
|
|
94507
94581
|
void 0,
|
|
94508
|
-
visitParameterList(node.parameters, visitor, context),
|
|
94582
|
+
parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),
|
|
94509
94583
|
/*type*/
|
|
94510
94584
|
void 0,
|
|
94511
|
-
|
|
94585
|
+
functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)
|
|
94512
94586
|
);
|
|
94587
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94588
|
+
return updated;
|
|
94513
94589
|
}
|
|
94514
94590
|
function visitArrowFunction(node) {
|
|
94591
|
+
let parameters;
|
|
94592
|
+
const functionFlags = getFunctionFlags(node);
|
|
94515
94593
|
return factory2.updateArrowFunction(
|
|
94516
94594
|
node,
|
|
94517
94595
|
visitNodes2(node.modifiers, visitor, isModifier),
|
|
94518
94596
|
/*typeParameters*/
|
|
94519
94597
|
void 0,
|
|
94520
|
-
visitParameterList(node.parameters, visitor, context),
|
|
94598
|
+
parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),
|
|
94521
94599
|
/*type*/
|
|
94522
94600
|
void 0,
|
|
94523
94601
|
node.equalsGreaterThanToken,
|
|
94524
|
-
|
|
94602
|
+
functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)
|
|
94525
94603
|
);
|
|
94526
94604
|
}
|
|
94527
94605
|
function recordDeclarationName({ name }, names) {
|
|
@@ -94615,13 +94693,91 @@ function transformES2017(context) {
|
|
|
94615
94693
|
hasSuperElementAccess = savedHasSuperElementAccess;
|
|
94616
94694
|
return updated;
|
|
94617
94695
|
}
|
|
94618
|
-
function
|
|
94696
|
+
function createCaptureArgumentsStatement() {
|
|
94697
|
+
Debug.assert(lexicalArgumentsBinding);
|
|
94698
|
+
const variable = factory2.createVariableDeclaration(
|
|
94699
|
+
lexicalArgumentsBinding,
|
|
94700
|
+
/*exclamationToken*/
|
|
94701
|
+
void 0,
|
|
94702
|
+
/*type*/
|
|
94703
|
+
void 0,
|
|
94704
|
+
factory2.createIdentifier("arguments")
|
|
94705
|
+
);
|
|
94706
|
+
const statement = factory2.createVariableStatement(
|
|
94707
|
+
/*modifiers*/
|
|
94708
|
+
void 0,
|
|
94709
|
+
[variable]
|
|
94710
|
+
);
|
|
94711
|
+
startOnNewLine(statement);
|
|
94712
|
+
addEmitFlags(statement, 2097152 /* CustomPrologue */);
|
|
94713
|
+
return statement;
|
|
94714
|
+
}
|
|
94715
|
+
function transformAsyncFunctionParameterList(node) {
|
|
94716
|
+
if (isSimpleParameterList(node.parameters)) {
|
|
94717
|
+
return visitParameterList(node.parameters, visitor, context);
|
|
94718
|
+
}
|
|
94719
|
+
const newParameters = [];
|
|
94720
|
+
for (const parameter of node.parameters) {
|
|
94721
|
+
if (parameter.initializer || parameter.dotDotDotToken) {
|
|
94722
|
+
if (node.kind === 219 /* ArrowFunction */) {
|
|
94723
|
+
const restParameter = factory2.createParameterDeclaration(
|
|
94724
|
+
/*modifiers*/
|
|
94725
|
+
void 0,
|
|
94726
|
+
factory2.createToken(26 /* DotDotDotToken */),
|
|
94727
|
+
factory2.createUniqueName("args", 8 /* ReservedInNestedScopes */)
|
|
94728
|
+
);
|
|
94729
|
+
newParameters.push(restParameter);
|
|
94730
|
+
}
|
|
94731
|
+
break;
|
|
94732
|
+
}
|
|
94733
|
+
const newParameter = factory2.createParameterDeclaration(
|
|
94734
|
+
/*modifiers*/
|
|
94735
|
+
void 0,
|
|
94736
|
+
/*dotDotDotToken*/
|
|
94737
|
+
void 0,
|
|
94738
|
+
factory2.getGeneratedNameForNode(parameter.name, 8 /* ReservedInNestedScopes */)
|
|
94739
|
+
);
|
|
94740
|
+
newParameters.push(newParameter);
|
|
94741
|
+
}
|
|
94742
|
+
const newParametersArray = factory2.createNodeArray(newParameters);
|
|
94743
|
+
setTextRange(newParametersArray, node.parameters);
|
|
94744
|
+
return newParametersArray;
|
|
94745
|
+
}
|
|
94746
|
+
function transformAsyncFunctionBody(node, outerParameters) {
|
|
94747
|
+
const innerParameters = !isSimpleParameterList(node.parameters) ? visitParameterList(node.parameters, visitor, context) : void 0;
|
|
94619
94748
|
resumeLexicalEnvironment();
|
|
94620
94749
|
const original = getOriginalNode(node, isFunctionLike);
|
|
94621
94750
|
const nodeType = original.type;
|
|
94622
94751
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
94623
94752
|
const isArrowFunction2 = node.kind === 219 /* ArrowFunction */;
|
|
94753
|
+
const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
|
|
94624
94754
|
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
94755
|
+
const captureLexicalArguments = hasLexicalArguments && !lexicalArgumentsBinding;
|
|
94756
|
+
if (captureLexicalArguments) {
|
|
94757
|
+
lexicalArgumentsBinding = factory2.createUniqueName("arguments");
|
|
94758
|
+
}
|
|
94759
|
+
let argumentsExpression;
|
|
94760
|
+
if (innerParameters) {
|
|
94761
|
+
if (isArrowFunction2) {
|
|
94762
|
+
const parameterBindings = [];
|
|
94763
|
+
Debug.assert(outerParameters.length <= node.parameters.length);
|
|
94764
|
+
for (let i = 0; i < node.parameters.length; i++) {
|
|
94765
|
+
Debug.assert(i < outerParameters.length);
|
|
94766
|
+
const originalParameter = node.parameters[i];
|
|
94767
|
+
const outerParameter = outerParameters[i];
|
|
94768
|
+
Debug.assertNode(outerParameter.name, isIdentifier);
|
|
94769
|
+
if (originalParameter.initializer || originalParameter.dotDotDotToken) {
|
|
94770
|
+
Debug.assert(i === outerParameters.length - 1);
|
|
94771
|
+
parameterBindings.push(factory2.createSpreadElement(outerParameter.name));
|
|
94772
|
+
break;
|
|
94773
|
+
}
|
|
94774
|
+
parameterBindings.push(outerParameter.name);
|
|
94775
|
+
}
|
|
94776
|
+
argumentsExpression = factory2.createArrayLiteralExpression(parameterBindings);
|
|
94777
|
+
} else {
|
|
94778
|
+
argumentsExpression = factory2.createIdentifier("arguments");
|
|
94779
|
+
}
|
|
94780
|
+
}
|
|
94625
94781
|
const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
|
|
94626
94782
|
enclosingFunctionParameterNames = /* @__PURE__ */ new Set();
|
|
94627
94783
|
for (const parameter of node.parameters) {
|
|
@@ -94633,27 +94789,23 @@ function transformES2017(context) {
|
|
|
94633
94789
|
capturedSuperProperties = /* @__PURE__ */ new Set();
|
|
94634
94790
|
hasSuperElementAccess = false;
|
|
94635
94791
|
}
|
|
94792
|
+
const hasLexicalThis = inHasLexicalThisContext();
|
|
94793
|
+
let asyncBody = transformAsyncFunctionBodyWorker(node.body);
|
|
94794
|
+
asyncBody = factory2.updateBlock(asyncBody, factory2.mergeLexicalEnvironment(asyncBody.statements, endLexicalEnvironment()));
|
|
94636
94795
|
let result;
|
|
94637
94796
|
if (!isArrowFunction2) {
|
|
94638
94797
|
const statements = [];
|
|
94639
|
-
const statementOffset = factory2.copyPrologue(
|
|
94640
|
-
node.body.statements,
|
|
94641
|
-
statements,
|
|
94642
|
-
/*ensureUseStrict*/
|
|
94643
|
-
false,
|
|
94644
|
-
visitor
|
|
94645
|
-
);
|
|
94646
94798
|
statements.push(
|
|
94647
94799
|
factory2.createReturnStatement(
|
|
94648
94800
|
emitHelpers().createAwaiterHelper(
|
|
94649
|
-
|
|
94650
|
-
|
|
94801
|
+
hasLexicalThis,
|
|
94802
|
+
argumentsExpression,
|
|
94651
94803
|
promiseConstructor,
|
|
94652
|
-
|
|
94804
|
+
innerParameters,
|
|
94805
|
+
asyncBody
|
|
94653
94806
|
)
|
|
94654
94807
|
)
|
|
94655
94808
|
);
|
|
94656
|
-
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
94657
94809
|
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
94658
94810
|
if (emitSuperHelpers) {
|
|
94659
94811
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
@@ -94663,6 +94815,9 @@ function transformES2017(context) {
|
|
|
94663
94815
|
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
|
94664
94816
|
}
|
|
94665
94817
|
}
|
|
94818
|
+
if (captureLexicalArguments) {
|
|
94819
|
+
insertStatementsAfterStandardPrologue(statements, [createCaptureArgumentsStatement()]);
|
|
94820
|
+
}
|
|
94666
94821
|
const block = factory2.createBlock(
|
|
94667
94822
|
statements,
|
|
94668
94823
|
/*multiLine*/
|
|
@@ -94678,24 +94833,23 @@ function transformES2017(context) {
|
|
|
94678
94833
|
}
|
|
94679
94834
|
result = block;
|
|
94680
94835
|
} else {
|
|
94681
|
-
|
|
94682
|
-
|
|
94683
|
-
|
|
94836
|
+
result = emitHelpers().createAwaiterHelper(
|
|
94837
|
+
hasLexicalThis,
|
|
94838
|
+
argumentsExpression,
|
|
94684
94839
|
promiseConstructor,
|
|
94685
|
-
|
|
94840
|
+
innerParameters,
|
|
94841
|
+
asyncBody
|
|
94686
94842
|
);
|
|
94687
|
-
|
|
94688
|
-
|
|
94689
|
-
|
|
94690
|
-
result = factory2.updateBlock(block, setTextRange(factory2.createNodeArray(concatenate(declarations, block.statements)), block.statements));
|
|
94691
|
-
} else {
|
|
94692
|
-
result = expression;
|
|
94843
|
+
if (captureLexicalArguments) {
|
|
94844
|
+
const block = factory2.converters.convertToFunctionBlock(result);
|
|
94845
|
+
result = factory2.updateBlock(block, factory2.mergeLexicalEnvironment(block.statements, [createCaptureArgumentsStatement()]));
|
|
94693
94846
|
}
|
|
94694
94847
|
}
|
|
94695
94848
|
enclosingFunctionParameterNames = savedEnclosingFunctionParameterNames;
|
|
94696
94849
|
if (!isArrowFunction2) {
|
|
94697
94850
|
capturedSuperProperties = savedCapturedSuperProperties;
|
|
94698
94851
|
hasSuperElementAccess = savedHasSuperElementAccess;
|
|
94852
|
+
lexicalArgumentsBinding = savedLexicalArgumentsBinding;
|
|
94699
94853
|
}
|
|
94700
94854
|
return result;
|
|
94701
94855
|
}
|
|
@@ -95811,7 +95965,7 @@ function transformES2018(context) {
|
|
|
95811
95965
|
),
|
|
95812
95966
|
/*typeParameters*/
|
|
95813
95967
|
void 0,
|
|
95814
|
-
visitParameterList(node.parameters, parameterVisitor, context),
|
|
95968
|
+
enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionParameterList(node) : visitParameterList(node.parameters, parameterVisitor, context),
|
|
95815
95969
|
/*type*/
|
|
95816
95970
|
void 0,
|
|
95817
95971
|
enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody(node)
|
|
@@ -95832,7 +95986,7 @@ function transformES2018(context) {
|
|
|
95832
95986
|
node.name,
|
|
95833
95987
|
/*typeParameters*/
|
|
95834
95988
|
void 0,
|
|
95835
|
-
visitParameterList(node.parameters, parameterVisitor, context),
|
|
95989
|
+
enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionParameterList(node) : visitParameterList(node.parameters, parameterVisitor, context),
|
|
95836
95990
|
/*type*/
|
|
95837
95991
|
void 0,
|
|
95838
95992
|
enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody(node)
|
|
@@ -95873,7 +96027,7 @@ function transformES2018(context) {
|
|
|
95873
96027
|
node.name,
|
|
95874
96028
|
/*typeParameters*/
|
|
95875
96029
|
void 0,
|
|
95876
|
-
visitParameterList(node.parameters, parameterVisitor, context),
|
|
96030
|
+
enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionParameterList(node) : visitParameterList(node.parameters, parameterVisitor, context),
|
|
95877
96031
|
/*type*/
|
|
95878
96032
|
void 0,
|
|
95879
96033
|
enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody(node)
|
|
@@ -95882,21 +96036,38 @@ function transformES2018(context) {
|
|
|
95882
96036
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
95883
96037
|
return updated;
|
|
95884
96038
|
}
|
|
96039
|
+
function transformAsyncGeneratorFunctionParameterList(node) {
|
|
96040
|
+
if (isSimpleParameterList(node.parameters)) {
|
|
96041
|
+
return visitParameterList(node.parameters, visitor, context);
|
|
96042
|
+
}
|
|
96043
|
+
const newParameters = [];
|
|
96044
|
+
for (const parameter of node.parameters) {
|
|
96045
|
+
if (parameter.initializer || parameter.dotDotDotToken) {
|
|
96046
|
+
break;
|
|
96047
|
+
}
|
|
96048
|
+
const newParameter = factory2.createParameterDeclaration(
|
|
96049
|
+
/*modifiers*/
|
|
96050
|
+
void 0,
|
|
96051
|
+
/*dotDotDotToken*/
|
|
96052
|
+
void 0,
|
|
96053
|
+
factory2.getGeneratedNameForNode(parameter.name, 8 /* ReservedInNestedScopes */)
|
|
96054
|
+
);
|
|
96055
|
+
newParameters.push(newParameter);
|
|
96056
|
+
}
|
|
96057
|
+
const newParametersArray = factory2.createNodeArray(newParameters);
|
|
96058
|
+
setTextRange(newParametersArray, node.parameters);
|
|
96059
|
+
return newParametersArray;
|
|
96060
|
+
}
|
|
95885
96061
|
function transformAsyncGeneratorFunctionBody(node) {
|
|
96062
|
+
const innerParameters = !isSimpleParameterList(node.parameters) ? visitParameterList(node.parameters, visitor, context) : void 0;
|
|
95886
96063
|
resumeLexicalEnvironment();
|
|
95887
|
-
const statements = [];
|
|
95888
|
-
const statementOffset = factory2.copyPrologue(
|
|
95889
|
-
node.body.statements,
|
|
95890
|
-
statements,
|
|
95891
|
-
/*ensureUseStrict*/
|
|
95892
|
-
false,
|
|
95893
|
-
visitor
|
|
95894
|
-
);
|
|
95895
|
-
appendObjectRestAssignmentsIfNeeded(statements, node);
|
|
95896
96064
|
const savedCapturedSuperProperties = capturedSuperProperties;
|
|
95897
96065
|
const savedHasSuperElementAccess = hasSuperElementAccess;
|
|
95898
96066
|
capturedSuperProperties = /* @__PURE__ */ new Set();
|
|
95899
96067
|
hasSuperElementAccess = false;
|
|
96068
|
+
const outerStatements = [];
|
|
96069
|
+
let asyncBody = factory2.updateBlock(node.body, visitNodes2(node.body.statements, visitor, isStatement));
|
|
96070
|
+
asyncBody = factory2.updateBlock(asyncBody, factory2.mergeLexicalEnvironment(asyncBody.statements, appendObjectRestAssignmentsIfNeeded(endLexicalEnvironment(), node)));
|
|
95900
96071
|
const returnStatement = factory2.createReturnStatement(
|
|
95901
96072
|
emitHelpers().createAsyncGeneratorHelper(
|
|
95902
96073
|
factory2.createFunctionExpression(
|
|
@@ -95906,14 +96077,10 @@ function transformES2018(context) {
|
|
|
95906
96077
|
node.name && factory2.getGeneratedNameForNode(node.name),
|
|
95907
96078
|
/*typeParameters*/
|
|
95908
96079
|
void 0,
|
|
95909
|
-
|
|
95910
|
-
[],
|
|
96080
|
+
innerParameters ?? [],
|
|
95911
96081
|
/*type*/
|
|
95912
96082
|
void 0,
|
|
95913
|
-
|
|
95914
|
-
node.body,
|
|
95915
|
-
visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset)
|
|
95916
|
-
)
|
|
96083
|
+
asyncBody
|
|
95917
96084
|
),
|
|
95918
96085
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
95919
96086
|
)
|
|
@@ -95923,11 +96090,10 @@ function transformES2018(context) {
|
|
|
95923
96090
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
95924
96091
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
95925
96092
|
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
|
95926
|
-
insertStatementsAfterStandardPrologue(
|
|
96093
|
+
insertStatementsAfterStandardPrologue(outerStatements, [variableStatement]);
|
|
95927
96094
|
}
|
|
95928
|
-
|
|
95929
|
-
|
|
95930
|
-
const block = factory2.updateBlock(node.body, statements);
|
|
96095
|
+
outerStatements.push(returnStatement);
|
|
96096
|
+
const block = factory2.updateBlock(node.body, outerStatements);
|
|
95931
96097
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
95932
96098
|
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
95933
96099
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
@@ -109761,27 +109927,6 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
109761
109927
|
(_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Emit, "emitBuildInfo", { buildInfoPath });
|
|
109762
109928
|
emitBuildInfo(bundleBuildInfo, buildInfoPath);
|
|
109763
109929
|
(_f = tracing) == null ? void 0 : _f.pop();
|
|
109764
|
-
if (!emitSkipped && emittedFilesList) {
|
|
109765
|
-
if (!emitOnly) {
|
|
109766
|
-
if (jsFilePath) {
|
|
109767
|
-
emittedFilesList.push(jsFilePath);
|
|
109768
|
-
}
|
|
109769
|
-
if (sourceMapFilePath) {
|
|
109770
|
-
emittedFilesList.push(sourceMapFilePath);
|
|
109771
|
-
}
|
|
109772
|
-
if (buildInfoPath) {
|
|
109773
|
-
emittedFilesList.push(buildInfoPath);
|
|
109774
|
-
}
|
|
109775
|
-
}
|
|
109776
|
-
if (emitOnly !== 0 /* Js */) {
|
|
109777
|
-
if (declarationFilePath) {
|
|
109778
|
-
emittedFilesList.push(declarationFilePath);
|
|
109779
|
-
}
|
|
109780
|
-
if (declarationMapPath) {
|
|
109781
|
-
emittedFilesList.push(declarationMapPath);
|
|
109782
|
-
}
|
|
109783
|
-
}
|
|
109784
|
-
}
|
|
109785
109930
|
function relativeToBuildInfo(path) {
|
|
109786
109931
|
return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, host.getCanonicalFileName));
|
|
109787
109932
|
}
|
|
@@ -109809,6 +109954,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
109809
109954
|
void 0,
|
|
109810
109955
|
{ buildInfo }
|
|
109811
109956
|
);
|
|
109957
|
+
emittedFilesList == null ? void 0 : emittedFilesList.push(buildInfoPath);
|
|
109812
109958
|
}
|
|
109813
109959
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
109814
109960
|
if (!sourceFileOrBundle || emitOnly || !jsFilePath) {
|
|
@@ -109854,6 +110000,12 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
109854
110000
|
transform.dispose();
|
|
109855
110001
|
if (bundleBuildInfo)
|
|
109856
110002
|
bundleBuildInfo.js = printer.bundleFileInfo;
|
|
110003
|
+
if (emittedFilesList) {
|
|
110004
|
+
emittedFilesList.push(jsFilePath);
|
|
110005
|
+
if (sourceMapFilePath) {
|
|
110006
|
+
emittedFilesList.push(sourceMapFilePath);
|
|
110007
|
+
}
|
|
110008
|
+
}
|
|
109857
110009
|
}
|
|
109858
110010
|
function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) {
|
|
109859
110011
|
if (!sourceFileOrBundle || emitOnly === 0 /* Js */)
|
|
@@ -109884,33 +110036,33 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
109884
110036
|
emitterDiagnostics.add(diagnostic);
|
|
109885
110037
|
}
|
|
109886
110038
|
}
|
|
109887
|
-
const printerOptions = {
|
|
109888
|
-
removeComments: compilerOptions.removeComments,
|
|
109889
|
-
newLine: compilerOptions.newLine,
|
|
109890
|
-
noEmitHelpers: true,
|
|
109891
|
-
module: compilerOptions.module,
|
|
109892
|
-
target: compilerOptions.target,
|
|
109893
|
-
sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
|
|
109894
|
-
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
109895
|
-
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
109896
|
-
onlyPrintJsDocStyle: true,
|
|
109897
|
-
omitBraceSourceMapPositions: true,
|
|
109898
|
-
writeBundleFileInfo: !!bundleBuildInfo,
|
|
109899
|
-
recordInternalSection: !!bundleBuildInfo,
|
|
109900
|
-
relativeToBuildInfo
|
|
109901
|
-
};
|
|
109902
|
-
const declarationPrinter = createPrinter(printerOptions, {
|
|
109903
|
-
// resolver hooks
|
|
109904
|
-
hasGlobalName: resolver.hasGlobalName,
|
|
109905
|
-
// transform hooks
|
|
109906
|
-
onEmitNode: declarationTransform.emitNodeWithNotification,
|
|
109907
|
-
isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled,
|
|
109908
|
-
substituteNode: declarationTransform.substituteNode
|
|
109909
|
-
});
|
|
109910
110039
|
const declBlocked = !!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit;
|
|
109911
110040
|
emitSkipped = emitSkipped || declBlocked;
|
|
109912
110041
|
if (!declBlocked || forceDtsEmit) {
|
|
109913
110042
|
Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform");
|
|
110043
|
+
const printerOptions = {
|
|
110044
|
+
removeComments: compilerOptions.removeComments,
|
|
110045
|
+
newLine: compilerOptions.newLine,
|
|
110046
|
+
noEmitHelpers: true,
|
|
110047
|
+
module: compilerOptions.module,
|
|
110048
|
+
target: compilerOptions.target,
|
|
110049
|
+
sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
|
|
110050
|
+
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
110051
|
+
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
110052
|
+
onlyPrintJsDocStyle: true,
|
|
110053
|
+
omitBraceSourceMapPositions: true,
|
|
110054
|
+
writeBundleFileInfo: !!bundleBuildInfo,
|
|
110055
|
+
recordInternalSection: !!bundleBuildInfo,
|
|
110056
|
+
relativeToBuildInfo
|
|
110057
|
+
};
|
|
110058
|
+
const declarationPrinter = createPrinter(printerOptions, {
|
|
110059
|
+
// resolver hooks
|
|
110060
|
+
hasGlobalName: resolver.hasGlobalName,
|
|
110061
|
+
// transform hooks
|
|
110062
|
+
onEmitNode: declarationTransform.emitNodeWithNotification,
|
|
110063
|
+
isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled,
|
|
110064
|
+
substituteNode: declarationTransform.substituteNode
|
|
110065
|
+
});
|
|
109914
110066
|
printSourceFileOrBundle(
|
|
109915
110067
|
declarationFilePath,
|
|
109916
110068
|
declarationMapPath,
|
|
@@ -109924,10 +110076,16 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
109924
110076
|
// Explicitly do not passthru either `inline` option
|
|
109925
110077
|
}
|
|
109926
110078
|
);
|
|
110079
|
+
if (emittedFilesList) {
|
|
110080
|
+
emittedFilesList.push(declarationFilePath);
|
|
110081
|
+
if (declarationMapPath) {
|
|
110082
|
+
emittedFilesList.push(declarationMapPath);
|
|
110083
|
+
}
|
|
110084
|
+
}
|
|
110085
|
+
if (bundleBuildInfo)
|
|
110086
|
+
bundleBuildInfo.dts = declarationPrinter.bundleFileInfo;
|
|
109927
110087
|
}
|
|
109928
110088
|
declarationTransform.dispose();
|
|
109929
|
-
if (bundleBuildInfo)
|
|
109930
|
-
bundleBuildInfo.dts = declarationPrinter.bundleFileInfo;
|
|
109931
110089
|
}
|
|
109932
110090
|
function collectLinkedAliases(node) {
|
|
109933
110091
|
if (isExportAssignment(node)) {
|
|
@@ -119977,6 +120135,7 @@ function createBuilderProgramState(newProgram, oldState) {
|
|
|
119977
120135
|
const copyDeclarationFileDiagnostics = canCopySemanticDiagnostics && !compilerOptions.skipLibCheck === !oldCompilerOptions.skipLibCheck;
|
|
119978
120136
|
const copyLibFileDiagnostics = copyDeclarationFileDiagnostics && !compilerOptions.skipDefaultLibCheck === !oldCompilerOptions.skipDefaultLibCheck;
|
|
119979
120137
|
state.fileInfos.forEach((info, sourceFilePath) => {
|
|
120138
|
+
var _a2;
|
|
119980
120139
|
let oldInfo;
|
|
119981
120140
|
let newReferences;
|
|
119982
120141
|
if (!useOldState || // File wasn't present in old state
|
|
@@ -119986,22 +120145,28 @@ function createBuilderProgramState(newProgram, oldState) {
|
|
|
119986
120145
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program
|
|
119987
120146
|
newReferences && forEachKey(newReferences, (path) => !state.fileInfos.has(path) && oldState.fileInfos.has(path))) {
|
|
119988
120147
|
addFileToChangeSet(state, sourceFilePath);
|
|
119989
|
-
} else
|
|
120148
|
+
} else {
|
|
119990
120149
|
const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
|
|
119991
|
-
|
|
119992
|
-
|
|
119993
|
-
|
|
119994
|
-
return;
|
|
119995
|
-
const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
|
|
119996
|
-
if (diagnostics) {
|
|
119997
|
-
state.semanticDiagnosticsPerFile.set(
|
|
120150
|
+
const emitDiagnostics = (_a2 = oldState.emitDiagnosticsPerFile) == null ? void 0 : _a2.get(sourceFilePath);
|
|
120151
|
+
if (emitDiagnostics) {
|
|
120152
|
+
(state.emitDiagnosticsPerFile ?? (state.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(
|
|
119998
120153
|
sourceFilePath,
|
|
119999
|
-
oldState.hasReusableDiagnostic ? convertToDiagnostics(
|
|
120154
|
+
oldState.hasReusableDiagnostic ? convertToDiagnostics(emitDiagnostics, newProgram) : repopulateDiagnostics(emitDiagnostics, newProgram)
|
|
120000
120155
|
);
|
|
120001
|
-
|
|
120002
|
-
|
|
120156
|
+
}
|
|
120157
|
+
if (canCopySemanticDiagnostics) {
|
|
120158
|
+
if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics)
|
|
120159
|
+
return;
|
|
120160
|
+
if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics)
|
|
120161
|
+
return;
|
|
120162
|
+
const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
|
|
120163
|
+
if (diagnostics) {
|
|
120164
|
+
state.semanticDiagnosticsPerFile.set(
|
|
120165
|
+
sourceFilePath,
|
|
120166
|
+
oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram) : repopulateDiagnostics(diagnostics, newProgram)
|
|
120167
|
+
);
|
|
120168
|
+
(state.semanticDiagnosticsFromOldState ?? (state.semanticDiagnosticsFromOldState = /* @__PURE__ */ new Set())).add(sourceFilePath);
|
|
120003
120169
|
}
|
|
120004
|
-
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
120005
120170
|
}
|
|
120006
120171
|
}
|
|
120007
120172
|
if (canCopyEmitSignatures) {
|
|
@@ -120138,7 +120303,9 @@ function backupBuilderProgramEmitState(state) {
|
|
|
120138
120303
|
outSignature: state.outSignature,
|
|
120139
120304
|
latestChangedDtsFile: state.latestChangedDtsFile,
|
|
120140
120305
|
hasChangedEmitSignature: state.hasChangedEmitSignature,
|
|
120141
|
-
changedFilesSet: outFilePath ? new Set(state.changedFilesSet) : void 0
|
|
120306
|
+
changedFilesSet: outFilePath ? new Set(state.changedFilesSet) : void 0,
|
|
120307
|
+
buildInfoEmitPending: state.buildInfoEmitPending,
|
|
120308
|
+
emitDiagnosticsPerFile: state.emitDiagnosticsPerFile && new Map(state.emitDiagnosticsPerFile)
|
|
120142
120309
|
};
|
|
120143
120310
|
}
|
|
120144
120311
|
function restoreBuilderProgramEmitState(state, savedEmitState) {
|
|
@@ -120149,6 +120316,8 @@ function restoreBuilderProgramEmitState(state, savedEmitState) {
|
|
|
120149
120316
|
state.outSignature = savedEmitState.outSignature;
|
|
120150
120317
|
state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile;
|
|
120151
120318
|
state.hasChangedEmitSignature = savedEmitState.hasChangedEmitSignature;
|
|
120319
|
+
state.buildInfoEmitPending = savedEmitState.buildInfoEmitPending;
|
|
120320
|
+
state.emitDiagnosticsPerFile = savedEmitState.emitDiagnosticsPerFile;
|
|
120152
120321
|
if (savedEmitState.changedFilesSet)
|
|
120153
120322
|
state.changedFilesSet = savedEmitState.changedFilesSet;
|
|
120154
120323
|
}
|
|
@@ -120239,6 +120408,22 @@ function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) {
|
|
|
120239
120408
|
return { affectedFile, emitKind: pendingKind };
|
|
120240
120409
|
});
|
|
120241
120410
|
}
|
|
120411
|
+
function getNextPendingEmitDiagnosticsFile(state) {
|
|
120412
|
+
var _a;
|
|
120413
|
+
if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size))
|
|
120414
|
+
return void 0;
|
|
120415
|
+
return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path) => {
|
|
120416
|
+
var _a2;
|
|
120417
|
+
const affectedFile = state.program.getSourceFileByPath(path);
|
|
120418
|
+
if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
|
|
120419
|
+
state.emitDiagnosticsPerFile.delete(path);
|
|
120420
|
+
return void 0;
|
|
120421
|
+
}
|
|
120422
|
+
const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0 /* None */;
|
|
120423
|
+
if (!(seenKind & 24 /* AllDts */))
|
|
120424
|
+
return { affectedFile, diagnostics, seenKind };
|
|
120425
|
+
});
|
|
120426
|
+
}
|
|
120242
120427
|
function removeDiagnosticsOfLibraryFiles(state) {
|
|
120243
120428
|
if (!state.cleanedDiagnosticsOfLibFiles) {
|
|
120244
120429
|
state.cleanedDiagnosticsOfLibFiles = true;
|
|
@@ -120515,18 +120700,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
120515
120700
|
return void 0;
|
|
120516
120701
|
});
|
|
120517
120702
|
}
|
|
120518
|
-
|
|
120519
|
-
if (state.semanticDiagnosticsPerFile) {
|
|
120520
|
-
for (const key of arrayFrom(state.semanticDiagnosticsPerFile.keys()).sort(compareStringsCaseSensitive)) {
|
|
120521
|
-
const value = state.semanticDiagnosticsPerFile.get(key);
|
|
120522
|
-
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(
|
|
120523
|
-
value.length ? [
|
|
120524
|
-
toFileId(key),
|
|
120525
|
-
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
120526
|
-
] : toFileId(key)
|
|
120527
|
-
);
|
|
120528
|
-
}
|
|
120529
|
-
}
|
|
120703
|
+
const semanticDiagnosticsPerFile = convertToProgramBuildInfoDiagnostics(state.semanticDiagnosticsPerFile);
|
|
120530
120704
|
let affectedFilesPendingEmit;
|
|
120531
120705
|
if ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.size) {
|
|
120532
120706
|
const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
|
|
@@ -120556,6 +120730,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
120556
120730
|
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
120557
120731
|
}
|
|
120558
120732
|
}
|
|
120733
|
+
const emitDiagnosticsPerFile = convertToProgramBuildInfoDiagnostics(state.emitDiagnosticsPerFile);
|
|
120559
120734
|
const program = {
|
|
120560
120735
|
fileNames,
|
|
120561
120736
|
fileInfos,
|
|
@@ -120565,6 +120740,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
120565
120740
|
referencedMap,
|
|
120566
120741
|
exportedModulesMap,
|
|
120567
120742
|
semanticDiagnosticsPerFile,
|
|
120743
|
+
emitDiagnosticsPerFile,
|
|
120568
120744
|
affectedFilesPendingEmit,
|
|
120569
120745
|
changeFileSet,
|
|
120570
120746
|
emitSignatures,
|
|
@@ -120621,73 +120797,87 @@ function getBuildInfo2(state, bundle) {
|
|
|
120621
120797
|
if (optionInfo == null ? void 0 : optionInfo.affectsBuildInfo) {
|
|
120622
120798
|
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(
|
|
120623
120799
|
optionInfo,
|
|
120624
|
-
options[name]
|
|
120625
|
-
relativeToBuildInfoEnsuringAbsolutePath
|
|
120800
|
+
options[name]
|
|
120626
120801
|
);
|
|
120627
120802
|
}
|
|
120628
120803
|
}
|
|
120629
120804
|
return result;
|
|
120630
120805
|
}
|
|
120631
|
-
|
|
120632
|
-
|
|
120633
|
-
|
|
120634
|
-
|
|
120635
|
-
|
|
120636
|
-
|
|
120637
|
-
|
|
120638
|
-
|
|
120806
|
+
function convertToReusableCompilerOptionValue(option, value) {
|
|
120807
|
+
if (option) {
|
|
120808
|
+
Debug.assert(option.type !== "listOrElement");
|
|
120809
|
+
if (option.type === "list") {
|
|
120810
|
+
const values = value;
|
|
120811
|
+
if (option.element.isFilePath && values.length) {
|
|
120812
|
+
return values.map(relativeToBuildInfoEnsuringAbsolutePath);
|
|
120813
|
+
}
|
|
120814
|
+
} else if (option.isFilePath) {
|
|
120815
|
+
return relativeToBuildInfoEnsuringAbsolutePath(value);
|
|
120639
120816
|
}
|
|
120640
|
-
} else if (option.isFilePath) {
|
|
120641
|
-
return relativeToBuildInfo(value);
|
|
120642
120817
|
}
|
|
120818
|
+
return value;
|
|
120643
120819
|
}
|
|
120644
|
-
|
|
120645
|
-
|
|
120646
|
-
|
|
120647
|
-
|
|
120648
|
-
|
|
120649
|
-
|
|
120650
|
-
|
|
120651
|
-
|
|
120652
|
-
|
|
120653
|
-
|
|
120654
|
-
|
|
120655
|
-
|
|
120820
|
+
function convertToProgramBuildInfoDiagnostics(diagnostics) {
|
|
120821
|
+
let result;
|
|
120822
|
+
if (diagnostics) {
|
|
120823
|
+
for (const key of arrayFrom(diagnostics.keys()).sort(compareStringsCaseSensitive)) {
|
|
120824
|
+
const value = diagnostics.get(key);
|
|
120825
|
+
(result || (result = [])).push(
|
|
120826
|
+
value.length ? [
|
|
120827
|
+
toFileId(key),
|
|
120828
|
+
convertToReusableDiagnostics(value)
|
|
120829
|
+
] : toFileId(key)
|
|
120830
|
+
);
|
|
120831
|
+
}
|
|
120832
|
+
}
|
|
120656
120833
|
return result;
|
|
120657
|
-
}
|
|
120658
|
-
|
|
120659
|
-
|
|
120660
|
-
|
|
120661
|
-
|
|
120662
|
-
|
|
120663
|
-
|
|
120664
|
-
|
|
120665
|
-
|
|
120666
|
-
}
|
|
120667
|
-
|
|
120668
|
-
|
|
120834
|
+
}
|
|
120835
|
+
function convertToReusableDiagnostics(diagnostics) {
|
|
120836
|
+
Debug.assert(!!diagnostics.length);
|
|
120837
|
+
return diagnostics.map((diagnostic) => {
|
|
120838
|
+
const result = convertToReusableDiagnosticRelatedInformation(diagnostic);
|
|
120839
|
+
result.reportsUnnecessary = diagnostic.reportsUnnecessary;
|
|
120840
|
+
result.reportDeprecated = diagnostic.reportsDeprecated;
|
|
120841
|
+
result.source = diagnostic.source;
|
|
120842
|
+
result.skippedOn = diagnostic.skippedOn;
|
|
120843
|
+
const { relatedInformation } = diagnostic;
|
|
120844
|
+
result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToReusableDiagnosticRelatedInformation(r)) : [] : void 0;
|
|
120845
|
+
return result;
|
|
120846
|
+
});
|
|
120847
|
+
}
|
|
120848
|
+
function convertToReusableDiagnosticRelatedInformation(diagnostic) {
|
|
120849
|
+
const { file } = diagnostic;
|
|
120669
120850
|
return {
|
|
120670
|
-
|
|
120671
|
-
|
|
120851
|
+
...diagnostic,
|
|
120852
|
+
file: file ? relativeToBuildInfo(file.resolvedPath) : void 0,
|
|
120853
|
+
messageText: isString(diagnostic.messageText) ? diagnostic.messageText : convertToReusableDiagnosticMessageChain(diagnostic.messageText)
|
|
120672
120854
|
};
|
|
120673
120855
|
}
|
|
120674
|
-
|
|
120675
|
-
|
|
120676
|
-
|
|
120677
|
-
|
|
120678
|
-
|
|
120679
|
-
|
|
120680
|
-
return forEach(array, (chain, index) => {
|
|
120681
|
-
const reusable = convertToReusableDiagnosticMessageChain(chain);
|
|
120682
|
-
if (chain === reusable)
|
|
120683
|
-
return void 0;
|
|
120684
|
-
const result = index > 0 ? array.slice(0, index - 1) : [];
|
|
120685
|
-
result.push(reusable);
|
|
120686
|
-
for (let i = index + 1; i < array.length; i++) {
|
|
120687
|
-
result.push(convertToReusableDiagnosticMessageChain(array[i]));
|
|
120856
|
+
function convertToReusableDiagnosticMessageChain(chain) {
|
|
120857
|
+
if (chain.repopulateInfo) {
|
|
120858
|
+
return {
|
|
120859
|
+
info: chain.repopulateInfo(),
|
|
120860
|
+
next: convertToReusableDiagnosticMessageChainArray(chain.next)
|
|
120861
|
+
};
|
|
120688
120862
|
}
|
|
120689
|
-
|
|
120690
|
-
|
|
120863
|
+
const next = convertToReusableDiagnosticMessageChainArray(chain.next);
|
|
120864
|
+
return next === chain.next ? chain : { ...chain, next };
|
|
120865
|
+
}
|
|
120866
|
+
function convertToReusableDiagnosticMessageChainArray(array) {
|
|
120867
|
+
if (!array)
|
|
120868
|
+
return array;
|
|
120869
|
+
return forEach(array, (chain, index) => {
|
|
120870
|
+
const reusable = convertToReusableDiagnosticMessageChain(chain);
|
|
120871
|
+
if (chain === reusable)
|
|
120872
|
+
return void 0;
|
|
120873
|
+
const result = index > 0 ? array.slice(0, index - 1) : [];
|
|
120874
|
+
result.push(reusable);
|
|
120875
|
+
for (let i = index + 1; i < array.length; i++) {
|
|
120876
|
+
result.push(convertToReusableDiagnosticMessageChain(array[i]));
|
|
120877
|
+
}
|
|
120878
|
+
return result;
|
|
120879
|
+
}) || array;
|
|
120880
|
+
}
|
|
120691
120881
|
}
|
|
120692
120882
|
function getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) {
|
|
120693
120883
|
let host;
|
|
@@ -120796,6 +120986,14 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
|
|
|
120796
120986
|
if (!outFile(state.compilerOptions)) {
|
|
120797
120987
|
const pendingAffectedFile = getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles);
|
|
120798
120988
|
if (!pendingAffectedFile) {
|
|
120989
|
+
const pendingForDiagnostics = getNextPendingEmitDiagnosticsFile(state);
|
|
120990
|
+
if (pendingForDiagnostics) {
|
|
120991
|
+
(state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(pendingForDiagnostics.affectedFile.resolvedPath, pendingForDiagnostics.seenKind | 24 /* AllDts */);
|
|
120992
|
+
return {
|
|
120993
|
+
result: { emitSkipped: true, diagnostics: pendingForDiagnostics.diagnostics },
|
|
120994
|
+
affected: pendingForDiagnostics.affectedFile
|
|
120995
|
+
};
|
|
120996
|
+
}
|
|
120799
120997
|
if (!state.buildInfoEmitPending)
|
|
120800
120998
|
return void 0;
|
|
120801
120999
|
const affected2 = state.program;
|
|
@@ -120844,6 +121042,8 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
|
|
|
120844
121042
|
(state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, pendingKind);
|
|
120845
121043
|
else
|
|
120846
121044
|
(_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.delete(affectedSourceFile.resolvedPath);
|
|
121045
|
+
if (result.diagnostics.length)
|
|
121046
|
+
(state.emitDiagnosticsPerFile ?? (state.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, result.diagnostics);
|
|
120847
121047
|
} else {
|
|
120848
121048
|
state.changedFilesSet.clear();
|
|
120849
121049
|
}
|
|
@@ -121016,9 +121216,10 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
|
|
|
121016
121216
|
}
|
|
121017
121217
|
}
|
|
121018
121218
|
function addToAffectedFilesPendingEmit(state, affectedFilePendingEmit, kind) {
|
|
121019
|
-
var _a;
|
|
121219
|
+
var _a, _b;
|
|
121020
121220
|
const existingKind = ((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.get(affectedFilePendingEmit)) || 0 /* None */;
|
|
121021
121221
|
(state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedFilePendingEmit, existingKind | kind);
|
|
121222
|
+
(_b = state.emitDiagnosticsPerFile) == null ? void 0 : _b.delete(affectedFilePendingEmit);
|
|
121022
121223
|
}
|
|
121023
121224
|
function toBuilderStateFileInfoForMultiEmit(fileInfo) {
|
|
121024
121225
|
return isString(fileInfo) ? { version: fileInfo, signature: fileInfo, affectsGlobalScope: void 0, impliedFormat: void 0 } : isString(fileInfo.signature) ? fileInfo : { version: fileInfo.version, signature: fileInfo.signature === false ? void 0 : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
@@ -121083,7 +121284,8 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos
|
|
|
121083
121284
|
compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
121084
121285
|
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
121085
121286
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
121086
|
-
semanticDiagnosticsPerFile:
|
|
121287
|
+
semanticDiagnosticsPerFile: toPerFileDiagnostics(program.semanticDiagnosticsPerFile),
|
|
121288
|
+
emitDiagnosticsPerFile: toPerFileDiagnostics(program.emitDiagnosticsPerFile),
|
|
121087
121289
|
hasReusableDiagnostic: true,
|
|
121088
121290
|
affectedFilesPendingEmit: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)),
|
|
121089
121291
|
changedFilesSet: new Set(map(program.changeFileSet, toFilePath)),
|
|
@@ -121136,6 +121338,9 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos
|
|
|
121136
121338
|
referenceMap.forEach(([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId)));
|
|
121137
121339
|
return map2;
|
|
121138
121340
|
}
|
|
121341
|
+
function toPerFileDiagnostics(diagnostics) {
|
|
121342
|
+
return diagnostics && arrayToMap(diagnostics, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => isNumber(value) ? emptyArray : value[1]);
|
|
121343
|
+
}
|
|
121139
121344
|
}
|
|
121140
121345
|
function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
121141
121346
|
const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -124720,7 +124925,7 @@ function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime,
|
|
|
124720
124925
|
}
|
|
124721
124926
|
}
|
|
124722
124927
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
124723
|
-
var _a, _b;
|
|
124928
|
+
var _a, _b, _c;
|
|
124724
124929
|
if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
|
|
124725
124930
|
return {
|
|
124726
124931
|
type: 16 /* ContainerOnly */
|
|
@@ -124794,7 +124999,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
124794
124999
|
};
|
|
124795
125000
|
}
|
|
124796
125001
|
if (buildInfo.program) {
|
|
124797
|
-
if (((_a = buildInfo.program.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? (_b = buildInfo.program.affectedFilesPendingEmit) == null ? void 0 : _b.length : some(buildInfo.program.semanticDiagnosticsPerFile, isArray))) {
|
|
125002
|
+
if (((_a = buildInfo.program.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? ((_b = buildInfo.program.affectedFilesPendingEmit) == null ? void 0 : _b.length) || ((_c = buildInfo.program.emitDiagnosticsPerFile) == null ? void 0 : _c.length) : some(buildInfo.program.semanticDiagnosticsPerFile, isArray))) {
|
|
124798
125003
|
return {
|
|
124799
125004
|
type: 8 /* OutOfDateBuildInfo */,
|
|
124800
125005
|
buildInfoFile: buildInfoPath
|
|
@@ -125861,7 +126066,10 @@ function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight)
|
|
|
125861
126066
|
default:
|
|
125862
126067
|
const inverted = {};
|
|
125863
126068
|
option3.type.forEach((value, name2) => {
|
|
125864
|
-
|
|
126069
|
+
var _a2;
|
|
126070
|
+
if (!((_a2 = option3.deprecatedKeys) == null ? void 0 : _a2.has(name2))) {
|
|
126071
|
+
(inverted[value] || (inverted[value] = [])).push(name2);
|
|
126072
|
+
}
|
|
125865
126073
|
});
|
|
125866
126074
|
return Object.entries(inverted).map(([, synonyms]) => synonyms.join("/")).join(", ");
|
|
125867
126075
|
}
|