@schematics/angular 15.0.4 → 15.0.5
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/README.md +12 -12
- package/class/schema.d.ts +1 -1
- package/class/schema.json +1 -1
- package/component/schema.d.ts +1 -1
- package/component/schema.json +1 -1
- package/directive/schema.d.ts +1 -1
- package/directive/schema.json +1 -1
- package/e2e/schema.d.ts +1 -1
- package/e2e/schema.json +1 -1
- package/enum/schema.d.ts +1 -1
- package/enum/schema.json +1 -1
- package/guard/schema.d.ts +1 -1
- package/guard/schema.json +1 -1
- package/interceptor/schema.d.ts +1 -1
- package/interceptor/schema.json +1 -1
- package/interface/schema.d.ts +1 -1
- package/interface/schema.json +1 -1
- package/module/schema.d.ts +1 -1
- package/module/schema.json +1 -1
- package/package.json +3 -3
- package/pipe/schema.d.ts +1 -1
- package/pipe/schema.json +1 -1
- package/resolver/schema.d.ts +1 -1
- package/resolver/schema.json +1 -1
- package/service/schema.d.ts +1 -1
- package/service/schema.json +1 -1
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +795 -795
- package/web-worker/schema.d.ts +1 -1
- package/web-worker/schema.json +1 -1
|
@@ -6529,7 +6529,7 @@ var ts;
|
|
|
6529
6529
|
fileCallback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
6530
6530
|
}
|
|
6531
6531
|
}
|
|
6532
|
-
},
|
|
6532
|
+
},
|
|
6533
6533
|
/*recursive*/ false, PollingInterval.Medium, fallbackOptions);
|
|
6534
6534
|
watcher.referenceCount = 0;
|
|
6535
6535
|
dirWatchers.set(dirPath, watcher);
|
|
@@ -6919,7 +6919,7 @@ var ts;
|
|
|
6919
6919
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
6920
6920
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, /* pollingInterval */ undefined, /*options*/ undefined);
|
|
6921
6921
|
case ts.WatchFileKind.UseFsEvents:
|
|
6922
|
-
return fsWatch(fileName, 0 /* FileSystemEntryKind.File */, createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime),
|
|
6922
|
+
return fsWatch(fileName, 0 /* FileSystemEntryKind.File */, createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime),
|
|
6923
6923
|
/*recursive*/ false, pollingInterval, ts.getFallbackOptions(options));
|
|
6924
6924
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
6925
6925
|
if (!nonPollingWatchFile) {
|
|
@@ -6996,14 +6996,14 @@ var ts;
|
|
|
6996
6996
|
var watchDirectoryKind = ts.Debug.checkDefined(watchDirectoryOptions.watchDirectory);
|
|
6997
6997
|
switch (watchDirectoryKind) {
|
|
6998
6998
|
case ts.WatchDirectoryKind.FixedPollingInterval:
|
|
6999
|
-
return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium,
|
|
6999
|
+
return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium,
|
|
7000
7000
|
/*options*/ undefined);
|
|
7001
7001
|
case ts.WatchDirectoryKind.DynamicPriorityPolling:
|
|
7002
|
-
return ensureDynamicPollingWatchFile()(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium,
|
|
7002
|
+
return ensureDynamicPollingWatchFile()(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium,
|
|
7003
7003
|
/*options*/ undefined);
|
|
7004
7004
|
case ts.WatchDirectoryKind.FixedChunkSizePolling:
|
|
7005
|
-
return ensureFixedChunkSizePollingWatchFile()(directoryName, function () { return callback(directoryName); },
|
|
7006
|
-
/* pollingInterval */ undefined,
|
|
7005
|
+
return ensureFixedChunkSizePollingWatchFile()(directoryName, function () { return callback(directoryName); },
|
|
7006
|
+
/* pollingInterval */ undefined,
|
|
7007
7007
|
/*options*/ undefined);
|
|
7008
7008
|
case ts.WatchDirectoryKind.UseFsEvents:
|
|
7009
7009
|
return fsWatch(directoryName, 1 /* FileSystemEntryKind.Directory */, createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), recursive, PollingInterval.Medium, ts.getFallbackOptions(watchDirectoryOptions));
|
|
@@ -14987,8 +14987,8 @@ var ts;
|
|
|
14987
14987
|
if (node.kind === 348 /* SyntaxKind.SyntaxList */ && node._children.length > 0) {
|
|
14988
14988
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
14989
14989
|
}
|
|
14990
|
-
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos,
|
|
14991
|
-
/*stopAfterLineBreak*/ false,
|
|
14990
|
+
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos,
|
|
14991
|
+
/*stopAfterLineBreak*/ false,
|
|
14992
14992
|
/*stopAtComments*/ false, isInJSDoc(node));
|
|
14993
14993
|
}
|
|
14994
14994
|
ts.getTokenPosOfNode = getTokenPosOfNode;
|
|
@@ -23625,9 +23625,9 @@ var ts;
|
|
|
23625
23625
|
}
|
|
23626
23626
|
// @api
|
|
23627
23627
|
function createClassStaticBlockDeclaration(body) {
|
|
23628
|
-
var node = createBaseGenericNamedDeclaration(170 /* SyntaxKind.ClassStaticBlockDeclaration */,
|
|
23629
|
-
/*modifiers*/ undefined,
|
|
23630
|
-
/*name*/ undefined,
|
|
23628
|
+
var node = createBaseGenericNamedDeclaration(170 /* SyntaxKind.ClassStaticBlockDeclaration */,
|
|
23629
|
+
/*modifiers*/ undefined,
|
|
23630
|
+
/*name*/ undefined,
|
|
23631
23631
|
/*typeParameters*/ undefined);
|
|
23632
23632
|
node.body = body;
|
|
23633
23633
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* TransformFlags.ContainsClassFields */;
|
|
@@ -23651,9 +23651,9 @@ var ts;
|
|
|
23651
23651
|
}
|
|
23652
23652
|
// @api
|
|
23653
23653
|
function createConstructorDeclaration(modifiers, parameters, body) {
|
|
23654
|
-
var node = createBaseFunctionLikeDeclaration(171 /* SyntaxKind.Constructor */, modifiers,
|
|
23655
|
-
/*name*/ undefined,
|
|
23656
|
-
/*typeParameters*/ undefined, parameters,
|
|
23654
|
+
var node = createBaseFunctionLikeDeclaration(171 /* SyntaxKind.Constructor */, modifiers,
|
|
23655
|
+
/*name*/ undefined,
|
|
23656
|
+
/*typeParameters*/ undefined, parameters,
|
|
23657
23657
|
/*type*/ undefined, body);
|
|
23658
23658
|
node.transformFlags |= 1024 /* TransformFlags.ContainsES2015 */;
|
|
23659
23659
|
// The following properties are used only to report grammar errors
|
|
@@ -23680,7 +23680,7 @@ var ts;
|
|
|
23680
23680
|
}
|
|
23681
23681
|
// @api
|
|
23682
23682
|
function createGetAccessorDeclaration(modifiers, name, parameters, type, body) {
|
|
23683
|
-
var node = createBaseFunctionLikeDeclaration(172 /* SyntaxKind.GetAccessor */, modifiers, name,
|
|
23683
|
+
var node = createBaseFunctionLikeDeclaration(172 /* SyntaxKind.GetAccessor */, modifiers, name,
|
|
23684
23684
|
/*typeParameters*/ undefined, parameters, type, body);
|
|
23685
23685
|
// The following properties are used only to report grammar errors
|
|
23686
23686
|
node.typeParameters = undefined;
|
|
@@ -23704,8 +23704,8 @@ var ts;
|
|
|
23704
23704
|
}
|
|
23705
23705
|
// @api
|
|
23706
23706
|
function createSetAccessorDeclaration(modifiers, name, parameters, body) {
|
|
23707
|
-
var node = createBaseFunctionLikeDeclaration(173 /* SyntaxKind.SetAccessor */, modifiers, name,
|
|
23708
|
-
/*typeParameters*/ undefined, parameters,
|
|
23707
|
+
var node = createBaseFunctionLikeDeclaration(173 /* SyntaxKind.SetAccessor */, modifiers, name,
|
|
23708
|
+
/*typeParameters*/ undefined, parameters,
|
|
23709
23709
|
/*type*/ undefined, body);
|
|
23710
23710
|
// The following properties are used only to report grammar errors
|
|
23711
23711
|
node.typeParameters = undefined;
|
|
@@ -23730,8 +23730,8 @@ var ts;
|
|
|
23730
23730
|
}
|
|
23731
23731
|
// @api
|
|
23732
23732
|
function createCallSignature(typeParameters, parameters, type) {
|
|
23733
|
-
var node = createBaseSignatureDeclaration(174 /* SyntaxKind.CallSignature */,
|
|
23734
|
-
/*modifiers*/ undefined,
|
|
23733
|
+
var node = createBaseSignatureDeclaration(174 /* SyntaxKind.CallSignature */,
|
|
23734
|
+
/*modifiers*/ undefined,
|
|
23735
23735
|
/*name*/ undefined, typeParameters, parameters, type);
|
|
23736
23736
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
23737
23737
|
return node;
|
|
@@ -23746,8 +23746,8 @@ var ts;
|
|
|
23746
23746
|
}
|
|
23747
23747
|
// @api
|
|
23748
23748
|
function createConstructSignature(typeParameters, parameters, type) {
|
|
23749
|
-
var node = createBaseSignatureDeclaration(175 /* SyntaxKind.ConstructSignature */,
|
|
23750
|
-
/*modifiers*/ undefined,
|
|
23749
|
+
var node = createBaseSignatureDeclaration(175 /* SyntaxKind.ConstructSignature */,
|
|
23750
|
+
/*modifiers*/ undefined,
|
|
23751
23751
|
/*name*/ undefined, typeParameters, parameters, type);
|
|
23752
23752
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
23753
23753
|
return node;
|
|
@@ -23762,8 +23762,8 @@ var ts;
|
|
|
23762
23762
|
}
|
|
23763
23763
|
// @api
|
|
23764
23764
|
function createIndexSignature(modifiers, parameters, type) {
|
|
23765
|
-
var node = createBaseSignatureDeclaration(176 /* SyntaxKind.IndexSignature */, modifiers,
|
|
23766
|
-
/*name*/ undefined,
|
|
23765
|
+
var node = createBaseSignatureDeclaration(176 /* SyntaxKind.IndexSignature */, modifiers,
|
|
23766
|
+
/*name*/ undefined,
|
|
23767
23767
|
/*typeParameters*/ undefined, parameters, type);
|
|
23768
23768
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
23769
23769
|
return node;
|
|
@@ -23832,8 +23832,8 @@ var ts;
|
|
|
23832
23832
|
}
|
|
23833
23833
|
// @api
|
|
23834
23834
|
function createFunctionTypeNode(typeParameters, parameters, type) {
|
|
23835
|
-
var node = createBaseSignatureDeclaration(179 /* SyntaxKind.FunctionType */,
|
|
23836
|
-
/*modifiers*/ undefined,
|
|
23835
|
+
var node = createBaseSignatureDeclaration(179 /* SyntaxKind.FunctionType */,
|
|
23836
|
+
/*modifiers*/ undefined,
|
|
23837
23837
|
/*name*/ undefined, typeParameters, parameters, type);
|
|
23838
23838
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
23839
23839
|
// The following properties are used only to report grammar errors
|
|
@@ -23865,7 +23865,7 @@ var ts;
|
|
|
23865
23865
|
ts.Debug.fail("Incorrect number of arguments specified.");
|
|
23866
23866
|
}
|
|
23867
23867
|
function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {
|
|
23868
|
-
var node = createBaseSignatureDeclaration(180 /* SyntaxKind.ConstructorType */, modifiers,
|
|
23868
|
+
var node = createBaseSignatureDeclaration(180 /* SyntaxKind.ConstructorType */, modifiers,
|
|
23869
23869
|
/*name*/ undefined, typeParameters, parameters, type);
|
|
23870
23870
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
23871
23871
|
return node;
|
|
@@ -24220,7 +24220,7 @@ var ts;
|
|
|
24220
24220
|
}
|
|
24221
24221
|
// @api
|
|
24222
24222
|
function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
|
|
24223
|
-
var node = createBaseBindingLikeDeclaration(203 /* SyntaxKind.BindingElement */,
|
|
24223
|
+
var node = createBaseBindingLikeDeclaration(203 /* SyntaxKind.BindingElement */,
|
|
24224
24224
|
/*modifiers*/ undefined, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
24225
24225
|
node.propertyName = asName(propertyName);
|
|
24226
24226
|
node.dotDotDotToken = dotDotDotToken;
|
|
@@ -24575,7 +24575,7 @@ var ts;
|
|
|
24575
24575
|
}
|
|
24576
24576
|
// @api
|
|
24577
24577
|
function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
24578
|
-
var node = createBaseFunctionLikeDeclaration(214 /* SyntaxKind.ArrowFunction */, modifiers,
|
|
24578
|
+
var node = createBaseFunctionLikeDeclaration(214 /* SyntaxKind.ArrowFunction */, modifiers,
|
|
24579
24579
|
/*name*/ undefined, typeParameters, parameters, type, parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body));
|
|
24580
24580
|
node.equalsGreaterThanToken = equalsGreaterThanToken !== null && equalsGreaterThanToken !== void 0 ? equalsGreaterThanToken : createToken(38 /* SyntaxKind.EqualsGreaterThanToken */);
|
|
24581
24581
|
node.transformFlags |=
|
|
@@ -25356,7 +25356,7 @@ var ts;
|
|
|
25356
25356
|
}
|
|
25357
25357
|
// @api
|
|
25358
25358
|
function createVariableDeclaration(name, exclamationToken, type, initializer) {
|
|
25359
|
-
var node = createBaseVariableLikeDeclaration(254 /* SyntaxKind.VariableDeclaration */,
|
|
25359
|
+
var node = createBaseVariableLikeDeclaration(254 /* SyntaxKind.VariableDeclaration */,
|
|
25360
25360
|
/*modifiers*/ undefined, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
25361
25361
|
node.exclamationToken = exclamationToken;
|
|
25362
25362
|
node.transformFlags |= propagateChildFlags(node.exclamationToken);
|
|
@@ -25606,7 +25606,7 @@ var ts;
|
|
|
25606
25606
|
}
|
|
25607
25607
|
// @api
|
|
25608
25608
|
function createNamespaceExportDeclaration(name) {
|
|
25609
|
-
var node = createBaseNamedDeclaration(264 /* SyntaxKind.NamespaceExportDeclaration */,
|
|
25609
|
+
var node = createBaseNamedDeclaration(264 /* SyntaxKind.NamespaceExportDeclaration */,
|
|
25610
25610
|
/*modifiers*/ undefined, name);
|
|
25611
25611
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
25612
25612
|
// The following properties are used only to report grammar errors
|
|
@@ -25978,9 +25978,9 @@ var ts;
|
|
|
25978
25978
|
}
|
|
25979
25979
|
// @api
|
|
25980
25980
|
function createJSDocFunctionType(parameters, type) {
|
|
25981
|
-
var node = createBaseSignatureDeclaration(317 /* SyntaxKind.JSDocFunctionType */,
|
|
25982
|
-
/*modifiers*/ undefined,
|
|
25983
|
-
/*name*/ undefined,
|
|
25981
|
+
var node = createBaseSignatureDeclaration(317 /* SyntaxKind.JSDocFunctionType */,
|
|
25982
|
+
/*modifiers*/ undefined,
|
|
25983
|
+
/*name*/ undefined,
|
|
25984
25984
|
/*typeParameters*/ undefined, parameters, type);
|
|
25985
25985
|
return node;
|
|
25986
25986
|
}
|
|
@@ -26603,9 +26603,9 @@ var ts;
|
|
|
26603
26603
|
function createCatchClause(variableDeclaration, block) {
|
|
26604
26604
|
var node = createBaseNode(292 /* SyntaxKind.CatchClause */);
|
|
26605
26605
|
if (typeof variableDeclaration === "string" || variableDeclaration && !ts.isVariableDeclaration(variableDeclaration)) {
|
|
26606
|
-
variableDeclaration = createVariableDeclaration(variableDeclaration,
|
|
26607
|
-
/*exclamationToken*/ undefined,
|
|
26608
|
-
/*type*/ undefined,
|
|
26606
|
+
variableDeclaration = createVariableDeclaration(variableDeclaration,
|
|
26607
|
+
/*exclamationToken*/ undefined,
|
|
26608
|
+
/*type*/ undefined,
|
|
26609
26609
|
/*initializer*/ undefined);
|
|
26610
26610
|
}
|
|
26611
26611
|
node.variableDeclaration = variableDeclaration;
|
|
@@ -26629,7 +26629,7 @@ var ts;
|
|
|
26629
26629
|
//
|
|
26630
26630
|
// @api
|
|
26631
26631
|
function createPropertyAssignment(name, initializer) {
|
|
26632
|
-
var node = createBaseNamedDeclaration(296 /* SyntaxKind.PropertyAssignment */,
|
|
26632
|
+
var node = createBaseNamedDeclaration(296 /* SyntaxKind.PropertyAssignment */,
|
|
26633
26633
|
/*modifiers*/ undefined, name);
|
|
26634
26634
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
26635
26635
|
node.transformFlags |=
|
|
@@ -26661,7 +26661,7 @@ var ts;
|
|
|
26661
26661
|
}
|
|
26662
26662
|
// @api
|
|
26663
26663
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
26664
|
-
var node = createBaseNamedDeclaration(297 /* SyntaxKind.ShorthandPropertyAssignment */,
|
|
26664
|
+
var node = createBaseNamedDeclaration(297 /* SyntaxKind.ShorthandPropertyAssignment */,
|
|
26665
26665
|
/*modifiers*/ undefined, name);
|
|
26666
26666
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
26667
26667
|
node.transformFlags |=
|
|
@@ -26996,23 +26996,23 @@ var ts;
|
|
|
26996
26996
|
}
|
|
26997
26997
|
function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {
|
|
26998
26998
|
return createCallExpression(createFunctionExpression(
|
|
26999
|
-
/*modifiers*/ undefined,
|
|
27000
|
-
/*asteriskToken*/ undefined,
|
|
27001
|
-
/*name*/ undefined,
|
|
27002
|
-
/*typeParameters*/ undefined,
|
|
27003
|
-
/*parameters*/ param ? [param] : [],
|
|
27004
|
-
/*type*/ undefined, createBlock(statements, /*multiLine*/ true)),
|
|
27005
|
-
/*typeArguments*/ undefined,
|
|
26999
|
+
/*modifiers*/ undefined,
|
|
27000
|
+
/*asteriskToken*/ undefined,
|
|
27001
|
+
/*name*/ undefined,
|
|
27002
|
+
/*typeParameters*/ undefined,
|
|
27003
|
+
/*parameters*/ param ? [param] : [],
|
|
27004
|
+
/*type*/ undefined, createBlock(statements, /*multiLine*/ true)),
|
|
27005
|
+
/*typeArguments*/ undefined,
|
|
27006
27006
|
/*argumentsArray*/ paramValue ? [paramValue] : []);
|
|
27007
27007
|
}
|
|
27008
27008
|
function createImmediatelyInvokedArrowFunction(statements, param, paramValue) {
|
|
27009
27009
|
return createCallExpression(createArrowFunction(
|
|
27010
|
-
/*modifiers*/ undefined,
|
|
27011
|
-
/*typeParameters*/ undefined,
|
|
27012
|
-
/*parameters*/ param ? [param] : [],
|
|
27013
|
-
/*type*/ undefined,
|
|
27014
|
-
/*equalsGreaterThanToken*/ undefined, createBlock(statements, /*multiLine*/ true)),
|
|
27015
|
-
/*typeArguments*/ undefined,
|
|
27010
|
+
/*modifiers*/ undefined,
|
|
27011
|
+
/*typeParameters*/ undefined,
|
|
27012
|
+
/*parameters*/ param ? [param] : [],
|
|
27013
|
+
/*type*/ undefined,
|
|
27014
|
+
/*equalsGreaterThanToken*/ undefined, createBlock(statements, /*multiLine*/ true)),
|
|
27015
|
+
/*typeArguments*/ undefined,
|
|
27016
27016
|
/*argumentsArray*/ paramValue ? [paramValue] : []);
|
|
27017
27017
|
}
|
|
27018
27018
|
function createVoidZero() {
|
|
@@ -27020,12 +27020,12 @@ var ts;
|
|
|
27020
27020
|
}
|
|
27021
27021
|
function createExportDefault(expression) {
|
|
27022
27022
|
return createExportAssignment(
|
|
27023
|
-
/*modifiers*/ undefined,
|
|
27023
|
+
/*modifiers*/ undefined,
|
|
27024
27024
|
/*isExportEquals*/ false, expression);
|
|
27025
27025
|
}
|
|
27026
27026
|
function createExternalModuleExport(exportName) {
|
|
27027
27027
|
return createExportDeclaration(
|
|
27028
|
-
/*modifiers*/ undefined,
|
|
27028
|
+
/*modifiers*/ undefined,
|
|
27029
27029
|
/*isTypeOnly*/ false, createNamedExports([
|
|
27030
27030
|
createExportSpecifier(/*isTypeOnly*/ false, /*propertyName*/ undefined, exportName)
|
|
27031
27031
|
]));
|
|
@@ -27041,11 +27041,11 @@ var ts;
|
|
|
27041
27041
|
function createMethodCall(object, methodName, argumentsList) {
|
|
27042
27042
|
// Preserve the optionality of `object`.
|
|
27043
27043
|
if (ts.isCallChain(object)) {
|
|
27044
|
-
return createCallChain(createPropertyAccessChain(object, /*questionDotToken*/ undefined, methodName),
|
|
27045
|
-
/*questionDotToken*/ undefined,
|
|
27044
|
+
return createCallChain(createPropertyAccessChain(object, /*questionDotToken*/ undefined, methodName),
|
|
27045
|
+
/*questionDotToken*/ undefined,
|
|
27046
27046
|
/*typeArguments*/ undefined, argumentsList);
|
|
27047
27047
|
}
|
|
27048
|
-
return createCallExpression(createPropertyAccessExpression(object, methodName),
|
|
27048
|
+
return createCallExpression(createPropertyAccessExpression(object, methodName),
|
|
27049
27049
|
/*typeArguments*/ undefined, argumentsList);
|
|
27050
27050
|
}
|
|
27051
27051
|
function createFunctionBindCall(target, thisArg, argumentsList) {
|
|
@@ -27221,10 +27221,10 @@ var ts;
|
|
|
27221
27221
|
createParenthesizedExpression(createObjectLiteralExpression([
|
|
27222
27222
|
createSetAccessorDeclaration(
|
|
27223
27223
|
/*modifiers*/ undefined, "value", [createParameterDeclaration(
|
|
27224
|
-
/*modifiers*/ undefined,
|
|
27225
|
-
/*dotDotDotToken*/ undefined, paramName,
|
|
27226
|
-
/*questionToken*/ undefined,
|
|
27227
|
-
/*type*/ undefined,
|
|
27224
|
+
/*modifiers*/ undefined,
|
|
27225
|
+
/*dotDotDotToken*/ undefined, paramName,
|
|
27226
|
+
/*questionToken*/ undefined,
|
|
27227
|
+
/*type*/ undefined,
|
|
27228
27228
|
/*initializer*/ undefined)], createBlock([
|
|
27229
27229
|
createExpressionStatement(expression)
|
|
27230
27230
|
]))
|
|
@@ -28407,12 +28407,12 @@ var ts;
|
|
|
28407
28407
|
argumentsArray.push(descriptor);
|
|
28408
28408
|
}
|
|
28409
28409
|
}
|
|
28410
|
-
return factory.createCallExpression(getUnscopedHelperName("__decorate"),
|
|
28410
|
+
return factory.createCallExpression(getUnscopedHelperName("__decorate"),
|
|
28411
28411
|
/*typeArguments*/ undefined, argumentsArray);
|
|
28412
28412
|
}
|
|
28413
28413
|
function createMetadataHelper(metadataKey, metadataValue) {
|
|
28414
28414
|
context.requestEmitHelper(ts.metadataHelper);
|
|
28415
|
-
return factory.createCallExpression(getUnscopedHelperName("__metadata"),
|
|
28415
|
+
return factory.createCallExpression(getUnscopedHelperName("__metadata"),
|
|
28416
28416
|
/*typeArguments*/ undefined, [
|
|
28417
28417
|
factory.createStringLiteral(metadataKey),
|
|
28418
28418
|
metadataValue
|
|
@@ -28420,7 +28420,7 @@ var ts;
|
|
|
28420
28420
|
}
|
|
28421
28421
|
function createParamHelper(expression, parameterOffset, location) {
|
|
28422
28422
|
context.requestEmitHelper(ts.paramHelper);
|
|
28423
|
-
return ts.setTextRange(factory.createCallExpression(getUnscopedHelperName("__param"),
|
|
28423
|
+
return ts.setTextRange(factory.createCallExpression(getUnscopedHelperName("__param"),
|
|
28424
28424
|
/*typeArguments*/ undefined, [
|
|
28425
28425
|
factory.createNumericLiteral(parameterOffset + ""),
|
|
28426
28426
|
expression
|
|
@@ -28429,11 +28429,11 @@ var ts;
|
|
|
28429
28429
|
// ES2018 Helpers
|
|
28430
28430
|
function createAssignHelper(attributesSegments) {
|
|
28431
28431
|
if (ts.getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ScriptTarget.ES2015 */) {
|
|
28432
|
-
return factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "assign"),
|
|
28432
|
+
return factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "assign"),
|
|
28433
28433
|
/*typeArguments*/ undefined, attributesSegments);
|
|
28434
28434
|
}
|
|
28435
28435
|
context.requestEmitHelper(ts.assignHelper);
|
|
28436
|
-
return factory.createCallExpression(getUnscopedHelperName("__assign"),
|
|
28436
|
+
return factory.createCallExpression(getUnscopedHelperName("__assign"),
|
|
28437
28437
|
/*typeArguments*/ undefined, attributesSegments);
|
|
28438
28438
|
}
|
|
28439
28439
|
function createAwaitHelper(expression) {
|
|
@@ -28445,7 +28445,7 @@ var ts;
|
|
|
28445
28445
|
context.requestEmitHelper(ts.asyncGeneratorHelper);
|
|
28446
28446
|
// Mark this node as originally an async function
|
|
28447
28447
|
(generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* EmitFlags.AsyncFunctionBody */ | 524288 /* EmitFlags.ReuseTempVariableScope */;
|
|
28448
|
-
return factory.createCallExpression(getUnscopedHelperName("__asyncGenerator"),
|
|
28448
|
+
return factory.createCallExpression(getUnscopedHelperName("__asyncGenerator"),
|
|
28449
28449
|
/*typeArguments*/ undefined, [
|
|
28450
28450
|
hasLexicalThis ? factory.createThis() : factory.createVoidZero(),
|
|
28451
28451
|
factory.createIdentifier("arguments"),
|
|
@@ -28455,12 +28455,12 @@ var ts;
|
|
|
28455
28455
|
function createAsyncDelegatorHelper(expression) {
|
|
28456
28456
|
context.requestEmitHelper(ts.awaitHelper);
|
|
28457
28457
|
context.requestEmitHelper(ts.asyncDelegator);
|
|
28458
|
-
return factory.createCallExpression(getUnscopedHelperName("__asyncDelegator"),
|
|
28458
|
+
return factory.createCallExpression(getUnscopedHelperName("__asyncDelegator"),
|
|
28459
28459
|
/*typeArguments*/ undefined, [expression]);
|
|
28460
28460
|
}
|
|
28461
28461
|
function createAsyncValuesHelper(expression) {
|
|
28462
28462
|
context.requestEmitHelper(ts.asyncValues);
|
|
28463
|
-
return factory.createCallExpression(getUnscopedHelperName("__asyncValues"),
|
|
28463
|
+
return factory.createCallExpression(getUnscopedHelperName("__asyncValues"),
|
|
28464
28464
|
/*typeArguments*/ undefined, [expression]);
|
|
28465
28465
|
}
|
|
28466
28466
|
// ES2018 Destructuring Helpers
|
|
@@ -28479,8 +28479,8 @@ var ts;
|
|
|
28479
28479
|
var temp = computedTempVariables[computedTempVariableOffset];
|
|
28480
28480
|
computedTempVariableOffset++;
|
|
28481
28481
|
// typeof _tmp === "symbol" ? _tmp : _tmp + ""
|
|
28482
|
-
propertyNames.push(factory.createConditionalExpression(factory.createTypeCheck(temp, "symbol"),
|
|
28483
|
-
/*questionToken*/ undefined, temp,
|
|
28482
|
+
propertyNames.push(factory.createConditionalExpression(factory.createTypeCheck(temp, "symbol"),
|
|
28483
|
+
/*questionToken*/ undefined, temp,
|
|
28484
28484
|
/*colonToken*/ undefined, factory.createAdd(temp, factory.createStringLiteral(""))));
|
|
28485
28485
|
}
|
|
28486
28486
|
else {
|
|
@@ -28488,7 +28488,7 @@ var ts;
|
|
|
28488
28488
|
}
|
|
28489
28489
|
}
|
|
28490
28490
|
}
|
|
28491
|
-
return factory.createCallExpression(getUnscopedHelperName("__rest"),
|
|
28491
|
+
return factory.createCallExpression(getUnscopedHelperName("__rest"),
|
|
28492
28492
|
/*typeArguments*/ undefined, [
|
|
28493
28493
|
value,
|
|
28494
28494
|
ts.setTextRange(factory.createArrayLiteralExpression(propertyNames), location)
|
|
@@ -28498,14 +28498,14 @@ var ts;
|
|
|
28498
28498
|
function createAwaiterHelper(hasLexicalThis, hasLexicalArguments, promiseConstructor, body) {
|
|
28499
28499
|
context.requestEmitHelper(ts.awaiterHelper);
|
|
28500
28500
|
var generatorFunc = factory.createFunctionExpression(
|
|
28501
|
-
/*modifiers*/ undefined, factory.createToken(41 /* SyntaxKind.AsteriskToken */),
|
|
28502
|
-
/*name*/ undefined,
|
|
28503
|
-
/*typeParameters*/ undefined,
|
|
28504
|
-
/*parameters*/ [],
|
|
28501
|
+
/*modifiers*/ undefined, factory.createToken(41 /* SyntaxKind.AsteriskToken */),
|
|
28502
|
+
/*name*/ undefined,
|
|
28503
|
+
/*typeParameters*/ undefined,
|
|
28504
|
+
/*parameters*/ [],
|
|
28505
28505
|
/*type*/ undefined, body);
|
|
28506
28506
|
// Mark this node as originally an async function
|
|
28507
28507
|
(generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* EmitFlags.AsyncFunctionBody */ | 524288 /* EmitFlags.ReuseTempVariableScope */;
|
|
28508
|
-
return factory.createCallExpression(getUnscopedHelperName("__awaiter"),
|
|
28508
|
+
return factory.createCallExpression(getUnscopedHelperName("__awaiter"),
|
|
28509
28509
|
/*typeArguments*/ undefined, [
|
|
28510
28510
|
hasLexicalThis ? factory.createThis() : factory.createVoidZero(),
|
|
28511
28511
|
hasLexicalArguments ? factory.createIdentifier("arguments") : factory.createVoidZero(),
|
|
@@ -28516,28 +28516,28 @@ var ts;
|
|
|
28516
28516
|
// ES2015 Helpers
|
|
28517
28517
|
function createExtendsHelper(name) {
|
|
28518
28518
|
context.requestEmitHelper(ts.extendsHelper);
|
|
28519
|
-
return factory.createCallExpression(getUnscopedHelperName("__extends"),
|
|
28519
|
+
return factory.createCallExpression(getUnscopedHelperName("__extends"),
|
|
28520
28520
|
/*typeArguments*/ undefined, [name, factory.createUniqueName("_super", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */)]);
|
|
28521
28521
|
}
|
|
28522
28522
|
function createTemplateObjectHelper(cooked, raw) {
|
|
28523
28523
|
context.requestEmitHelper(ts.templateObjectHelper);
|
|
28524
|
-
return factory.createCallExpression(getUnscopedHelperName("__makeTemplateObject"),
|
|
28524
|
+
return factory.createCallExpression(getUnscopedHelperName("__makeTemplateObject"),
|
|
28525
28525
|
/*typeArguments*/ undefined, [cooked, raw]);
|
|
28526
28526
|
}
|
|
28527
28527
|
function createSpreadArrayHelper(to, from, packFrom) {
|
|
28528
28528
|
context.requestEmitHelper(ts.spreadArrayHelper);
|
|
28529
|
-
return factory.createCallExpression(getUnscopedHelperName("__spreadArray"),
|
|
28529
|
+
return factory.createCallExpression(getUnscopedHelperName("__spreadArray"),
|
|
28530
28530
|
/*typeArguments*/ undefined, [to, from, packFrom ? immutableTrue() : immutableFalse()]);
|
|
28531
28531
|
}
|
|
28532
28532
|
// ES2015 Destructuring Helpers
|
|
28533
28533
|
function createValuesHelper(expression) {
|
|
28534
28534
|
context.requestEmitHelper(ts.valuesHelper);
|
|
28535
|
-
return factory.createCallExpression(getUnscopedHelperName("__values"),
|
|
28535
|
+
return factory.createCallExpression(getUnscopedHelperName("__values"),
|
|
28536
28536
|
/*typeArguments*/ undefined, [expression]);
|
|
28537
28537
|
}
|
|
28538
28538
|
function createReadHelper(iteratorRecord, count) {
|
|
28539
28539
|
context.requestEmitHelper(ts.readHelper);
|
|
28540
|
-
return factory.createCallExpression(getUnscopedHelperName("__read"),
|
|
28540
|
+
return factory.createCallExpression(getUnscopedHelperName("__read"),
|
|
28541
28541
|
/*typeArguments*/ undefined, count !== undefined
|
|
28542
28542
|
? [iteratorRecord, factory.createNumericLiteral(count + "")]
|
|
28543
28543
|
: [iteratorRecord]);
|
|
@@ -28545,18 +28545,18 @@ var ts;
|
|
|
28545
28545
|
// ES2015 Generator Helpers
|
|
28546
28546
|
function createGeneratorHelper(body) {
|
|
28547
28547
|
context.requestEmitHelper(ts.generatorHelper);
|
|
28548
|
-
return factory.createCallExpression(getUnscopedHelperName("__generator"),
|
|
28548
|
+
return factory.createCallExpression(getUnscopedHelperName("__generator"),
|
|
28549
28549
|
/*typeArguments*/ undefined, [factory.createThis(), body]);
|
|
28550
28550
|
}
|
|
28551
28551
|
// ES Module Helpers
|
|
28552
28552
|
function createCreateBindingHelper(module, inputName, outputName) {
|
|
28553
28553
|
context.requestEmitHelper(ts.createBindingHelper);
|
|
28554
|
-
return factory.createCallExpression(getUnscopedHelperName("__createBinding"),
|
|
28554
|
+
return factory.createCallExpression(getUnscopedHelperName("__createBinding"),
|
|
28555
28555
|
/*typeArguments*/ undefined, __spreadArray([factory.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []), true));
|
|
28556
28556
|
}
|
|
28557
28557
|
function createImportStarHelper(expression) {
|
|
28558
28558
|
context.requestEmitHelper(ts.importStarHelper);
|
|
28559
|
-
return factory.createCallExpression(getUnscopedHelperName("__importStar"),
|
|
28559
|
+
return factory.createCallExpression(getUnscopedHelperName("__importStar"),
|
|
28560
28560
|
/*typeArguments*/ undefined, [expression]);
|
|
28561
28561
|
}
|
|
28562
28562
|
function createImportStarCallbackHelper() {
|
|
@@ -28565,14 +28565,14 @@ var ts;
|
|
|
28565
28565
|
}
|
|
28566
28566
|
function createImportDefaultHelper(expression) {
|
|
28567
28567
|
context.requestEmitHelper(ts.importDefaultHelper);
|
|
28568
|
-
return factory.createCallExpression(getUnscopedHelperName("__importDefault"),
|
|
28568
|
+
return factory.createCallExpression(getUnscopedHelperName("__importDefault"),
|
|
28569
28569
|
/*typeArguments*/ undefined, [expression]);
|
|
28570
28570
|
}
|
|
28571
28571
|
function createExportStarHelper(moduleExpression, exportsExpression) {
|
|
28572
28572
|
if (exportsExpression === void 0) { exportsExpression = factory.createIdentifier("exports"); }
|
|
28573
28573
|
context.requestEmitHelper(ts.exportStarHelper);
|
|
28574
28574
|
context.requestEmitHelper(ts.createBindingHelper);
|
|
28575
|
-
return factory.createCallExpression(getUnscopedHelperName("__exportStar"),
|
|
28575
|
+
return factory.createCallExpression(getUnscopedHelperName("__exportStar"),
|
|
28576
28576
|
/*typeArguments*/ undefined, [moduleExpression, exportsExpression]);
|
|
28577
28577
|
}
|
|
28578
28578
|
// Class Fields Helpers
|
|
@@ -30026,7 +30026,7 @@ var ts;
|
|
|
30026
30026
|
argumentsList.push(children[0]);
|
|
30027
30027
|
}
|
|
30028
30028
|
}
|
|
30029
|
-
return ts.setTextRange(factory.createCallExpression(callee,
|
|
30029
|
+
return ts.setTextRange(factory.createCallExpression(callee,
|
|
30030
30030
|
/*typeArguments*/ undefined, argumentsList), location);
|
|
30031
30031
|
}
|
|
30032
30032
|
ts.createExpressionForJsxElement = createExpressionForJsxElement;
|
|
@@ -30045,7 +30045,7 @@ var ts;
|
|
|
30045
30045
|
argumentsList.push(children[0]);
|
|
30046
30046
|
}
|
|
30047
30047
|
}
|
|
30048
|
-
return ts.setTextRange(factory.createCallExpression(createJsxFactoryExpression(factory, jsxFactoryEntity, reactNamespace, parentElement),
|
|
30048
|
+
return ts.setTextRange(factory.createCallExpression(createJsxFactoryExpression(factory, jsxFactoryEntity, reactNamespace, parentElement),
|
|
30049
30049
|
/*typeArguments*/ undefined, argumentsList), location);
|
|
30050
30050
|
}
|
|
30051
30051
|
ts.createExpressionForJsxFragment = createExpressionForJsxFragment;
|
|
@@ -30053,11 +30053,11 @@ var ts;
|
|
|
30053
30053
|
function createForOfBindingStatement(factory, node, boundValue) {
|
|
30054
30054
|
if (ts.isVariableDeclarationList(node)) {
|
|
30055
30055
|
var firstDeclaration = ts.first(node.declarations);
|
|
30056
|
-
var updatedDeclaration = factory.updateVariableDeclaration(firstDeclaration, firstDeclaration.name,
|
|
30057
|
-
/*exclamationToken*/ undefined,
|
|
30056
|
+
var updatedDeclaration = factory.updateVariableDeclaration(firstDeclaration, firstDeclaration.name,
|
|
30057
|
+
/*exclamationToken*/ undefined,
|
|
30058
30058
|
/*type*/ undefined, boundValue);
|
|
30059
30059
|
return ts.setTextRange(factory.createVariableStatement(
|
|
30060
|
-
/*modifiers*/ undefined, factory.updateVariableDeclarationList(node, [updatedDeclaration])),
|
|
30060
|
+
/*modifiers*/ undefined, factory.updateVariableDeclarationList(node, [updatedDeclaration])),
|
|
30061
30061
|
/*location*/ node);
|
|
30062
30062
|
}
|
|
30063
30063
|
else {
|
|
@@ -30108,16 +30108,16 @@ var ts;
|
|
|
30108
30108
|
return ts.setTextRange(factory.createObjectDefinePropertyCall(receiver, createExpressionForPropertyName(factory, property.name), factory.createPropertyDescriptor({
|
|
30109
30109
|
enumerable: factory.createFalse(),
|
|
30110
30110
|
configurable: true,
|
|
30111
|
-
get: getAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(getAccessor),
|
|
30112
|
-
/*asteriskToken*/ undefined,
|
|
30113
|
-
/*name*/ undefined,
|
|
30114
|
-
/*typeParameters*/ undefined, getAccessor.parameters,
|
|
30111
|
+
get: getAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(getAccessor),
|
|
30112
|
+
/*asteriskToken*/ undefined,
|
|
30113
|
+
/*name*/ undefined,
|
|
30114
|
+
/*typeParameters*/ undefined, getAccessor.parameters,
|
|
30115
30115
|
/*type*/ undefined, getAccessor.body // TODO: GH#18217
|
|
30116
30116
|
), getAccessor), getAccessor),
|
|
30117
|
-
set: setAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(setAccessor),
|
|
30118
|
-
/*asteriskToken*/ undefined,
|
|
30119
|
-
/*name*/ undefined,
|
|
30120
|
-
/*typeParameters*/ undefined, setAccessor.parameters,
|
|
30117
|
+
set: setAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(setAccessor),
|
|
30118
|
+
/*asteriskToken*/ undefined,
|
|
30119
|
+
/*name*/ undefined,
|
|
30120
|
+
/*typeParameters*/ undefined, setAccessor.parameters,
|
|
30121
30121
|
/*type*/ undefined, setAccessor.body // TODO: GH#18217
|
|
30122
30122
|
), setAccessor), setAccessor)
|
|
30123
30123
|
}, !multiLine)), firstAccessor);
|
|
@@ -30128,19 +30128,19 @@ var ts;
|
|
|
30128
30128
|
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, property.name, /*location*/ property.name), property.initializer), property), property);
|
|
30129
30129
|
}
|
|
30130
30130
|
function createExpressionForShorthandPropertyAssignment(factory, property, receiver) {
|
|
30131
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, property.name, /*location*/ property.name), factory.cloneNode(property.name)),
|
|
30132
|
-
/*location*/ property),
|
|
30131
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, property.name, /*location*/ property.name), factory.cloneNode(property.name)),
|
|
30132
|
+
/*location*/ property),
|
|
30133
30133
|
/*original*/ property);
|
|
30134
30134
|
}
|
|
30135
30135
|
function createExpressionForMethodDeclaration(factory, method, receiver) {
|
|
30136
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, method.name, /*location*/ method.name), ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(ts.getModifiers(method), method.asteriskToken,
|
|
30137
|
-
/*name*/ undefined,
|
|
30138
|
-
/*typeParameters*/ undefined, method.parameters,
|
|
30136
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, method.name, /*location*/ method.name), ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(ts.getModifiers(method), method.asteriskToken,
|
|
30137
|
+
/*name*/ undefined,
|
|
30138
|
+
/*typeParameters*/ undefined, method.parameters,
|
|
30139
30139
|
/*type*/ undefined, method.body // TODO: GH#18217
|
|
30140
|
-
),
|
|
30141
|
-
/*location*/ method),
|
|
30142
|
-
/*original*/ method)),
|
|
30143
|
-
/*location*/ method),
|
|
30140
|
+
),
|
|
30141
|
+
/*location*/ method),
|
|
30142
|
+
/*original*/ method)),
|
|
30143
|
+
/*location*/ method),
|
|
30144
30144
|
/*original*/ method);
|
|
30145
30145
|
}
|
|
30146
30146
|
function createExpressionForObjectLiteralElementLike(factory, node, property, receiver) {
|
|
@@ -30366,7 +30366,7 @@ var ts;
|
|
|
30366
30366
|
}
|
|
30367
30367
|
if (namedBindings) {
|
|
30368
30368
|
var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(
|
|
30369
|
-
/*modifiers*/ undefined, nodeFactory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, namedBindings), nodeFactory.createStringLiteral(ts.externalHelpersModuleNameText),
|
|
30369
|
+
/*modifiers*/ undefined, nodeFactory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, namedBindings), nodeFactory.createStringLiteral(ts.externalHelpersModuleNameText),
|
|
30370
30370
|
/*assertClause*/ undefined);
|
|
30371
30371
|
ts.addEmitFlags(externalHelpersImportDeclaration, 67108864 /* EmitFlags.NeverApplyImportHelper */);
|
|
30372
30372
|
return externalHelpersImportDeclaration;
|
|
@@ -33839,11 +33839,11 @@ var ts;
|
|
|
33839
33839
|
parseExpected(58 /* SyntaxKind.ColonToken */);
|
|
33840
33840
|
}
|
|
33841
33841
|
return finishNode(factory.createParameterDeclaration(
|
|
33842
|
-
/*modifiers*/ undefined,
|
|
33843
|
-
/*dotDotDotToken*/ undefined,
|
|
33842
|
+
/*modifiers*/ undefined,
|
|
33843
|
+
/*dotDotDotToken*/ undefined,
|
|
33844
33844
|
// TODO(rbuckton): JSDoc parameters don't have names (except `this`/`new`), should we manufacture an empty identifier?
|
|
33845
|
-
name,
|
|
33846
|
-
/*questionToken*/ undefined, parseJSDocType(),
|
|
33845
|
+
name,
|
|
33846
|
+
/*questionToken*/ undefined, parseJSDocType(),
|
|
33847
33847
|
/*initializer*/ undefined), pos);
|
|
33848
33848
|
}
|
|
33849
33849
|
function parseJSDocType() {
|
|
@@ -33966,9 +33966,9 @@ var ts;
|
|
|
33966
33966
|
// Decorators are parsed in the outer [Await] context, the rest of the parameter is parsed in the function's [Await] context.
|
|
33967
33967
|
var decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : doOutsideOfAwaitContext(parseDecorators);
|
|
33968
33968
|
if (token() === 108 /* SyntaxKind.ThisKeyword */) {
|
|
33969
|
-
var node_1 = factory.createParameterDeclaration(decorators,
|
|
33970
|
-
/*dotDotDotToken*/ undefined, createIdentifier(/*isIdentifier*/ true),
|
|
33971
|
-
/*questionToken*/ undefined, parseTypeAnnotation(),
|
|
33969
|
+
var node_1 = factory.createParameterDeclaration(decorators,
|
|
33970
|
+
/*dotDotDotToken*/ undefined, createIdentifier(/*isIdentifier*/ true),
|
|
33971
|
+
/*questionToken*/ undefined, parseTypeAnnotation(),
|
|
33972
33972
|
/*initializer*/ undefined);
|
|
33973
33973
|
if (decorators) {
|
|
33974
33974
|
parseErrorAtRange(decorators[0], ts.Diagnostics.Decorators_may_not_be_applied_to_this_parameters);
|
|
@@ -34970,10 +34970,10 @@ var ts;
|
|
|
34970
34970
|
function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) {
|
|
34971
34971
|
ts.Debug.assert(token() === 38 /* SyntaxKind.EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
|
|
34972
34972
|
var parameter = factory.createParameterDeclaration(
|
|
34973
|
-
/*modifiers*/ undefined,
|
|
34974
|
-
/*dotDotDotToken*/ undefined, identifier,
|
|
34975
|
-
/*questionToken*/ undefined,
|
|
34976
|
-
/*type*/ undefined,
|
|
34973
|
+
/*modifiers*/ undefined,
|
|
34974
|
+
/*dotDotDotToken*/ undefined, identifier,
|
|
34975
|
+
/*questionToken*/ undefined,
|
|
34976
|
+
/*type*/ undefined,
|
|
34977
34977
|
/*initializer*/ undefined);
|
|
34978
34978
|
finishNode(parameter, identifier.pos);
|
|
34979
34979
|
var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
|
|
@@ -35986,7 +35986,7 @@ var ts;
|
|
|
35986
35986
|
if (node.flags & 32 /* NodeFlags.OptionalChain */) {
|
|
35987
35987
|
return true;
|
|
35988
35988
|
}
|
|
35989
|
-
// check for an optional chain
|
|
35989
|
+
// check for an optional chain a non-null expression
|
|
35990
35990
|
if (ts.isNonNullExpression(node)) {
|
|
35991
35991
|
var expr = node.expression;
|
|
35992
35992
|
while (ts.isNonNullExpression(expr) && !(expr.flags & 32 /* NodeFlags.OptionalChain */)) {
|
|
@@ -41420,7 +41420,7 @@ var ts;
|
|
|
41420
41420
|
result.path = ts.toPath(configFileName, cwd, ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames));
|
|
41421
41421
|
result.resolvedPath = result.path;
|
|
41422
41422
|
result.originalFileName = result.fileName;
|
|
41423
|
-
return parseJsonSourceFileConfigFileContent(result, host, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), cwd), optionsToExtend, ts.getNormalizedAbsolutePath(configFileName, cwd),
|
|
41423
|
+
return parseJsonSourceFileConfigFileContent(result, host, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), cwd), optionsToExtend, ts.getNormalizedAbsolutePath(configFileName, cwd),
|
|
41424
41424
|
/*resolutionStack*/ undefined, extraFileExtensions, extendedConfigCache, watchOptionsToExtend);
|
|
41425
41425
|
}
|
|
41426
41426
|
ts.getParsedCommandLineOfConfigFile = getParsedCommandLineOfConfigFile;
|
|
@@ -41736,7 +41736,7 @@ var ts;
|
|
|
41736
41736
|
return validateValue(convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName));
|
|
41737
41737
|
}
|
|
41738
41738
|
else {
|
|
41739
|
-
return validateValue(convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined,
|
|
41739
|
+
return validateValue(convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined,
|
|
41740
41740
|
/*extraKeyDiagnosticMessage */ undefined, /*parentOption*/ undefined));
|
|
41741
41741
|
}
|
|
41742
41742
|
case 204 /* SyntaxKind.ArrayLiteralExpression */:
|
|
@@ -44325,7 +44325,7 @@ var ts;
|
|
|
44325
44325
|
var requireState = getTemporaryModuleResolutionState(cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(), host, options);
|
|
44326
44326
|
requireState.conditions = ["node", "require", "types"];
|
|
44327
44327
|
requireState.requestContainingDirectory = packageJsonInfo.packageDirectory;
|
|
44328
|
-
var requireResolution = loadNodeModuleFromDirectoryWorker(extensions, packageJsonInfo.packageDirectory,
|
|
44328
|
+
var requireResolution = loadNodeModuleFromDirectoryWorker(extensions, packageJsonInfo.packageDirectory,
|
|
44329
44329
|
/*onlyRecordFailures*/ false, requireState, packageJsonInfo.packageJsonContent, packageJsonInfo.versionPaths);
|
|
44330
44330
|
entrypoints = ts.append(entrypoints, requireResolution === null || requireResolution === void 0 ? void 0 : requireResolution.path);
|
|
44331
44331
|
if (features & NodeResolutionFeatures.Exports && packageJsonInfo.packageJsonContent.exports) {
|
|
@@ -45146,7 +45146,7 @@ var ts;
|
|
|
45146
45146
|
};
|
|
45147
45147
|
var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
|
45148
45148
|
// No originalPath because classic resolution doesn't resolve realPath
|
|
45149
|
-
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value,
|
|
45149
|
+
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value,
|
|
45150
45150
|
/*isExternalLibraryImport*/ false, failedLookupLocations, affectingLocations, diagnostics, state.resultFromCache);
|
|
45151
45151
|
function tryResolve(extensions) {
|
|
45152
45152
|
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
|
@@ -45205,7 +45205,7 @@ var ts;
|
|
|
45205
45205
|
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
45206
45206
|
};
|
|
45207
45207
|
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, /*typesScopeOnly*/ false, /*cache*/ undefined, /*redirectedReference*/ undefined);
|
|
45208
|
-
return createResolvedModuleWithFailedLookupLocations(resolved,
|
|
45208
|
+
return createResolvedModuleWithFailedLookupLocations(resolved,
|
|
45209
45209
|
/*isExternalLibraryImport*/ true, failedLookupLocations, affectingLocations, diagnostics, state.resultFromCache);
|
|
45210
45210
|
}
|
|
45211
45211
|
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
|
|
@@ -48341,7 +48341,7 @@ var ts;
|
|
|
48341
48341
|
return false;
|
|
48342
48342
|
}
|
|
48343
48343
|
if (currentFlow === unreachableFlow) {
|
|
48344
|
-
var reportError =
|
|
48344
|
+
var reportError =
|
|
48345
48345
|
// report error on all statements except empty ones
|
|
48346
48346
|
(ts.isStatementButNotDeclaration(node) && node.kind !== 236 /* SyntaxKind.EmptyStatement */) ||
|
|
48347
48347
|
// report error on class declarations
|
|
@@ -53994,9 +53994,9 @@ var ts;
|
|
|
53994
53994
|
var name = ts.getNameFromIndexInfo(indexInfo) || "x";
|
|
53995
53995
|
var indexerTypeNode = typeToTypeNodeHelper(indexInfo.keyType, context);
|
|
53996
53996
|
var indexingParameter = ts.factory.createParameterDeclaration(
|
|
53997
|
-
/*modifiers*/ undefined,
|
|
53998
|
-
/*dotDotDotToken*/ undefined, name,
|
|
53999
|
-
/*questionToken*/ undefined, indexerTypeNode,
|
|
53997
|
+
/*modifiers*/ undefined,
|
|
53998
|
+
/*dotDotDotToken*/ undefined, name,
|
|
53999
|
+
/*questionToken*/ undefined, indexerTypeNode,
|
|
54000
54000
|
/*initializer*/ undefined);
|
|
54001
54001
|
if (!typeNode) {
|
|
54002
54002
|
typeNode = typeToTypeNodeHelper(indexInfo.type || anyType, context);
|
|
@@ -54082,8 +54082,8 @@ var ts;
|
|
|
54082
54082
|
var thisTag = ts.getJSDocThisTag(signature.declaration);
|
|
54083
54083
|
if (thisTag && thisTag.typeExpression) {
|
|
54084
54084
|
return ts.factory.createParameterDeclaration(
|
|
54085
|
-
/* modifiers */ undefined,
|
|
54086
|
-
/* dotDotDotToken */ undefined, "this",
|
|
54085
|
+
/* modifiers */ undefined,
|
|
54086
|
+
/* dotDotDotToken */ undefined, "this",
|
|
54087
54087
|
/* questionToken */ undefined, typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context));
|
|
54088
54088
|
}
|
|
54089
54089
|
}
|
|
@@ -54124,7 +54124,7 @@ var ts;
|
|
|
54124
54124
|
ts.symbolName(parameterSymbol);
|
|
54125
54125
|
var isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 16384 /* CheckFlags.OptionalParameter */;
|
|
54126
54126
|
var questionToken = isOptional ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined;
|
|
54127
|
-
var parameterNode = ts.factory.createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, parameterTypeNode,
|
|
54127
|
+
var parameterNode = ts.factory.createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, parameterTypeNode,
|
|
54128
54128
|
/*initializer*/ undefined);
|
|
54129
54129
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
54130
54130
|
return parameterNode;
|
|
@@ -54137,12 +54137,12 @@ var ts;
|
|
|
54137
54137
|
var visited = ts.visitEachChild(node, elideInitializerAndPropertyRenamingAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndPropertyRenamingAndSetEmitFlags);
|
|
54138
54138
|
if (ts.isBindingElement(visited)) {
|
|
54139
54139
|
if (visited.propertyName && ts.isIdentifier(visited.propertyName) && ts.isIdentifier(visited.name)) {
|
|
54140
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken,
|
|
54141
|
-
/* propertyName*/ undefined, visited.propertyName,
|
|
54140
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken,
|
|
54141
|
+
/* propertyName*/ undefined, visited.propertyName,
|
|
54142
54142
|
/*initializer*/ undefined);
|
|
54143
54143
|
}
|
|
54144
54144
|
else {
|
|
54145
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54145
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54146
54146
|
/*initializer*/ undefined);
|
|
54147
54147
|
}
|
|
54148
54148
|
}
|
|
@@ -54794,8 +54794,8 @@ var ts;
|
|
|
54794
54794
|
if ((ts.isExpressionWithTypeArguments(node) || ts.isTypeReferenceNode(node)) && ts.isJSDocIndexSignature(node)) {
|
|
54795
54795
|
return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(
|
|
54796
54796
|
/*modifiers*/ undefined, [ts.factory.createParameterDeclaration(
|
|
54797
|
-
/*modifiers*/ undefined,
|
|
54798
|
-
/*dotdotdotToken*/ undefined, "x",
|
|
54797
|
+
/*modifiers*/ undefined,
|
|
54798
|
+
/*dotdotdotToken*/ undefined, "x",
|
|
54799
54799
|
/*questionToken*/ undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols))], ts.visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols))]);
|
|
54800
54800
|
}
|
|
54801
54801
|
if (ts.isJSDocFunctionType(node)) {
|
|
@@ -54803,12 +54803,12 @@ var ts;
|
|
|
54803
54803
|
var newTypeNode_1;
|
|
54804
54804
|
return ts.factory.createConstructorTypeNode(
|
|
54805
54805
|
/*modifiers*/ undefined, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.mapDefined(node.parameters, function (p, i) { return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode_1 = p.type, undefined) : ts.factory.createParameterDeclaration(
|
|
54806
|
-
/*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
54806
|
+
/*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
54807
54807
|
/*initializer*/ undefined); }), ts.visitNode(newTypeNode_1 || node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(130 /* SyntaxKind.AnyKeyword */));
|
|
54808
54808
|
}
|
|
54809
54809
|
else {
|
|
54810
54810
|
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(
|
|
54811
|
-
/*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
54811
|
+
/*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
54812
54812
|
/*initializer*/ undefined); }), ts.visitNode(node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(130 /* SyntaxKind.AnyKeyword */));
|
|
54813
54813
|
}
|
|
54814
54814
|
}
|
|
@@ -54940,8 +54940,8 @@ var ts;
|
|
|
54940
54940
|
var body = ns.body;
|
|
54941
54941
|
if (ts.length(excessExports)) {
|
|
54942
54942
|
ns = ts.factory.updateModuleDeclaration(ns, ns.modifiers, ns.name, body = ts.factory.updateModuleBlock(body, ts.factory.createNodeArray(__spreadArray(__spreadArray([], ns.body.statements, true), [ts.factory.createExportDeclaration(
|
|
54943
|
-
/*modifiers*/ undefined,
|
|
54944
|
-
/*isTypeOnly*/ false, ts.factory.createNamedExports(ts.map(ts.flatMap(excessExports, function (e) { return getNamesOfDeclaration(e); }), function (id) { return ts.factory.createExportSpecifier(/*isTypeOnly*/ false, /*alias*/ undefined, id); })),
|
|
54943
|
+
/*modifiers*/ undefined,
|
|
54944
|
+
/*isTypeOnly*/ false, ts.factory.createNamedExports(ts.map(ts.flatMap(excessExports, function (e) { return getNamesOfDeclaration(e); }), function (id) { return ts.factory.createExportSpecifier(/*isTypeOnly*/ false, /*alias*/ undefined, id); })),
|
|
54945
54945
|
/*moduleSpecifier*/ undefined)], false))));
|
|
54946
54946
|
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, nsIndex), true), [ns], false), statements.slice(nsIndex + 1), true);
|
|
54947
54947
|
}
|
|
@@ -54965,8 +54965,8 @@ var ts;
|
|
|
54965
54965
|
if (ts.length(exports) > 1) {
|
|
54966
54966
|
var nonExports = ts.filter(statements, function (d) { return !ts.isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause; });
|
|
54967
54967
|
statements = __spreadArray(__spreadArray([], nonExports, true), [ts.factory.createExportDeclaration(
|
|
54968
|
-
/*modifiers*/ undefined,
|
|
54969
|
-
/*isTypeOnly*/ false, ts.factory.createNamedExports(ts.flatMap(exports, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })),
|
|
54968
|
+
/*modifiers*/ undefined,
|
|
54969
|
+
/*isTypeOnly*/ false, ts.factory.createNamedExports(ts.flatMap(exports, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })),
|
|
54970
54970
|
/*moduleSpecifier*/ undefined)], false);
|
|
54971
54971
|
}
|
|
54972
54972
|
// Pass 2b: Also combine all `export {} from "..."` declarations as needed
|
|
@@ -54979,7 +54979,7 @@ var ts;
|
|
|
54979
54979
|
// remove group members from statements and then merge group members and add back to statements
|
|
54980
54980
|
statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return group_1.indexOf(s) === -1; }), true), [
|
|
54981
54981
|
ts.factory.createExportDeclaration(
|
|
54982
|
-
/*modifiers*/ undefined,
|
|
54982
|
+
/*modifiers*/ undefined,
|
|
54983
54983
|
/*isTypeOnly*/ false, ts.factory.createNamedExports(ts.flatMap(group_1, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })), group_1[0].moduleSpecifier)
|
|
54984
54984
|
], false);
|
|
54985
54985
|
}
|
|
@@ -55168,7 +55168,7 @@ var ts;
|
|
|
55168
55168
|
&& ((_d = type.symbol) === null || _d === void 0 ? void 0 : _d.valueDeclaration) && ts.isSourceFile(type.symbol.valueDeclaration)) {
|
|
55169
55169
|
var alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right;
|
|
55170
55170
|
addResult(ts.factory.createExportDeclaration(
|
|
55171
|
-
/*modifiers*/ undefined,
|
|
55171
|
+
/*modifiers*/ undefined,
|
|
55172
55172
|
/*isTypeOnly*/ false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(/*isTypeOnly*/ false, alias, localName)])), 0 /* ModifierFlags.None */);
|
|
55173
55173
|
context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551 /* SymbolFlags.Value */);
|
|
55174
55174
|
}
|
|
@@ -55200,7 +55200,7 @@ var ts;
|
|
|
55200
55200
|
// ```
|
|
55201
55201
|
// To create an export named `g` that does _not_ shadow the local `g`
|
|
55202
55202
|
addResult(ts.factory.createExportDeclaration(
|
|
55203
|
-
/*modifiers*/ undefined,
|
|
55203
|
+
/*modifiers*/ undefined,
|
|
55204
55204
|
/*isTypeOnly*/ false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(/*isTypeOnly*/ false, name, localName)])), 0 /* ModifierFlags.None */);
|
|
55205
55205
|
needsExportDeclaration = false;
|
|
55206
55206
|
needsPostExportDefault = false;
|
|
@@ -55257,7 +55257,7 @@ var ts;
|
|
|
55257
55257
|
}
|
|
55258
55258
|
else if (needsExportDeclaration) {
|
|
55259
55259
|
addResult(ts.factory.createExportDeclaration(
|
|
55260
|
-
/*modifiers*/ undefined,
|
|
55260
|
+
/*modifiers*/ undefined,
|
|
55261
55261
|
/*isTypeOnly*/ false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(/*isTypeOnly*/ false, getInternalSymbolName(symbol, symbolName), symbolName)])), 0 /* ModifierFlags.None */);
|
|
55262
55262
|
}
|
|
55263
55263
|
}
|
|
@@ -55365,7 +55365,7 @@ var ts;
|
|
|
55365
55365
|
var containingFile_1 = ts.getSourceFileOfNode(context.enclosingDeclaration);
|
|
55366
55366
|
var localName = getInternalSymbolName(symbol, symbolName);
|
|
55367
55367
|
var nsBody = ts.factory.createModuleBlock([ts.factory.createExportDeclaration(
|
|
55368
|
-
/*modifiers*/ undefined,
|
|
55368
|
+
/*modifiers*/ undefined,
|
|
55369
55369
|
/*isTypeOnly*/ false, ts.factory.createNamedExports(ts.mapDefined(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export=" /* InternalSymbolName.ExportEquals */; }), function (s) {
|
|
55370
55370
|
var _a, _b;
|
|
55371
55371
|
var name = ts.unescapeLeadingUnderscores(s.escapedName);
|
|
@@ -55465,7 +55465,7 @@ var ts;
|
|
|
55465
55465
|
results = oldResults;
|
|
55466
55466
|
// replace namespace with synthetic version
|
|
55467
55467
|
var defaultReplaced = ts.map(declarations, function (d) { return ts.isExportAssignment(d) && !d.isExportEquals && ts.isIdentifier(d.expression) ? ts.factory.createExportDeclaration(
|
|
55468
|
-
/*modifiers*/ undefined,
|
|
55468
|
+
/*modifiers*/ undefined,
|
|
55469
55469
|
/*isTypeOnly*/ false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(/*isTypeOnly*/ false, d.expression, ts.factory.createIdentifier("default" /* InternalSymbolName.Default */))])) : d; });
|
|
55470
55470
|
var exportModifierStripped = ts.every(defaultReplaced, function (d) { return ts.hasSyntacticModifier(d, 1 /* ModifierFlags.Export */); }) ? ts.map(defaultReplaced, removeExportModifier) : defaultReplaced;
|
|
55471
55471
|
fakespace = ts.factory.updateModuleDeclaration(fakespace, fakespace.modifiers, fakespace.name, ts.factory.createModuleBlock(exportModifierStripped));
|
|
@@ -55542,9 +55542,9 @@ var ts;
|
|
|
55542
55542
|
// Boil down all private properties into a single one.
|
|
55543
55543
|
var privateProperties = hasPrivateIdentifier ?
|
|
55544
55544
|
[ts.factory.createPropertyDeclaration(
|
|
55545
|
-
/*modifiers*/ undefined, ts.factory.createPrivateIdentifier("#private"),
|
|
55546
|
-
/*questionOrExclamationToken*/ undefined,
|
|
55547
|
-
/*type*/ undefined,
|
|
55545
|
+
/*modifiers*/ undefined, ts.factory.createPrivateIdentifier("#private"),
|
|
55546
|
+
/*questionOrExclamationToken*/ undefined,
|
|
55547
|
+
/*type*/ undefined,
|
|
55548
55548
|
/*initializer*/ undefined)] :
|
|
55549
55549
|
ts.emptyArray;
|
|
55550
55550
|
var publicProperties = ts.flatMap(publicSymbolProps, function (p) { return serializePropertySymbolForClass(p, /*isStatic*/ false, baseTypes[0]); });
|
|
@@ -55615,7 +55615,7 @@ var ts;
|
|
|
55615
55615
|
var propertyName = node.propertyName;
|
|
55616
55616
|
addResult(ts.factory.createImportDeclaration(
|
|
55617
55617
|
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, ts.factory.createNamedImports([ts.factory.createImportSpecifier(
|
|
55618
|
-
/*isTypeOnly*/ false, propertyName && ts.isIdentifier(propertyName) ? ts.factory.createIdentifier(ts.idText(propertyName)) : undefined, ts.factory.createIdentifier(localName))])), ts.factory.createStringLiteral(specifier_1),
|
|
55618
|
+
/*isTypeOnly*/ false, propertyName && ts.isIdentifier(propertyName) ? ts.factory.createIdentifier(ts.idText(propertyName)) : undefined, ts.factory.createIdentifier(localName))])), ts.factory.createStringLiteral(specifier_1),
|
|
55619
55619
|
/*importClause*/ undefined), 0 /* ModifierFlags.None */);
|
|
55620
55620
|
break;
|
|
55621
55621
|
}
|
|
@@ -55637,11 +55637,11 @@ var ts;
|
|
|
55637
55637
|
var specifier_2 = getSpecifierForModuleSymbol(target.parent || target, context); // 'y'
|
|
55638
55638
|
// import _x = require('y');
|
|
55639
55639
|
addResult(ts.factory.createImportEqualsDeclaration(
|
|
55640
|
-
/*modifiers*/ undefined,
|
|
55640
|
+
/*modifiers*/ undefined,
|
|
55641
55641
|
/*isTypeOnly*/ false, uniqueName, ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(specifier_2))), 0 /* ModifierFlags.None */);
|
|
55642
55642
|
// import x = _x.z
|
|
55643
55643
|
addResult(ts.factory.createImportEqualsDeclaration(
|
|
55644
|
-
/*modifiers*/ undefined,
|
|
55644
|
+
/*modifiers*/ undefined,
|
|
55645
55645
|
/*isTypeOnly*/ false, ts.factory.createIdentifier(localName), ts.factory.createQualifiedName(uniqueName, initializer.name)), modifierFlags);
|
|
55646
55646
|
break;
|
|
55647
55647
|
}
|
|
@@ -55657,7 +55657,7 @@ var ts;
|
|
|
55657
55657
|
// an external `import localName = require("whatever")`
|
|
55658
55658
|
var isLocalImport = !(target.flags & 512 /* SymbolFlags.ValueModule */) && !ts.isVariableDeclaration(node);
|
|
55659
55659
|
addResult(ts.factory.createImportEqualsDeclaration(
|
|
55660
|
-
/*modifiers*/ undefined,
|
|
55660
|
+
/*modifiers*/ undefined,
|
|
55661
55661
|
/*isTypeOnly*/ false, ts.factory.createIdentifier(localName), isLocalImport
|
|
55662
55662
|
? symbolToName(target, context, 67108863 /* SymbolFlags.All */, /*expectsIdentifier*/ false)
|
|
55663
55663
|
: ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)))), isLocalImport ? modifierFlags : 0 /* ModifierFlags.None */);
|
|
@@ -55670,31 +55670,31 @@ var ts;
|
|
|
55670
55670
|
break;
|
|
55671
55671
|
case 267 /* SyntaxKind.ImportClause */:
|
|
55672
55672
|
addResult(ts.factory.createImportDeclaration(
|
|
55673
|
-
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, ts.factory.createIdentifier(localName), /*namedBindings*/ undefined),
|
|
55673
|
+
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, ts.factory.createIdentifier(localName), /*namedBindings*/ undefined),
|
|
55674
55674
|
// We use `target.parent || target` below as `target.parent` is unset when the target is a module which has been export assigned
|
|
55675
55675
|
// And then made into a default by the `esModuleInterop` or `allowSyntheticDefaultImports` flag
|
|
55676
55676
|
// In such cases, the `target` refers to the module itself already
|
|
55677
|
-
ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)),
|
|
55677
|
+
ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)),
|
|
55678
55678
|
/*assertClause*/ undefined), 0 /* ModifierFlags.None */);
|
|
55679
55679
|
break;
|
|
55680
55680
|
case 268 /* SyntaxKind.NamespaceImport */:
|
|
55681
55681
|
addResult(ts.factory.createImportDeclaration(
|
|
55682
|
-
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, /*importClause*/ undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(localName))), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)),
|
|
55682
|
+
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, /*importClause*/ undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(localName))), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)),
|
|
55683
55683
|
/*assertClause*/ undefined), 0 /* ModifierFlags.None */);
|
|
55684
55684
|
break;
|
|
55685
55685
|
case 274 /* SyntaxKind.NamespaceExport */:
|
|
55686
55686
|
addResult(ts.factory.createExportDeclaration(
|
|
55687
|
-
/*modifiers*/ undefined,
|
|
55687
|
+
/*modifiers*/ undefined,
|
|
55688
55688
|
/*isTypeOnly*/ false, ts.factory.createNamespaceExport(ts.factory.createIdentifier(localName)), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))), 0 /* ModifierFlags.None */);
|
|
55689
55689
|
break;
|
|
55690
55690
|
case 270 /* SyntaxKind.ImportSpecifier */:
|
|
55691
55691
|
addResult(ts.factory.createImportDeclaration(
|
|
55692
55692
|
/*modifiers*/ undefined, ts.factory.createImportClause(
|
|
55693
|
-
/*isTypeOnly*/ false,
|
|
55693
|
+
/*isTypeOnly*/ false,
|
|
55694
55694
|
/*importClause*/ undefined, ts.factory.createNamedImports([
|
|
55695
55695
|
ts.factory.createImportSpecifier(
|
|
55696
55696
|
/*isTypeOnly*/ false, localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
|
|
55697
|
-
])), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)),
|
|
55697
|
+
])), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)),
|
|
55698
55698
|
/*assertClause*/ undefined), 0 /* ModifierFlags.None */);
|
|
55699
55699
|
break;
|
|
55700
55700
|
case 275 /* SyntaxKind.ExportSpecifier */:
|
|
@@ -55727,7 +55727,7 @@ var ts;
|
|
|
55727
55727
|
}
|
|
55728
55728
|
function serializeExportSpecifier(localName, targetName, specifier) {
|
|
55729
55729
|
addResult(ts.factory.createExportDeclaration(
|
|
55730
|
-
/*modifiers*/ undefined,
|
|
55730
|
+
/*modifiers*/ undefined,
|
|
55731
55731
|
/*isTypeOnly*/ false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(/*isTypeOnly*/ false, localName !== targetName ? targetName : undefined, localName)]), specifier), 0 /* ModifierFlags.None */);
|
|
55732
55732
|
}
|
|
55733
55733
|
/**
|
|
@@ -55781,7 +55781,7 @@ var ts;
|
|
|
55781
55781
|
// serialize as `import _Ref = t.arg.et; export { _Ref as name }`
|
|
55782
55782
|
var varName = getUnusedName(name, symbol);
|
|
55783
55783
|
addResult(ts.factory.createImportEqualsDeclaration(
|
|
55784
|
-
/*modifiers*/ undefined,
|
|
55784
|
+
/*modifiers*/ undefined,
|
|
55785
55785
|
/*isTypeOnly*/ false, ts.factory.createIdentifier(varName), symbolToName(target, context, 67108863 /* SymbolFlags.All */, /*expectsIdentifier*/ false)), 0 /* ModifierFlags.None */);
|
|
55786
55786
|
serializeExportSpecifier(name, varName);
|
|
55787
55787
|
}
|
|
@@ -55861,14 +55861,14 @@ var ts;
|
|
|
55861
55861
|
var result = [];
|
|
55862
55862
|
if (p.flags & 65536 /* SymbolFlags.SetAccessor */) {
|
|
55863
55863
|
result.push(ts.setTextRange(ts.factory.createSetAccessorDeclaration(ts.factory.createModifiersFromModifierFlags(flag), name, [ts.factory.createParameterDeclaration(
|
|
55864
|
-
/*modifiers*/ undefined,
|
|
55865
|
-
/*dotDotDotToken*/ undefined, "arg",
|
|
55866
|
-
/*questionToken*/ undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled))],
|
|
55864
|
+
/*modifiers*/ undefined,
|
|
55865
|
+
/*dotDotDotToken*/ undefined, "arg",
|
|
55866
|
+
/*questionToken*/ undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled))],
|
|
55867
55867
|
/*body*/ undefined), ((_b = p.declarations) === null || _b === void 0 ? void 0 : _b.find(ts.isSetAccessor)) || firstPropertyLikeDecl));
|
|
55868
55868
|
}
|
|
55869
55869
|
if (p.flags & 32768 /* SymbolFlags.GetAccessor */) {
|
|
55870
55870
|
var isPrivate_1 = modifierFlags & 8 /* ModifierFlags.Private */;
|
|
55871
|
-
result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(ts.factory.createModifiersFromModifierFlags(flag), name, [], isPrivate_1 ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled),
|
|
55871
|
+
result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(ts.factory.createModifiersFromModifierFlags(flag), name, [], isPrivate_1 ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled),
|
|
55872
55872
|
/*body*/ undefined), ((_c = p.declarations) === null || _c === void 0 ? void 0 : _c.find(ts.isGetAccessor)) || firstPropertyLikeDecl));
|
|
55873
55873
|
}
|
|
55874
55874
|
return result;
|
|
@@ -55876,7 +55876,7 @@ var ts;
|
|
|
55876
55876
|
// This is an else/if as accessors and properties can't merge in TS, but might in JS
|
|
55877
55877
|
// If this happens, we assume the accessor takes priority, as it imposes more constraints
|
|
55878
55878
|
else if (p.flags & (4 /* SymbolFlags.Property */ | 3 /* SymbolFlags.Variable */ | 98304 /* SymbolFlags.Accessor */)) {
|
|
55879
|
-
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* ModifierFlags.Readonly */ : 0) | flag), name, p.flags & 16777216 /* SymbolFlags.Optional */ ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled),
|
|
55879
|
+
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* ModifierFlags.Readonly */ : 0) | flag), name, p.flags & 16777216 /* SymbolFlags.Optional */ ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled),
|
|
55880
55880
|
// TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357
|
|
55881
55881
|
// interface members can't have initializers, however class members _can_
|
|
55882
55882
|
/*initializer*/ undefined), ((_d = p.declarations) === null || _d === void 0 ? void 0 : _d.find(ts.or(ts.isPropertyDeclaration, ts.isVariableDeclaration))) || firstPropertyLikeDecl);
|
|
@@ -55885,8 +55885,8 @@ var ts;
|
|
|
55885
55885
|
var type = getTypeOfSymbol(p);
|
|
55886
55886
|
var signatures = getSignaturesOfType(type, 0 /* SignatureKind.Call */);
|
|
55887
55887
|
if (flag & 8 /* ModifierFlags.Private */) {
|
|
55888
|
-
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* ModifierFlags.Readonly */ : 0) | flag), name, p.flags & 16777216 /* SymbolFlags.Optional */ ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined,
|
|
55889
|
-
/*type*/ undefined,
|
|
55888
|
+
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* ModifierFlags.Readonly */ : 0) | flag), name, p.flags & 16777216 /* SymbolFlags.Optional */ ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined,
|
|
55889
|
+
/*type*/ undefined,
|
|
55890
55890
|
/*initializer*/ undefined), ((_e = p.declarations) === null || _e === void 0 ? void 0 : _e.find(ts.isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]);
|
|
55891
55891
|
}
|
|
55892
55892
|
var results_1 = [];
|
|
@@ -55943,8 +55943,8 @@ var ts;
|
|
|
55943
55943
|
}
|
|
55944
55944
|
}
|
|
55945
55945
|
if (privateProtected) {
|
|
55946
|
-
return [ts.setTextRange(ts.factory.createConstructorDeclaration(ts.factory.createModifiersFromModifierFlags(privateProtected),
|
|
55947
|
-
/*parameters*/ [],
|
|
55946
|
+
return [ts.setTextRange(ts.factory.createConstructorDeclaration(ts.factory.createModifiersFromModifierFlags(privateProtected),
|
|
55947
|
+
/*parameters*/ [],
|
|
55948
55948
|
/*body*/ undefined), signatures[0].declaration)];
|
|
55949
55949
|
}
|
|
55950
55950
|
}
|
|
@@ -58701,7 +58701,7 @@ var ts;
|
|
|
58701
58701
|
return sig;
|
|
58702
58702
|
}
|
|
58703
58703
|
function cloneSignature(sig) {
|
|
58704
|
-
var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined,
|
|
58704
|
+
var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined,
|
|
58705
58705
|
/*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 39 /* SignatureFlags.PropagatingFlags */);
|
|
58706
58706
|
result.target = sig.target;
|
|
58707
58707
|
result.mapper = sig.mapper;
|
|
@@ -58972,8 +58972,8 @@ var ts;
|
|
|
58972
58972
|
var params = combineUnionParameters(left, right, paramMapper);
|
|
58973
58973
|
var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper);
|
|
58974
58974
|
var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
|
|
58975
|
-
var result = createSignature(declaration, typeParams, thisParam, params,
|
|
58976
|
-
/*resolvedReturnType*/ undefined,
|
|
58975
|
+
var result = createSignature(declaration, typeParams, thisParam, params,
|
|
58976
|
+
/*resolvedReturnType*/ undefined,
|
|
58977
58977
|
/*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 39 /* SignatureFlags.PropagatingFlags */);
|
|
58978
58978
|
result.compositeKind = 1048576 /* TypeFlags.Union */;
|
|
58979
58979
|
result.compositeSignatures = ts.concatenate(left.compositeKind !== 2097152 /* TypeFlags.Intersection */ && left.compositeSignatures || [left], [right]);
|
|
@@ -60429,7 +60429,7 @@ var ts;
|
|
|
60429
60429
|
ts.isConstructorDeclaration(declaration) && ts.hasSyntacticModifier(declaration.parent, 128 /* ModifierFlags.Abstract */)) {
|
|
60430
60430
|
flags |= 4 /* SignatureFlags.Abstract */;
|
|
60431
60431
|
}
|
|
60432
|
-
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters,
|
|
60432
|
+
links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters,
|
|
60433
60433
|
/*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, flags);
|
|
60434
60434
|
}
|
|
60435
60435
|
return links.resolvedSignature;
|
|
@@ -61836,7 +61836,7 @@ var ts;
|
|
|
61836
61836
|
var target = type.target;
|
|
61837
61837
|
var endIndex = getTypeReferenceArity(type) - endSkipCount;
|
|
61838
61838
|
return index > target.fixedLength ? getRestArrayTypeOfTupleType(type) || createTupleType(ts.emptyArray) :
|
|
61839
|
-
createTupleType(getTypeArguments(type).slice(index, endIndex), target.elementFlags.slice(index, endIndex),
|
|
61839
|
+
createTupleType(getTypeArguments(type).slice(index, endIndex), target.elementFlags.slice(index, endIndex),
|
|
61840
61840
|
/*readonly*/ false, target.labeledElementDeclarations && target.labeledElementDeclarations.slice(index, endIndex));
|
|
61841
61841
|
}
|
|
61842
61842
|
function getKnownKeysOfTupleType(type) {
|
|
@@ -62603,7 +62603,7 @@ var ts;
|
|
|
62603
62603
|
var propertyTypes = ts.map(getPropertiesOfType(type), function (prop) { return getLiteralTypeFromProperty(prop, include); });
|
|
62604
62604
|
var indexKeyTypes = ts.map(getIndexInfosOfType(type), function (info) { return info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ?
|
|
62605
62605
|
info.keyType === stringType && include & 8 /* TypeFlags.Number */ ? stringOrNumberType : info.keyType : neverType; });
|
|
62606
|
-
return getUnionType(ts.concatenate(propertyTypes, indexKeyTypes), 1 /* UnionReduction.Literal */,
|
|
62606
|
+
return getUnionType(ts.concatenate(propertyTypes, indexKeyTypes), 1 /* UnionReduction.Literal */,
|
|
62607
62607
|
/*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, origin);
|
|
62608
62608
|
}
|
|
62609
62609
|
/**
|
|
@@ -64163,8 +64163,8 @@ var ts;
|
|
|
64163
64163
|
// Don't compute resolvedReturnType and resolvedTypePredicate now,
|
|
64164
64164
|
// because using `mapper` now could trigger inferences to become fixed. (See `createInferenceContext`.)
|
|
64165
64165
|
// See GH#17600.
|
|
64166
|
-
var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol),
|
|
64167
|
-
/*resolvedReturnType*/ undefined,
|
|
64166
|
+
var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol),
|
|
64167
|
+
/*resolvedReturnType*/ undefined,
|
|
64168
64168
|
/*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.flags & 39 /* SignatureFlags.PropagatingFlags */);
|
|
64169
64169
|
result.target = signature;
|
|
64170
64170
|
result.mapper = mapper;
|
|
@@ -65126,7 +65126,7 @@ var ts;
|
|
|
65126
65126
|
return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);
|
|
65127
65127
|
}
|
|
65128
65128
|
function isSignatureAssignableTo(source, target, ignoreReturnTypes) {
|
|
65129
|
-
return compareSignaturesRelated(source, target, ignoreReturnTypes ? 4 /* SignatureCheckMode.IgnoreReturnTypes */ : 0, /*reportErrors*/ false,
|
|
65129
|
+
return compareSignaturesRelated(source, target, ignoreReturnTypes ? 4 /* SignatureCheckMode.IgnoreReturnTypes */ : 0, /*reportErrors*/ false,
|
|
65130
65130
|
/*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable, /*reportUnreliableMarkers*/ undefined) !== 0 /* Ternary.False */;
|
|
65131
65131
|
}
|
|
65132
65132
|
/**
|
|
@@ -66604,7 +66604,7 @@ var ts;
|
|
|
66604
66604
|
// missing from the `constraintType` which will otherwise be mapped in the object
|
|
66605
66605
|
var modifiersType = getApparentType(getModifiersTypeFromMappedType(targetType_1));
|
|
66606
66606
|
var mappedKeys_1 = [];
|
|
66607
|
-
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* TypeFlags.StringOrNumberLiteralOrUnique */,
|
|
66607
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* TypeFlags.StringOrNumberLiteralOrUnique */,
|
|
66608
66608
|
/*stringsOnly*/ false, function (t) { return void mappedKeys_1.push(instantiateType(nameType_1, appendTypeMapping(targetType_1.mapper, getTypeParameterFromMappedType(targetType_1), t))); });
|
|
66609
66609
|
// We still need to include the non-apparent (and thus still generic) keys in the target side of the comparison (in case they're in the source side)
|
|
66610
66610
|
targetKeys = getUnionType(__spreadArray(__spreadArray([], mappedKeys_1, true), [nameType_1], false));
|
|
@@ -70193,7 +70193,7 @@ var ts;
|
|
|
70193
70193
|
var links = getNodeLinks(node);
|
|
70194
70194
|
if (!links.resolvedSymbol) {
|
|
70195
70195
|
links.resolvedSymbol = !ts.nodeIsMissing(node) &&
|
|
70196
|
-
resolveName(node, node.escapedText, 111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
70196
|
+
resolveName(node, node.escapedText, 111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node),
|
|
70197
70197
|
/*excludeGlobals*/ false) || unknownSymbol;
|
|
70198
70198
|
}
|
|
70199
70199
|
return links.resolvedSymbol;
|
|
@@ -73777,7 +73777,7 @@ var ts;
|
|
|
73777
73777
|
// type of T.
|
|
73778
73778
|
function getContextualTypeForElementExpression(arrayContextualType, index) {
|
|
73779
73779
|
return arrayContextualType && (getTypeOfPropertyOfContextualType(arrayContextualType, "" + index)
|
|
73780
|
-
|| mapType(arrayContextualType, function (t) { return getIteratedTypeOrElementType(1 /* IterationUse.Element */, t, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); },
|
|
73780
|
+
|| mapType(arrayContextualType, function (t) { return getIteratedTypeOrElementType(1 /* IterationUse.Element */, t, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); },
|
|
73781
73781
|
/*noReductions*/ true));
|
|
73782
73782
|
}
|
|
73783
73783
|
// In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type.
|
|
@@ -74198,8 +74198,8 @@ var ts;
|
|
|
74198
74198
|
var params = combineIntersectionParameters(left, right, paramMapper);
|
|
74199
74199
|
var thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper);
|
|
74200
74200
|
var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
|
|
74201
|
-
var result = createSignature(declaration, typeParams, thisParam, params,
|
|
74202
|
-
/*resolvedReturnType*/ undefined,
|
|
74201
|
+
var result = createSignature(declaration, typeParams, thisParam, params,
|
|
74202
|
+
/*resolvedReturnType*/ undefined,
|
|
74203
74203
|
/*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 39 /* SignatureFlags.PropagatingFlags */);
|
|
74204
74204
|
result.compositeKind = 2097152 /* TypeFlags.Intersection */;
|
|
74205
74205
|
result.compositeSignatures = ts.concatenate(left.compositeKind === 2097152 /* TypeFlags.Intersection */ && left.compositeSignatures || [left], [right]);
|
|
@@ -76084,7 +76084,7 @@ var ts;
|
|
|
76084
76084
|
* @param property the accessed property's symbol.
|
|
76085
76085
|
*/
|
|
76086
76086
|
function isValidPropertyAccessForCompletions(node, type, property) {
|
|
76087
|
-
return isPropertyAccessible(node, node.kind === 206 /* SyntaxKind.PropertyAccessExpression */ && node.expression.kind === 106 /* SyntaxKind.SuperKeyword */,
|
|
76087
|
+
return isPropertyAccessible(node, node.kind === 206 /* SyntaxKind.PropertyAccessExpression */ && node.expression.kind === 106 /* SyntaxKind.SuperKeyword */,
|
|
76088
76088
|
/* isWrite */ false, type, property);
|
|
76089
76089
|
// Previously we validated the 'this' type of methods but this adversely affected performance. See #31377 for more context.
|
|
76090
76090
|
}
|
|
@@ -76593,7 +76593,7 @@ var ts;
|
|
|
76593
76593
|
// can be specified by users through attributes property.
|
|
76594
76594
|
var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node);
|
|
76595
76595
|
var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode);
|
|
76596
|
-
return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes,
|
|
76596
|
+
return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes,
|
|
76597
76597
|
/*headMessage*/ undefined, containingMessageChain, errorOutputContainer);
|
|
76598
76598
|
function checkTagNameDoesNotExpectTooManyArguments() {
|
|
76599
76599
|
var _a;
|
|
@@ -77329,10 +77329,10 @@ var ts;
|
|
|
77329
77329
|
if (candidates.some(signatureHasLiteralTypes)) {
|
|
77330
77330
|
flags |= 2 /* SignatureFlags.HasLiteralTypes */;
|
|
77331
77331
|
}
|
|
77332
|
-
return createSignature(candidates[0].declaration,
|
|
77332
|
+
return createSignature(candidates[0].declaration,
|
|
77333
77333
|
/*typeParameters*/ undefined, // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`.
|
|
77334
|
-
thisParameter, parameters,
|
|
77335
|
-
/*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)),
|
|
77334
|
+
thisParameter, parameters,
|
|
77335
|
+
/*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)),
|
|
77336
77336
|
/*typePredicate*/ undefined, minArgumentCount, flags);
|
|
77337
77337
|
}
|
|
77338
77338
|
function getNumNonRestParameters(signature) {
|
|
@@ -77832,9 +77832,9 @@ var ts;
|
|
|
77832
77832
|
var declaration = ts.factory.createFunctionTypeNode(/*typeParameters*/ undefined, [ts.factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotdotdot*/ undefined, "props", /*questionMark*/ undefined, nodeBuilder.typeToTypeNode(result, node))], returnNode ? ts.factory.createTypeReferenceNode(returnNode, /*typeArguments*/ undefined) : ts.factory.createKeywordTypeNode(130 /* SyntaxKind.AnyKeyword */));
|
|
77833
77833
|
var parameterSymbol = createSymbol(1 /* SymbolFlags.FunctionScopedVariable */, "props");
|
|
77834
77834
|
parameterSymbol.type = result;
|
|
77835
|
-
return createSignature(declaration,
|
|
77836
|
-
/*typeParameters*/ undefined,
|
|
77837
|
-
/*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType,
|
|
77835
|
+
return createSignature(declaration,
|
|
77836
|
+
/*typeParameters*/ undefined,
|
|
77837
|
+
/*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType,
|
|
77838
77838
|
/*returnTypePredicate*/ undefined, 1, 0 /* SignatureFlags.None */);
|
|
77839
77839
|
}
|
|
77840
77840
|
function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) {
|
|
@@ -81067,7 +81067,7 @@ var ts;
|
|
|
81067
81067
|
else {
|
|
81068
81068
|
if (typePredicate.type) {
|
|
81069
81069
|
var leadingError = function () { return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type); };
|
|
81070
|
-
checkTypeAssignableTo(typePredicate.type, getTypeOfSymbol(signature.parameters[typePredicate.parameterIndex]), node.type,
|
|
81070
|
+
checkTypeAssignableTo(typePredicate.type, getTypeOfSymbol(signature.parameters[typePredicate.parameterIndex]), node.type,
|
|
81071
81071
|
/*headMessage*/ undefined, leadingError);
|
|
81072
81072
|
}
|
|
81073
81073
|
}
|
|
@@ -83780,7 +83780,7 @@ var ts;
|
|
|
83780
83780
|
|| testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
|
|
83781
83781
|
if (!isUsed) {
|
|
83782
83782
|
if (isPromise) {
|
|
83783
|
-
errorAndMaybeSuggestAwait(location,
|
|
83783
|
+
errorAndMaybeSuggestAwait(location,
|
|
83784
83784
|
/*maybeMissingAwait*/ true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
|
|
83785
83785
|
}
|
|
83786
83786
|
else {
|
|
@@ -85330,12 +85330,12 @@ var ts;
|
|
|
85330
85330
|
if (ts.isConstructorDeclaration(member)) {
|
|
85331
85331
|
ts.forEach(member.parameters, function (param) {
|
|
85332
85332
|
if (ts.isParameterPropertyDeclaration(param, member)) {
|
|
85333
|
-
checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, param,
|
|
85333
|
+
checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, param,
|
|
85334
85334
|
/* memberIsParameterProperty */ true);
|
|
85335
85335
|
}
|
|
85336
85336
|
});
|
|
85337
85337
|
}
|
|
85338
|
-
checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member,
|
|
85338
|
+
checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member,
|
|
85339
85339
|
/* memberIsParameterProperty */ false);
|
|
85340
85340
|
};
|
|
85341
85341
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
@@ -85488,7 +85488,7 @@ var ts;
|
|
|
85488
85488
|
? ts.hasOverrideModifier(member)
|
|
85489
85489
|
: ts.hasSyntacticModifier(member, 16384 /* ModifierFlags.Override */);
|
|
85490
85490
|
var memberName = ts.unescapeLeadingUnderscores(ts.getTextOfPropertyName(member.name));
|
|
85491
|
-
return checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, ts.hasAbstractModifier(member), ts.isStatic(member),
|
|
85491
|
+
return checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, ts.hasAbstractModifier(member), ts.isStatic(member),
|
|
85492
85492
|
/* memberIsParameterProperty */ false, memberName);
|
|
85493
85493
|
}
|
|
85494
85494
|
function getTargetSymbol(s) {
|
|
@@ -86608,7 +86608,7 @@ var ts;
|
|
|
86608
86608
|
if (!node.parent.parent.moduleSpecifier) {
|
|
86609
86609
|
var exportedName = node.propertyName || node.name;
|
|
86610
86610
|
// find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases)
|
|
86611
|
-
var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* SymbolFlags.Value */ | 788968 /* SymbolFlags.Type */ | 1920 /* SymbolFlags.Namespace */ | 2097152 /* SymbolFlags.Alias */,
|
|
86611
|
+
var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* SymbolFlags.Value */ | 788968 /* SymbolFlags.Type */ | 1920 /* SymbolFlags.Namespace */ | 2097152 /* SymbolFlags.Alias */,
|
|
86612
86612
|
/*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true);
|
|
86613
86613
|
if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) {
|
|
86614
86614
|
error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName));
|
|
@@ -87453,7 +87453,7 @@ var ts;
|
|
|
87453
87453
|
}
|
|
87454
87454
|
if (name.parent.kind === 271 /* SyntaxKind.ExportAssignment */ && ts.isEntityNameExpression(name)) {
|
|
87455
87455
|
// Even an entity name expression that doesn't resolve as an entityname may still typecheck as a property access expression
|
|
87456
|
-
var success = resolveEntityName(name,
|
|
87456
|
+
var success = resolveEntityName(name,
|
|
87457
87457
|
/*all meanings*/ 111551 /* SymbolFlags.Value */ | 788968 /* SymbolFlags.Type */ | 1920 /* SymbolFlags.Namespace */ | 2097152 /* SymbolFlags.Alias */, /*ignoreErrors*/ true);
|
|
87458
87458
|
if (success && success !== unknownSymbol) {
|
|
87459
87459
|
return success;
|
|
@@ -90698,14 +90698,14 @@ var ts;
|
|
|
90698
90698
|
var factory = context.factory;
|
|
90699
90699
|
context.addInitializationStatement(factory.createVariableStatement(
|
|
90700
90700
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
90701
|
-
factory.createVariableDeclaration(parameter.name,
|
|
90701
|
+
factory.createVariableDeclaration(parameter.name,
|
|
90702
90702
|
/*exclamationToken*/ undefined, parameter.type, parameter.initializer ?
|
|
90703
|
-
factory.createConditionalExpression(factory.createStrictEquality(factory.getGeneratedNameForNode(parameter), factory.createVoidZero()),
|
|
90704
|
-
/*questionToken*/ undefined, parameter.initializer,
|
|
90703
|
+
factory.createConditionalExpression(factory.createStrictEquality(factory.getGeneratedNameForNode(parameter), factory.createVoidZero()),
|
|
90704
|
+
/*questionToken*/ undefined, parameter.initializer,
|
|
90705
90705
|
/*colonToken*/ undefined, factory.getGeneratedNameForNode(parameter)) :
|
|
90706
90706
|
factory.getGeneratedNameForNode(parameter)),
|
|
90707
90707
|
])));
|
|
90708
|
-
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, factory.getGeneratedNameForNode(parameter), parameter.questionToken, parameter.type,
|
|
90708
|
+
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, factory.getGeneratedNameForNode(parameter), parameter.questionToken, parameter.type,
|
|
90709
90709
|
/*initializer*/ undefined);
|
|
90710
90710
|
}
|
|
90711
90711
|
function addDefaultValueAssignmentForInitializer(parameter, name, initializer, context) {
|
|
@@ -90713,7 +90713,7 @@ var ts;
|
|
|
90713
90713
|
context.addInitializationStatement(factory.createIfStatement(factory.createTypeCheck(factory.cloneNode(name), "undefined"), ts.setEmitFlags(ts.setTextRange(factory.createBlock([
|
|
90714
90714
|
factory.createExpressionStatement(ts.setEmitFlags(ts.setTextRange(factory.createAssignment(ts.setEmitFlags(factory.cloneNode(name), 48 /* EmitFlags.NoSourceMap */), ts.setEmitFlags(initializer, 48 /* EmitFlags.NoSourceMap */ | ts.getEmitFlags(initializer) | 1536 /* EmitFlags.NoComments */)), parameter), 1536 /* EmitFlags.NoComments */))
|
|
90715
90715
|
]), parameter), 1 /* EmitFlags.SingleLine */ | 32 /* EmitFlags.NoTrailingSourceMap */ | 384 /* EmitFlags.NoTokenSourceMaps */ | 1536 /* EmitFlags.NoComments */)));
|
|
90716
|
-
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, parameter.name, parameter.questionToken, parameter.type,
|
|
90716
|
+
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, parameter.name, parameter.questionToken, parameter.type,
|
|
90717
90717
|
/*initializer*/ undefined);
|
|
90718
90718
|
}
|
|
90719
90719
|
function visitFunctionBody(node, visitor, context, nodeVisitor) {
|
|
@@ -90789,7 +90789,7 @@ var ts;
|
|
|
90789
90789
|
return factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
90790
90790
|
case 167 /* SyntaxKind.PropertyDeclaration */:
|
|
90791
90791
|
ts.Debug.type(node);
|
|
90792
|
-
return factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName),
|
|
90792
|
+
return factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName),
|
|
90793
90793
|
// QuestionToken and ExclamationToken is uniqued in Property Declaration and the signature of 'updateProperty' is that too
|
|
90794
90794
|
nodeVisitor(node.questionToken || node.exclamationToken, tokenVisitor, ts.isQuestionOrExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
90795
90795
|
case 168 /* SyntaxKind.MethodSignature */:
|
|
@@ -91261,7 +91261,7 @@ var ts;
|
|
|
91261
91261
|
};
|
|
91262
91262
|
function addSource(fileName) {
|
|
91263
91263
|
enter();
|
|
91264
|
-
var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, fileName, host.getCurrentDirectory(), host.getCanonicalFileName,
|
|
91264
|
+
var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, fileName, host.getCurrentDirectory(), host.getCanonicalFileName,
|
|
91265
91265
|
/*isAbsolutePathAnUrl*/ true);
|
|
91266
91266
|
var sourceIndex = sourceToSourceIndexMap.get(source);
|
|
91267
91267
|
if (sourceIndex === undefined) {
|
|
@@ -92519,8 +92519,8 @@ var ts;
|
|
|
92519
92519
|
}
|
|
92520
92520
|
for (var _i = 0, pendingDeclarations_1 = pendingDeclarations; _i < pendingDeclarations_1.length; _i++) {
|
|
92521
92521
|
var _a = pendingDeclarations_1[_i], pendingExpressions_1 = _a.pendingExpressions, name = _a.name, value = _a.value, location = _a.location, original = _a.original;
|
|
92522
|
-
var variable = context.factory.createVariableDeclaration(name,
|
|
92523
|
-
/*exclamationToken*/ undefined,
|
|
92522
|
+
var variable = context.factory.createVariableDeclaration(name,
|
|
92523
|
+
/*exclamationToken*/ undefined,
|
|
92524
92524
|
/*type*/ undefined, pendingExpressions_1 ? context.factory.inlineExpressions(ts.append(pendingExpressions_1, value)) : value);
|
|
92525
92525
|
variable.original = original;
|
|
92526
92526
|
ts.setTextRange(variable, location);
|
|
@@ -92655,7 +92655,7 @@ var ts;
|
|
|
92655
92655
|
// Read the elements of the iterable into an array
|
|
92656
92656
|
value = ensureIdentifier(flattenContext, ts.setTextRange(flattenContext.context.getEmitHelperFactory().createReadHelper(value, numElements > 0 && ts.getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1])
|
|
92657
92657
|
? undefined
|
|
92658
|
-
: numElements), location),
|
|
92658
|
+
: numElements), location),
|
|
92659
92659
|
/*reuseIdentifierExpressions*/ false, location);
|
|
92660
92660
|
}
|
|
92661
92661
|
else if (numElements !== 1 && (flattenContext.level < 1 /* FlattenLevel.ObjectRest */ || numElements === 0)
|
|
@@ -93417,7 +93417,7 @@ var ts;
|
|
|
93417
93417
|
}
|
|
93418
93418
|
function visitClassDeclaration(node) {
|
|
93419
93419
|
if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !(currentNamespace && ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */))) {
|
|
93420
|
-
return factory.updateClassDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
|
|
93420
|
+
return factory.updateClassDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
|
|
93421
93421
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
93422
93422
|
}
|
|
93423
93423
|
var staticProperties = ts.getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true);
|
|
@@ -93435,7 +93435,7 @@ var ts;
|
|
|
93435
93435
|
// ${modifiers} class ${name} ${heritageClauses} {
|
|
93436
93436
|
// ${members}
|
|
93437
93437
|
// }
|
|
93438
|
-
var classStatement = factory.updateClassDeclaration(node, ts.concatenate(decorators, modifiers), name,
|
|
93438
|
+
var classStatement = factory.updateClassDeclaration(node, ts.concatenate(decorators, modifiers), name,
|
|
93439
93439
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node));
|
|
93440
93440
|
// To better align with the old emitter, we should not emit a trailing source map
|
|
93441
93441
|
// entry if the class has static properties.
|
|
@@ -93473,8 +93473,8 @@ var ts;
|
|
|
93473
93473
|
ts.setEmitFlags(iife, 33554432 /* EmitFlags.TypeScriptClassWrapper */);
|
|
93474
93474
|
var varStatement = factory.createVariableStatement(
|
|
93475
93475
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
93476
|
-
factory.createVariableDeclaration(factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false),
|
|
93477
|
-
/*exclamationToken*/ undefined,
|
|
93476
|
+
factory.createVariableDeclaration(factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false),
|
|
93477
|
+
/*exclamationToken*/ undefined,
|
|
93478
93478
|
/*type*/ undefined, iife)
|
|
93479
93479
|
]));
|
|
93480
93480
|
ts.setOriginalNode(varStatement, node);
|
|
@@ -93507,7 +93507,7 @@ var ts;
|
|
|
93507
93507
|
function visitClassExpression(node) {
|
|
93508
93508
|
var allDecorators = ts.getAllDecoratorsOfClass(node);
|
|
93509
93509
|
var decorators = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
|
|
93510
|
-
return factory.updateClassExpression(node, decorators, node.name,
|
|
93510
|
+
return factory.updateClassExpression(node, decorators, node.name,
|
|
93511
93511
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), isClassLikeDeclarationWithTypeScriptSyntax(node) ?
|
|
93512
93512
|
transformClassMembers(node) :
|
|
93513
93513
|
ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
@@ -93527,9 +93527,9 @@ var ts;
|
|
|
93527
93527
|
var parameter = parametersWithPropertyAssignments_1[_i];
|
|
93528
93528
|
if (ts.isIdentifier(parameter.name)) {
|
|
93529
93529
|
members.push(ts.setOriginalNode(factory.createPropertyDeclaration(
|
|
93530
|
-
/*modifiers*/ undefined, parameter.name,
|
|
93531
|
-
/*questionOrExclamationToken*/ undefined,
|
|
93532
|
-
/*type*/ undefined,
|
|
93530
|
+
/*modifiers*/ undefined, parameter.name,
|
|
93531
|
+
/*questionOrExclamationToken*/ undefined,
|
|
93532
|
+
/*type*/ undefined,
|
|
93533
93533
|
/*initializer*/ undefined), parameter));
|
|
93534
93534
|
}
|
|
93535
93535
|
}
|
|
@@ -93745,7 +93745,7 @@ var ts;
|
|
|
93745
93745
|
* @param node The ExpressionWithTypeArguments to transform.
|
|
93746
93746
|
*/
|
|
93747
93747
|
function visitExpressionWithTypeArguments(node) {
|
|
93748
|
-
return factory.updateExpressionWithTypeArguments(node, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression),
|
|
93748
|
+
return factory.updateExpressionWithTypeArguments(node, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression),
|
|
93749
93749
|
/*typeArguments*/ undefined);
|
|
93750
93750
|
}
|
|
93751
93751
|
/**
|
|
@@ -93766,20 +93766,20 @@ var ts;
|
|
|
93766
93766
|
var decorators = transformAllDecoratorsOfDeclaration(node, parent, allDecorators);
|
|
93767
93767
|
// Preserve a `declare x` property with decorators to be handled by the decorators transform
|
|
93768
93768
|
if (isAmbient) {
|
|
93769
|
-
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2 /* ModifierFlags.Ambient */)), ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
93770
|
-
/*questionOrExclamationToken*/ undefined,
|
|
93771
|
-
/*type*/ undefined,
|
|
93769
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2 /* ModifierFlags.Ambient */)), ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
93770
|
+
/*questionOrExclamationToken*/ undefined,
|
|
93771
|
+
/*type*/ undefined,
|
|
93772
93772
|
/*initializer*/ undefined);
|
|
93773
93773
|
}
|
|
93774
|
-
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node),
|
|
93775
|
-
/*questionOrExclamationToken*/ undefined,
|
|
93774
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node),
|
|
93775
|
+
/*questionOrExclamationToken*/ undefined,
|
|
93776
93776
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor));
|
|
93777
93777
|
}
|
|
93778
93778
|
function visitConstructor(node) {
|
|
93779
93779
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
93780
93780
|
return undefined;
|
|
93781
93781
|
}
|
|
93782
|
-
return factory.updateConstructorDeclaration(node,
|
|
93782
|
+
return factory.updateConstructorDeclaration(node,
|
|
93783
93783
|
/*modifiers*/ undefined, ts.visitParameterList(node.parameters, visitor, context), transformConstructorBody(node.body, node));
|
|
93784
93784
|
}
|
|
93785
93785
|
function transformConstructorBody(body, constructor) {
|
|
@@ -93854,9 +93854,9 @@ var ts;
|
|
|
93854
93854
|
}
|
|
93855
93855
|
var allDecorators = ts.isClassLike(parent) ? ts.getAllDecoratorsOfClassElement(node, parent) : undefined;
|
|
93856
93856
|
var decorators = ts.isClassLike(parent) ? transformAllDecoratorsOfDeclaration(node, parent, allDecorators) : undefined;
|
|
93857
|
-
return factory.updateMethodDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), node.asteriskToken, visitPropertyNameOfClassElement(node),
|
|
93858
|
-
/*questionToken*/ undefined,
|
|
93859
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93857
|
+
return factory.updateMethodDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), node.asteriskToken, visitPropertyNameOfClassElement(node),
|
|
93858
|
+
/*questionToken*/ undefined,
|
|
93859
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93860
93860
|
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context));
|
|
93861
93861
|
}
|
|
93862
93862
|
/**
|
|
@@ -93878,7 +93878,7 @@ var ts;
|
|
|
93878
93878
|
var decorators = ts.isClassLike(parent) ?
|
|
93879
93879
|
transformAllDecoratorsOfDeclaration(node, parent, ts.getAllDecoratorsOfClassElement(node, parent)) :
|
|
93880
93880
|
undefined;
|
|
93881
|
-
return factory.updateGetAccessorDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), ts.visitParameterList(node.parameters, visitor, context),
|
|
93881
|
+
return factory.updateGetAccessorDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), ts.visitParameterList(node.parameters, visitor, context),
|
|
93882
93882
|
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || factory.createBlock([]));
|
|
93883
93883
|
}
|
|
93884
93884
|
function visitSetAccessor(node, parent) {
|
|
@@ -93897,8 +93897,8 @@ var ts;
|
|
|
93897
93897
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
93898
93898
|
return factory.createNotEmittedStatement(node);
|
|
93899
93899
|
}
|
|
93900
|
-
var updated = factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
|
|
93901
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93900
|
+
var updated = factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
|
|
93901
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93902
93902
|
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || factory.createBlock([]));
|
|
93903
93903
|
if (isExportOfNamespace(node)) {
|
|
93904
93904
|
var statements = [updated];
|
|
@@ -93911,14 +93911,14 @@ var ts;
|
|
|
93911
93911
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
93912
93912
|
return factory.createOmittedExpression();
|
|
93913
93913
|
}
|
|
93914
|
-
var updated = factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
|
|
93915
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93914
|
+
var updated = factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name,
|
|
93915
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93916
93916
|
/*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context) || factory.createBlock([]));
|
|
93917
93917
|
return updated;
|
|
93918
93918
|
}
|
|
93919
93919
|
function visitArrowFunction(node) {
|
|
93920
|
-
var updated = factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier),
|
|
93921
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93920
|
+
var updated = factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier),
|
|
93921
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
93922
93922
|
/*type*/ undefined, node.equalsGreaterThanToken, ts.visitFunctionBody(node.body, visitor, context));
|
|
93923
93923
|
return updated;
|
|
93924
93924
|
}
|
|
@@ -93927,8 +93927,8 @@ var ts;
|
|
|
93927
93927
|
return undefined;
|
|
93928
93928
|
}
|
|
93929
93929
|
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), // preserve positions, if available
|
|
93930
|
-
node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
93931
|
-
/*questionToken*/ undefined,
|
|
93930
|
+
node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
93931
|
+
/*questionToken*/ undefined,
|
|
93932
93932
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
93933
93933
|
if (updated !== node) {
|
|
93934
93934
|
// While we emit the source map for the node after skipping decorators and modifiers,
|
|
@@ -93956,17 +93956,17 @@ var ts;
|
|
|
93956
93956
|
function transformInitializedVariable(node) {
|
|
93957
93957
|
var name = node.name;
|
|
93958
93958
|
if (ts.isBindingPattern(name)) {
|
|
93959
|
-
return ts.flattenDestructuringAssignment(node, visitor, context, 0 /* FlattenLevel.All */,
|
|
93959
|
+
return ts.flattenDestructuringAssignment(node, visitor, context, 0 /* FlattenLevel.All */,
|
|
93960
93960
|
/*needsValue*/ false, createNamespaceExportExpression);
|
|
93961
93961
|
}
|
|
93962
93962
|
else {
|
|
93963
|
-
return ts.setTextRange(factory.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)),
|
|
93963
|
+
return ts.setTextRange(factory.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)),
|
|
93964
93964
|
/*location*/ node);
|
|
93965
93965
|
}
|
|
93966
93966
|
}
|
|
93967
93967
|
function visitVariableDeclaration(node) {
|
|
93968
|
-
var updated = factory.updateVariableDeclaration(node, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
93969
|
-
/*exclamationToken*/ undefined,
|
|
93968
|
+
var updated = factory.updateVariableDeclaration(node, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
93969
|
+
/*exclamationToken*/ undefined,
|
|
93970
93970
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
93971
93971
|
if (node.type) {
|
|
93972
93972
|
ts.setTypeNode(updated.name, node.type);
|
|
@@ -94009,23 +94009,23 @@ var ts;
|
|
|
94009
94009
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
94010
94010
|
}
|
|
94011
94011
|
function visitCallExpression(node) {
|
|
94012
|
-
return factory.updateCallExpression(node, ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
94012
|
+
return factory.updateCallExpression(node, ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
94013
94013
|
/*typeArguments*/ undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
|
|
94014
94014
|
}
|
|
94015
94015
|
function visitNewExpression(node) {
|
|
94016
|
-
return factory.updateNewExpression(node, ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
94016
|
+
return factory.updateNewExpression(node, ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
94017
94017
|
/*typeArguments*/ undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
|
|
94018
94018
|
}
|
|
94019
94019
|
function visitTaggedTemplateExpression(node) {
|
|
94020
|
-
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression),
|
|
94020
|
+
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression),
|
|
94021
94021
|
/*typeArguments*/ undefined, ts.visitNode(node.template, visitor, ts.isExpression));
|
|
94022
94022
|
}
|
|
94023
94023
|
function visitJsxSelfClosingElement(node) {
|
|
94024
|
-
return factory.updateJsxSelfClosingElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression),
|
|
94024
|
+
return factory.updateJsxSelfClosingElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression),
|
|
94025
94025
|
/*typeArguments*/ undefined, ts.visitNode(node.attributes, visitor, ts.isJsxAttributes));
|
|
94026
94026
|
}
|
|
94027
94027
|
function visitJsxJsxOpeningElement(node) {
|
|
94028
|
-
return factory.updateJsxOpeningElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression),
|
|
94028
|
+
return factory.updateJsxOpeningElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression),
|
|
94029
94029
|
/*typeArguments*/ undefined, ts.visitNode(node.attributes, visitor, ts.isJsxAttributes));
|
|
94030
94030
|
}
|
|
94031
94031
|
/**
|
|
@@ -94084,11 +94084,11 @@ var ts;
|
|
|
94084
94084
|
// ...
|
|
94085
94085
|
// })(x || (x = {}));
|
|
94086
94086
|
var enumStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(
|
|
94087
|
-
/*modifiers*/ undefined,
|
|
94088
|
-
/*asteriskToken*/ undefined,
|
|
94089
|
-
/*name*/ undefined,
|
|
94090
|
-
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
|
|
94091
|
-
/*type*/ undefined, transformEnumBody(node, containerName)),
|
|
94087
|
+
/*modifiers*/ undefined,
|
|
94088
|
+
/*asteriskToken*/ undefined,
|
|
94089
|
+
/*name*/ undefined,
|
|
94090
|
+
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
|
|
94091
|
+
/*type*/ undefined, transformEnumBody(node, containerName)),
|
|
94092
94092
|
/*typeArguments*/ undefined, [moduleArg]));
|
|
94093
94093
|
ts.setOriginalNode(enumStatement, node);
|
|
94094
94094
|
if (varAdded) {
|
|
@@ -94118,7 +94118,7 @@ var ts;
|
|
|
94118
94118
|
ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
94119
94119
|
ts.addRange(statements, members);
|
|
94120
94120
|
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
|
|
94121
|
-
return factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), /*location*/ node.members),
|
|
94121
|
+
return factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), /*location*/ node.members),
|
|
94122
94122
|
/*multiLine*/ true);
|
|
94123
94123
|
}
|
|
94124
94124
|
/**
|
|
@@ -94314,11 +94314,11 @@ var ts;
|
|
|
94314
94314
|
// x_1.y = ...;
|
|
94315
94315
|
// })(x || (x = {}));
|
|
94316
94316
|
var moduleStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(
|
|
94317
|
-
/*modifiers*/ undefined,
|
|
94318
|
-
/*asteriskToken*/ undefined,
|
|
94319
|
-
/*name*/ undefined,
|
|
94320
|
-
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
|
|
94321
|
-
/*type*/ undefined, transformModuleBody(node, containerName)),
|
|
94317
|
+
/*modifiers*/ undefined,
|
|
94318
|
+
/*asteriskToken*/ undefined,
|
|
94319
|
+
/*name*/ undefined,
|
|
94320
|
+
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
|
|
94321
|
+
/*type*/ undefined, transformModuleBody(node, containerName)),
|
|
94322
94322
|
/*typeArguments*/ undefined, [moduleArg]));
|
|
94323
94323
|
ts.setOriginalNode(moduleStatement, node);
|
|
94324
94324
|
if (varAdded) {
|
|
@@ -94374,8 +94374,8 @@ var ts;
|
|
|
94374
94374
|
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
|
|
94375
94375
|
currentNamespace = savedCurrentNamespace;
|
|
94376
94376
|
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
|
|
94377
|
-
var block = factory.createBlock(ts.setTextRange(factory.createNodeArray(statements),
|
|
94378
|
-
/*location*/ statementsLocation),
|
|
94377
|
+
var block = factory.createBlock(ts.setTextRange(factory.createNodeArray(statements),
|
|
94378
|
+
/*location*/ statementsLocation),
|
|
94379
94379
|
/*multiLine*/ true);
|
|
94380
94380
|
ts.setTextRange(block, blockLocation);
|
|
94381
94381
|
// namespace hello.hi.world {
|
|
@@ -94429,7 +94429,7 @@ var ts;
|
|
|
94429
94429
|
return importClause ||
|
|
94430
94430
|
compilerOptions.importsNotUsedAsValues === 1 /* ImportsNotUsedAsValues.Preserve */ ||
|
|
94431
94431
|
compilerOptions.importsNotUsedAsValues === 2 /* ImportsNotUsedAsValues.Error */
|
|
94432
|
-
? factory.updateImportDeclaration(node,
|
|
94432
|
+
? factory.updateImportDeclaration(node,
|
|
94433
94433
|
/*modifiers*/ undefined, importClause, node.moduleSpecifier, node.assertClause)
|
|
94434
94434
|
: undefined;
|
|
94435
94435
|
}
|
|
@@ -94503,7 +94503,7 @@ var ts;
|
|
|
94503
94503
|
compilerOptions.importsNotUsedAsValues === 2 /* ImportsNotUsedAsValues.Error */);
|
|
94504
94504
|
var exportClause = ts.visitNode(node.exportClause, function (bindings) { return visitNamedExportBindings(bindings, allowEmpty); }, ts.isNamedExportBindings);
|
|
94505
94505
|
return exportClause
|
|
94506
|
-
? factory.updateExportDeclaration(node,
|
|
94506
|
+
? factory.updateExportDeclaration(node,
|
|
94507
94507
|
/*modifiers*/ undefined, node.isTypeOnly, exportClause, node.moduleSpecifier, node.assertClause)
|
|
94508
94508
|
: undefined;
|
|
94509
94509
|
}
|
|
@@ -94561,8 +94561,8 @@ var ts;
|
|
|
94561
94561
|
// If the alias is unreferenced but we want to keep the import, replace with 'import "mod"'.
|
|
94562
94562
|
if (!isReferenced && compilerOptions.importsNotUsedAsValues === 1 /* ImportsNotUsedAsValues.Preserve */) {
|
|
94563
94563
|
return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(
|
|
94564
|
-
/*modifiers*/ undefined,
|
|
94565
|
-
/*importClause*/ undefined, node.moduleReference.expression,
|
|
94564
|
+
/*modifiers*/ undefined,
|
|
94565
|
+
/*importClause*/ undefined, node.moduleReference.expression,
|
|
94566
94566
|
/*assertClause*/ undefined), node), node);
|
|
94567
94567
|
}
|
|
94568
94568
|
return isReferenced ? ts.visitEachChild(node, visitor, context) : undefined;
|
|
@@ -94576,8 +94576,8 @@ var ts;
|
|
|
94576
94576
|
// export var ${name} = ${moduleReference};
|
|
94577
94577
|
// var ${name} = ${moduleReference};
|
|
94578
94578
|
return ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.createVariableDeclarationList([
|
|
94579
|
-
ts.setOriginalNode(factory.createVariableDeclaration(node.name,
|
|
94580
|
-
/*exclamationToken*/ undefined,
|
|
94579
|
+
ts.setOriginalNode(factory.createVariableDeclaration(node.name,
|
|
94580
|
+
/*exclamationToken*/ undefined,
|
|
94581
94581
|
/*type*/ undefined, moduleReference), node)
|
|
94582
94582
|
])), node), node);
|
|
94583
94583
|
}
|
|
@@ -94754,7 +94754,7 @@ var ts;
|
|
|
94754
94754
|
var substitute = (applicableSubstitutions & 2 /* TypeScriptSubstitutionFlags.NamespaceExports */ && container.kind === 261 /* SyntaxKind.ModuleDeclaration */) ||
|
|
94755
94755
|
(applicableSubstitutions & 8 /* TypeScriptSubstitutionFlags.NonQualifiedEnumMembers */ && container.kind === 260 /* SyntaxKind.EnumDeclaration */);
|
|
94756
94756
|
if (substitute) {
|
|
94757
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(container), node),
|
|
94757
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(container), node),
|
|
94758
94758
|
/*location*/ node);
|
|
94759
94759
|
}
|
|
94760
94760
|
}
|
|
@@ -95049,8 +95049,8 @@ var ts;
|
|
|
95049
95049
|
}
|
|
95050
95050
|
var functionName = getHoistedFunctionName(node);
|
|
95051
95051
|
if (functionName) {
|
|
95052
|
-
getPendingExpressions().push(factory.createAssignment(functionName, factory.createFunctionExpression(ts.filter(node.modifiers, function (m) { return ts.isModifier(m) && !ts.isStaticModifier(m); }), node.asteriskToken, functionName,
|
|
95053
|
-
/* typeParameters */ undefined, ts.visitParameterList(node.parameters, classElementVisitor, context),
|
|
95052
|
+
getPendingExpressions().push(factory.createAssignment(functionName, factory.createFunctionExpression(ts.filter(node.modifiers, function (m) { return ts.isModifier(m) && !ts.isStaticModifier(m); }), node.asteriskToken, functionName,
|
|
95053
|
+
/* typeParameters */ undefined, ts.visitParameterList(node.parameters, classElementVisitor, context),
|
|
95054
95054
|
/* type */ undefined, ts.visitFunctionBody(node.body, classElementVisitor, context))));
|
|
95055
95055
|
}
|
|
95056
95056
|
// remove method declaration from class
|
|
@@ -95081,9 +95081,9 @@ var ts;
|
|
|
95081
95081
|
return ts.visitEachChild(node, visitor, context);
|
|
95082
95082
|
}
|
|
95083
95083
|
// Initializer is elided as the field is initialized in transformConstructor.
|
|
95084
|
-
return factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name,
|
|
95085
|
-
/*questionOrExclamationToken*/ undefined,
|
|
95086
|
-
/*type*/ undefined,
|
|
95084
|
+
return factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name,
|
|
95085
|
+
/*questionOrExclamationToken*/ undefined,
|
|
95086
|
+
/*type*/ undefined,
|
|
95087
95087
|
/*initializer*/ undefined);
|
|
95088
95088
|
}
|
|
95089
95089
|
// leave invalid code untransformed
|
|
@@ -95273,11 +95273,11 @@ var ts;
|
|
|
95273
95273
|
// Transform call expressions of private names to properly bind the `this` parameter.
|
|
95274
95274
|
var _a = factory.createCallBinding(node.expression, hoistVariableDeclaration, languageVersion), thisArg = _a.thisArg, target = _a.target;
|
|
95275
95275
|
if (ts.isCallChain(node)) {
|
|
95276
|
-
return factory.updateCallChain(node, factory.createPropertyAccessChain(ts.visitNode(target, visitor), node.questionDotToken, "call"),
|
|
95277
|
-
/*questionDotToken*/ undefined,
|
|
95276
|
+
return factory.updateCallChain(node, factory.createPropertyAccessChain(ts.visitNode(target, visitor), node.questionDotToken, "call"),
|
|
95277
|
+
/*questionDotToken*/ undefined,
|
|
95278
95278
|
/*typeArguments*/ undefined, __spreadArray([ts.visitNode(thisArg, visitor, ts.isExpression)], ts.visitNodes(node.arguments, visitor, ts.isExpression), true));
|
|
95279
95279
|
}
|
|
95280
|
-
return factory.updateCallExpression(node, factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "call"),
|
|
95280
|
+
return factory.updateCallExpression(node, factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "call"),
|
|
95281
95281
|
/*typeArguments*/ undefined, __spreadArray([ts.visitNode(thisArg, visitor, ts.isExpression)], ts.visitNodes(node.arguments, visitor, ts.isExpression), true));
|
|
95282
95282
|
}
|
|
95283
95283
|
if (shouldTransformSuperInStaticInitializers &&
|
|
@@ -95296,8 +95296,8 @@ var ts;
|
|
|
95296
95296
|
if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifierPropertyAccessExpression(node.tag)) {
|
|
95297
95297
|
// Bind the `this` correctly for tagged template literals when the tag is a private identifier property access.
|
|
95298
95298
|
var _a = factory.createCallBinding(node.tag, hoistVariableDeclaration, languageVersion), thisArg = _a.thisArg, target = _a.target;
|
|
95299
|
-
return factory.updateTaggedTemplateExpression(node, factory.createCallExpression(factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "bind"),
|
|
95300
|
-
/*typeArguments*/ undefined, [ts.visitNode(thisArg, visitor, ts.isExpression)]),
|
|
95299
|
+
return factory.updateTaggedTemplateExpression(node, factory.createCallExpression(factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "bind"),
|
|
95300
|
+
/*typeArguments*/ undefined, [ts.visitNode(thisArg, visitor, ts.isExpression)]),
|
|
95301
95301
|
/*typeArguments*/ undefined, ts.visitNode(node.template, visitor, ts.isTemplateLiteral));
|
|
95302
95302
|
}
|
|
95303
95303
|
if (shouldTransformSuperInStaticInitializers &&
|
|
@@ -95308,7 +95308,7 @@ var ts;
|
|
|
95308
95308
|
var invocation = factory.createFunctionBindCall(ts.visitNode(node.tag, visitor, ts.isExpression), currentClassLexicalEnvironment.classConstructor, []);
|
|
95309
95309
|
ts.setOriginalNode(invocation, node);
|
|
95310
95310
|
ts.setTextRange(invocation, node);
|
|
95311
|
-
return factory.updateTaggedTemplateExpression(node, invocation,
|
|
95311
|
+
return factory.updateTaggedTemplateExpression(node, invocation,
|
|
95312
95312
|
/*typeArguments*/ undefined, ts.visitNode(node.template, visitor, ts.isTemplateLiteral));
|
|
95313
95313
|
}
|
|
95314
95314
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -95414,7 +95414,7 @@ var ts;
|
|
|
95414
95414
|
case "a" /* PrivateIdentifierKind.Accessor */:
|
|
95415
95415
|
return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind, info.setterName);
|
|
95416
95416
|
case "m" /* PrivateIdentifierKind.Method */:
|
|
95417
|
-
return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind,
|
|
95417
|
+
return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind,
|
|
95418
95418
|
/* f */ undefined);
|
|
95419
95419
|
case "f" /* PrivateIdentifierKind.Field */:
|
|
95420
95420
|
return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind, info.variableName);
|
|
@@ -95489,7 +95489,7 @@ var ts;
|
|
|
95489
95489
|
if (facts & 4 /* ClassFacts.NeedsClassSuperReference */) {
|
|
95490
95490
|
var temp = factory.createTempVariable(hoistVariableDeclaration, /*reserveInNestedScopes*/ true);
|
|
95491
95491
|
getClassLexicalEnvironment().superClassReference = temp;
|
|
95492
|
-
return factory.updateExpressionWithTypeArguments(node, factory.createAssignment(temp, ts.visitNode(node.expression, visitor, ts.isExpression)),
|
|
95492
|
+
return factory.updateExpressionWithTypeArguments(node, factory.createAssignment(temp, ts.visitNode(node.expression, visitor, ts.isExpression)),
|
|
95493
95493
|
/*typeArguments*/ undefined);
|
|
95494
95494
|
}
|
|
95495
95495
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -95513,7 +95513,7 @@ var ts;
|
|
|
95513
95513
|
var extendsClauseElement = ts.getEffectiveBaseTypeNode(node);
|
|
95514
95514
|
var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* SyntaxKind.NullKeyword */);
|
|
95515
95515
|
var statements = [
|
|
95516
|
-
factory.updateClassDeclaration(node, node.modifiers, node.name,
|
|
95516
|
+
factory.updateClassDeclaration(node, node.modifiers, node.name,
|
|
95517
95517
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass))
|
|
95518
95518
|
];
|
|
95519
95519
|
if (pendingClassReferenceAssignment) {
|
|
@@ -95565,7 +95565,7 @@ var ts;
|
|
|
95565
95565
|
temp = createClassTempVar();
|
|
95566
95566
|
getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp);
|
|
95567
95567
|
}
|
|
95568
|
-
var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name,
|
|
95568
|
+
var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name,
|
|
95569
95569
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass));
|
|
95570
95570
|
var hasTransformableStatics = shouldTransformPrivateElementsOrClassStaticBlocks && ts.some(staticPropertiesOrClassStaticBlocks, function (p) { return ts.isClassStaticBlockDeclaration(p) || !!p.initializer || ts.isPrivateIdentifier(p.name); });
|
|
95571
95571
|
if (hasTransformableStatics || ts.some(pendingExpressions)) {
|
|
@@ -95644,7 +95644,7 @@ var ts;
|
|
|
95644
95644
|
function createBrandCheckWeakSetForPrivateMethods() {
|
|
95645
95645
|
var weakSetName = getPrivateIdentifierEnvironment().weakSetName;
|
|
95646
95646
|
ts.Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
|
|
95647
|
-
getPendingExpressions().push(factory.createAssignment(weakSetName, factory.createNewExpression(factory.createIdentifier("WeakSet"),
|
|
95647
|
+
getPendingExpressions().push(factory.createAssignment(weakSetName, factory.createNewExpression(factory.createIdentifier("WeakSet"),
|
|
95648
95648
|
/*typeArguments*/ undefined, [])));
|
|
95649
95649
|
}
|
|
95650
95650
|
function isClassElementThatRequiresConstructorStatement(member) {
|
|
@@ -95707,7 +95707,7 @@ var ts;
|
|
|
95707
95707
|
//
|
|
95708
95708
|
// super(...arguments);
|
|
95709
95709
|
//
|
|
95710
|
-
statements.push(factory.createExpressionStatement(factory.createCallExpression(factory.createSuper(),
|
|
95710
|
+
statements.push(factory.createExpressionStatement(factory.createCallExpression(factory.createSuper(),
|
|
95711
95711
|
/*typeArguments*/ undefined, [factory.createSpreadElement(factory.createIdentifier("arguments"))])));
|
|
95712
95712
|
}
|
|
95713
95713
|
// Add the property initializers. Transforms this:
|
|
@@ -95761,9 +95761,9 @@ var ts;
|
|
|
95761
95761
|
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitBodyStatement, ts.isStatement, indexOfFirstStatementAfterSuperAndPrologue));
|
|
95762
95762
|
}
|
|
95763
95763
|
statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment());
|
|
95764
|
-
return ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements),
|
|
95765
|
-
/*location*/ constructor ? constructor.body.statements : node.members),
|
|
95766
|
-
/*multiLine*/ true),
|
|
95764
|
+
return ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements),
|
|
95765
|
+
/*location*/ constructor ? constructor.body.statements : node.members),
|
|
95766
|
+
/*multiLine*/ true),
|
|
95767
95767
|
/*location*/ constructor ? constructor.body : undefined);
|
|
95768
95768
|
function visitBodyStatement(statement) {
|
|
95769
95769
|
if (useDefineForClassFields && ts.isParameterPropertyDeclaration(ts.getOriginalNode(statement), constructor)) {
|
|
@@ -96194,7 +96194,7 @@ var ts;
|
|
|
96194
96194
|
variableName: undefined,
|
|
96195
96195
|
isValid: isValid,
|
|
96196
96196
|
});
|
|
96197
|
-
assignmentExpressions.push(factory.createAssignment(weakMapName, factory.createNewExpression(factory.createIdentifier("WeakMap"),
|
|
96197
|
+
assignmentExpressions.push(factory.createAssignment(weakMapName, factory.createNewExpression(factory.createIdentifier("WeakMap"),
|
|
96198
96198
|
/*typeArguments*/ undefined, [])));
|
|
96199
96199
|
}
|
|
96200
96200
|
else if (ts.isMethodDeclaration(node)) {
|
|
@@ -96408,11 +96408,11 @@ var ts;
|
|
|
96408
96408
|
]));
|
|
96409
96409
|
}
|
|
96410
96410
|
function createPrivateInstanceFieldInitializer(receiver, initializer, weakMapName) {
|
|
96411
|
-
return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(weakMapName, "set"),
|
|
96411
|
+
return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(weakMapName, "set"),
|
|
96412
96412
|
/*typeArguments*/ undefined, [receiver, initializer || ts.factory.createVoidZero()]);
|
|
96413
96413
|
}
|
|
96414
96414
|
function createPrivateInstanceMethodInitializer(receiver, weakSetName) {
|
|
96415
|
-
return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(weakSetName, "add"),
|
|
96415
|
+
return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(weakSetName, "add"),
|
|
96416
96416
|
/*typeArguments*/ undefined, [receiver]);
|
|
96417
96417
|
}
|
|
96418
96418
|
function isReservedPrivateName(node) {
|
|
@@ -96733,8 +96733,8 @@ var ts;
|
|
|
96733
96733
|
}
|
|
96734
96734
|
var serialized = serializeEntityNameAsExpressionFallback(node.typeName);
|
|
96735
96735
|
var temp = ts.factory.createTempVariable(hoistVariableDeclaration);
|
|
96736
|
-
return ts.factory.createConditionalExpression(ts.factory.createTypeCheck(ts.factory.createAssignment(temp, serialized), "function"),
|
|
96737
|
-
/*questionToken*/ undefined, temp,
|
|
96736
|
+
return ts.factory.createConditionalExpression(ts.factory.createTypeCheck(ts.factory.createAssignment(temp, serialized), "function"),
|
|
96737
|
+
/*questionToken*/ undefined, temp,
|
|
96738
96738
|
/*colonToken*/ undefined, ts.factory.createIdentifier("Object"));
|
|
96739
96739
|
case ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue:
|
|
96740
96740
|
return serializeEntityNameAsExpression(node.typeName);
|
|
@@ -96820,8 +96820,8 @@ var ts;
|
|
|
96820
96820
|
return ts.factory.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left), node.right);
|
|
96821
96821
|
}
|
|
96822
96822
|
function getGlobalConstructorWithFallback(name) {
|
|
96823
|
-
return ts.factory.createConditionalExpression(ts.factory.createTypeCheck(ts.factory.createIdentifier(name), "function"),
|
|
96824
|
-
/*questionToken*/ undefined, ts.factory.createIdentifier(name),
|
|
96823
|
+
return ts.factory.createConditionalExpression(ts.factory.createTypeCheck(ts.factory.createIdentifier(name), "function"),
|
|
96824
|
+
/*questionToken*/ undefined, ts.factory.createIdentifier(name),
|
|
96825
96825
|
/*colonToken*/ undefined, ts.factory.createIdentifier("Object"));
|
|
96826
96826
|
}
|
|
96827
96827
|
function getGlobalConstructor(name, minLanguageVersion) {
|
|
@@ -96946,7 +96946,7 @@ var ts;
|
|
|
96946
96946
|
var members = ts.visitNodes(node.members, visitor, ts.isClassElement);
|
|
96947
96947
|
var decorationStatements = [];
|
|
96948
96948
|
(_a = transformDecoratorsOfClassElements(node, members), members = _a.members, decorationStatements = _a.decorationStatements);
|
|
96949
|
-
var updated = factory.updateClassDeclaration(node, modifiers, name,
|
|
96949
|
+
var updated = factory.updateClassDeclaration(node, modifiers, name,
|
|
96950
96950
|
/*typeParameters*/ undefined, heritageClauses, members);
|
|
96951
96951
|
return ts.addRange([updated], decorationStatements);
|
|
96952
96952
|
}
|
|
@@ -97056,7 +97056,7 @@ var ts;
|
|
|
97056
97056
|
var decorationStatements = [];
|
|
97057
97057
|
(_a = transformDecoratorsOfClassElements(node, members), members = _a.members, decorationStatements = _a.decorationStatements);
|
|
97058
97058
|
var classExpression = factory.createClassExpression(
|
|
97059
|
-
/*modifiers*/ undefined, name,
|
|
97059
|
+
/*modifiers*/ undefined, name,
|
|
97060
97060
|
/*typeParameters*/ undefined, heritageClauses, members);
|
|
97061
97061
|
ts.setOriginalNode(classExpression, node);
|
|
97062
97062
|
ts.setTextRange(classExpression, location);
|
|
@@ -97064,8 +97064,8 @@ var ts;
|
|
|
97064
97064
|
// or decoratedClassAlias if the class contain self-reference.
|
|
97065
97065
|
var statement = factory.createVariableStatement(
|
|
97066
97066
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
97067
|
-
factory.createVariableDeclaration(declName,
|
|
97068
|
-
/*exclamationToken*/ undefined,
|
|
97067
|
+
factory.createVariableDeclaration(declName,
|
|
97068
|
+
/*exclamationToken*/ undefined,
|
|
97069
97069
|
/*type*/ undefined, classAlias ? factory.createAssignment(classAlias, classExpression) : classExpression)
|
|
97070
97070
|
], 1 /* NodeFlags.Let */));
|
|
97071
97071
|
ts.setOriginalNode(statement, node);
|
|
@@ -97078,7 +97078,7 @@ var ts;
|
|
|
97078
97078
|
}
|
|
97079
97079
|
function visitClassExpression(node) {
|
|
97080
97080
|
// Legacy decorators were not supported on class expressions
|
|
97081
|
-
return factory.updateClassExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
|
|
97081
|
+
return factory.updateClassExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name,
|
|
97082
97082
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement));
|
|
97083
97083
|
}
|
|
97084
97084
|
function visitConstructorDeclaration(node) {
|
|
@@ -97094,13 +97094,13 @@ var ts;
|
|
|
97094
97094
|
return updated;
|
|
97095
97095
|
}
|
|
97096
97096
|
function visitMethodDeclaration(node) {
|
|
97097
|
-
return finishClassElement(factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
97098
|
-
/*questionToken*/ undefined,
|
|
97099
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
97097
|
+
return finishClassElement(factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
97098
|
+
/*questionToken*/ undefined,
|
|
97099
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
97100
97100
|
/*type*/ undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
97101
97101
|
}
|
|
97102
97102
|
function visitGetAccessorDeclaration(node) {
|
|
97103
|
-
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
97103
|
+
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
97104
97104
|
/*type*/ undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
97105
97105
|
}
|
|
97106
97106
|
function visitSetAccessorDeclaration(node) {
|
|
@@ -97110,13 +97110,13 @@ var ts;
|
|
|
97110
97110
|
if (node.flags & 16777216 /* NodeFlags.Ambient */ || ts.hasSyntacticModifier(node, 2 /* ModifierFlags.Ambient */)) {
|
|
97111
97111
|
return undefined;
|
|
97112
97112
|
}
|
|
97113
|
-
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
97114
|
-
/*questionOrExclamationToken*/ undefined,
|
|
97113
|
+
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
97114
|
+
/*questionOrExclamationToken*/ undefined,
|
|
97115
97115
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
|
|
97116
97116
|
}
|
|
97117
97117
|
function visitParameterDeclaration(node) {
|
|
97118
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
97119
|
-
/*questionToken*/ undefined,
|
|
97118
|
+
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
97119
|
+
/*questionToken*/ undefined,
|
|
97120
97120
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
97121
97121
|
if (updated !== node) {
|
|
97122
97122
|
// While we emit the source map for the node after skipping decorators and modifiers,
|
|
@@ -97634,9 +97634,9 @@ var ts;
|
|
|
97634
97634
|
* @param node The node to visit.
|
|
97635
97635
|
*/
|
|
97636
97636
|
function visitMethodDeclaration(node) {
|
|
97637
|
-
return factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
97638
|
-
/*questionToken*/ undefined,
|
|
97639
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97637
|
+
return factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
97638
|
+
/*questionToken*/ undefined,
|
|
97639
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97640
97640
|
/*type*/ undefined, ts.getFunctionFlags(node) & 2 /* FunctionFlags.Async */
|
|
97641
97641
|
? transformAsyncFunctionBody(node)
|
|
97642
97642
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
@@ -97650,8 +97650,8 @@ var ts;
|
|
|
97650
97650
|
* @param node The node to visit.
|
|
97651
97651
|
*/
|
|
97652
97652
|
function visitFunctionDeclaration(node) {
|
|
97653
|
-
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
97654
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97653
|
+
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
97654
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97655
97655
|
/*type*/ undefined, ts.getFunctionFlags(node) & 2 /* FunctionFlags.Async */
|
|
97656
97656
|
? transformAsyncFunctionBody(node)
|
|
97657
97657
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
@@ -97665,8 +97665,8 @@ var ts;
|
|
|
97665
97665
|
* @param node The node to visit.
|
|
97666
97666
|
*/
|
|
97667
97667
|
function visitFunctionExpression(node) {
|
|
97668
|
-
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
97669
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97668
|
+
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
97669
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97670
97670
|
/*type*/ undefined, ts.getFunctionFlags(node) & 2 /* FunctionFlags.Async */
|
|
97671
97671
|
? transformAsyncFunctionBody(node)
|
|
97672
97672
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
@@ -97680,8 +97680,8 @@ var ts;
|
|
|
97680
97680
|
* @param node The node to visit.
|
|
97681
97681
|
*/
|
|
97682
97682
|
function visitArrowFunction(node) {
|
|
97683
|
-
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike),
|
|
97684
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97683
|
+
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike),
|
|
97684
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
97685
97685
|
/*type*/ undefined, node.equalsGreaterThanToken, ts.getFunctionFlags(node) & 2 /* FunctionFlags.Async */
|
|
97686
97686
|
? transformAsyncFunctionBody(node)
|
|
97687
97687
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
@@ -97934,7 +97934,7 @@ var ts;
|
|
|
97934
97934
|
var argumentExpression = ts.isPropertyAccessExpression(expression)
|
|
97935
97935
|
? substitutePropertyAccessExpression(expression)
|
|
97936
97936
|
: substituteElementAccessExpression(expression);
|
|
97937
|
-
return factory.createCallExpression(factory.createPropertyAccessExpression(argumentExpression, "call"),
|
|
97937
|
+
return factory.createCallExpression(factory.createPropertyAccessExpression(argumentExpression, "call"),
|
|
97938
97938
|
/*typeArguments*/ undefined, __spreadArray([
|
|
97939
97939
|
factory.createThis()
|
|
97940
97940
|
], node.arguments, true));
|
|
@@ -97951,11 +97951,11 @@ var ts;
|
|
|
97951
97951
|
}
|
|
97952
97952
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
97953
97953
|
if (enclosingSuperContainerFlags & 4096 /* NodeCheckFlags.AsyncMethodWithSuperBinding */) {
|
|
97954
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createCallExpression(factory.createUniqueName("_superIndex", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
97954
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createCallExpression(factory.createUniqueName("_superIndex", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
97955
97955
|
/*typeArguments*/ undefined, [argumentExpression]), "value"), location);
|
|
97956
97956
|
}
|
|
97957
97957
|
else {
|
|
97958
|
-
return ts.setTextRange(factory.createCallExpression(factory.createUniqueName("_superIndex", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
97958
|
+
return ts.setTextRange(factory.createCallExpression(factory.createUniqueName("_superIndex", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
97959
97959
|
/*typeArguments*/ undefined, [argumentExpression]), location);
|
|
97960
97960
|
}
|
|
97961
97961
|
}
|
|
@@ -97971,33 +97971,33 @@ var ts;
|
|
|
97971
97971
|
var name = ts.unescapeLeadingUnderscores(key);
|
|
97972
97972
|
var getterAndSetter = [];
|
|
97973
97973
|
getterAndSetter.push(factory.createPropertyAssignment("get", factory.createArrowFunction(
|
|
97974
|
-
/* modifiers */ undefined,
|
|
97975
|
-
/* typeParameters */ undefined,
|
|
97976
|
-
/* parameters */ [],
|
|
97977
|
-
/* type */ undefined,
|
|
97974
|
+
/* modifiers */ undefined,
|
|
97975
|
+
/* typeParameters */ undefined,
|
|
97976
|
+
/* parameters */ [],
|
|
97977
|
+
/* type */ undefined,
|
|
97978
97978
|
/* equalsGreaterThanToken */ undefined, ts.setEmitFlags(factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createSuper(), 4 /* EmitFlags.NoSubstitution */), name), 4 /* EmitFlags.NoSubstitution */))));
|
|
97979
97979
|
if (hasBinding) {
|
|
97980
97980
|
getterAndSetter.push(factory.createPropertyAssignment("set", factory.createArrowFunction(
|
|
97981
|
-
/* modifiers */ undefined,
|
|
97982
|
-
/* typeParameters */ undefined,
|
|
97981
|
+
/* modifiers */ undefined,
|
|
97982
|
+
/* typeParameters */ undefined,
|
|
97983
97983
|
/* parameters */ [
|
|
97984
97984
|
factory.createParameterDeclaration(
|
|
97985
|
-
/* modifiers */ undefined,
|
|
97986
|
-
/* dotDotDotToken */ undefined, "v",
|
|
97987
|
-
/* questionToken */ undefined,
|
|
97988
|
-
/* type */ undefined,
|
|
97985
|
+
/* modifiers */ undefined,
|
|
97986
|
+
/* dotDotDotToken */ undefined, "v",
|
|
97987
|
+
/* questionToken */ undefined,
|
|
97988
|
+
/* type */ undefined,
|
|
97989
97989
|
/* initializer */ undefined)
|
|
97990
|
-
],
|
|
97991
|
-
/* type */ undefined,
|
|
97990
|
+
],
|
|
97991
|
+
/* type */ undefined,
|
|
97992
97992
|
/* equalsGreaterThanToken */ undefined, factory.createAssignment(ts.setEmitFlags(factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createSuper(), 4 /* EmitFlags.NoSubstitution */), name), 4 /* EmitFlags.NoSubstitution */), factory.createIdentifier("v")))));
|
|
97993
97993
|
}
|
|
97994
97994
|
accessors.push(factory.createPropertyAssignment(name, factory.createObjectLiteralExpression(getterAndSetter)));
|
|
97995
97995
|
});
|
|
97996
97996
|
return factory.createVariableStatement(
|
|
97997
97997
|
/* modifiers */ undefined, factory.createVariableDeclarationList([
|
|
97998
|
-
factory.createVariableDeclaration(factory.createUniqueName("_super", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
97999
|
-
/*exclamationToken*/ undefined,
|
|
98000
|
-
/* type */ undefined, factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "create"),
|
|
97998
|
+
factory.createVariableDeclaration(factory.createUniqueName("_super", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
97999
|
+
/*exclamationToken*/ undefined,
|
|
98000
|
+
/* type */ undefined, factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "create"),
|
|
98001
98001
|
/* typeArguments */ undefined, [
|
|
98002
98002
|
factory.createNull(),
|
|
98003
98003
|
factory.createObjectLiteralExpression(accessors, /* multiline */ true)
|
|
@@ -98201,7 +98201,7 @@ var ts;
|
|
|
98201
98201
|
}
|
|
98202
98202
|
function visitAwaitExpression(node) {
|
|
98203
98203
|
if (enclosingFunctionFlags & 2 /* FunctionFlags.Async */ && enclosingFunctionFlags & 1 /* FunctionFlags.Generator */) {
|
|
98204
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createYieldExpression(/*asteriskToken*/ undefined, emitHelpers().createAwaitHelper(ts.visitNode(node.expression, visitor, ts.isExpression))),
|
|
98204
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createYieldExpression(/*asteriskToken*/ undefined, emitHelpers().createAwaitHelper(ts.visitNode(node.expression, visitor, ts.isExpression))),
|
|
98205
98205
|
/*location*/ node), node);
|
|
98206
98206
|
}
|
|
98207
98207
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -98407,7 +98407,7 @@ var ts;
|
|
|
98407
98407
|
function visitVariableDeclarationWorker(node, exportedVariableStatement) {
|
|
98408
98408
|
// If we are here it is because the name contains a binding pattern with a rest somewhere in it.
|
|
98409
98409
|
if (ts.isBindingPattern(node.name) && node.name.transformFlags & 65536 /* TransformFlags.ContainsObjectRestOrSpread */) {
|
|
98410
|
-
return ts.flattenDestructuringBinding(node, visitor, context, 1 /* FlattenLevel.ObjectRest */,
|
|
98410
|
+
return ts.flattenDestructuringBinding(node, visitor, context, 1 /* FlattenLevel.ObjectRest */,
|
|
98411
98411
|
/*rval*/ undefined, exportedVariableStatement);
|
|
98412
98412
|
}
|
|
98413
98413
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -98453,7 +98453,7 @@ var ts;
|
|
|
98453
98453
|
}
|
|
98454
98454
|
return factory.updateForOfStatement(node, node.awaitModifier, ts.setTextRange(factory.createVariableDeclarationList([
|
|
98455
98455
|
ts.setTextRange(factory.createVariableDeclaration(temp), node.initializer)
|
|
98456
|
-
], 1 /* NodeFlags.Let */), node.initializer), node.expression, ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), statementsLocation),
|
|
98456
|
+
], 1 /* NodeFlags.Let */), node.initializer), node.expression, ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), statementsLocation),
|
|
98457
98457
|
/*multiLine*/ true), bodyLocation));
|
|
98458
98458
|
}
|
|
98459
98459
|
return node;
|
|
@@ -98472,7 +98472,7 @@ var ts;
|
|
|
98472
98472
|
else {
|
|
98473
98473
|
statements.push(statement);
|
|
98474
98474
|
}
|
|
98475
|
-
return ts.setEmitFlags(ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), statementsLocation),
|
|
98475
|
+
return ts.setEmitFlags(ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), statementsLocation),
|
|
98476
98476
|
/*multiLine*/ true), bodyLocation), 48 /* EmitFlags.NoSourceMap */ | 384 /* EmitFlags.NoTokenSourceMaps */);
|
|
98477
98477
|
}
|
|
98478
98478
|
function createDownlevelAwait(expression) {
|
|
@@ -98502,10 +98502,10 @@ var ts;
|
|
|
98502
98502
|
/*initializer*/ ts.setEmitFlags(ts.setTextRange(factory.createVariableDeclarationList([
|
|
98503
98503
|
ts.setTextRange(factory.createVariableDeclaration(iterator, /*exclamationToken*/ undefined, /*type*/ undefined, initializer), node.expression),
|
|
98504
98504
|
factory.createVariableDeclaration(result)
|
|
98505
|
-
]), node.expression), 2097152 /* EmitFlags.NoHoisting */),
|
|
98506
|
-
/*condition*/ factory.createComma(factory.createAssignment(result, createDownlevelAwait(callNext)), factory.createLogicalNot(getDone)),
|
|
98507
|
-
/*incrementor*/ undefined,
|
|
98508
|
-
/*statement*/ convertForOfStatementHead(node, getValue)),
|
|
98505
|
+
]), node.expression), 2097152 /* EmitFlags.NoHoisting */),
|
|
98506
|
+
/*condition*/ factory.createComma(factory.createAssignment(result, createDownlevelAwait(callNext)), factory.createLogicalNot(getDone)),
|
|
98507
|
+
/*incrementor*/ undefined,
|
|
98508
|
+
/*statement*/ convertForOfStatementHead(node, getValue)),
|
|
98509
98509
|
/*location*/ node), 256 /* EmitFlags.NoTokenTrailingSourceMaps */);
|
|
98510
98510
|
ts.setOriginalNode(forStatement, node);
|
|
98511
98511
|
return factory.createTryStatement(factory.createBlock([
|
|
@@ -98518,8 +98518,8 @@ var ts;
|
|
|
98518
98518
|
factory.createTryStatement(
|
|
98519
98519
|
/*tryBlock*/ factory.createBlock([
|
|
98520
98520
|
ts.setEmitFlags(factory.createIfStatement(factory.createLogicalAnd(factory.createLogicalAnd(result, factory.createLogicalNot(getDone)), factory.createAssignment(returnMethod, factory.createPropertyAccessExpression(iterator, "return"))), factory.createExpressionStatement(createDownlevelAwait(callReturn))), 1 /* EmitFlags.SingleLine */)
|
|
98521
|
-
]),
|
|
98522
|
-
/*catchClause*/ undefined,
|
|
98521
|
+
]),
|
|
98522
|
+
/*catchClause*/ undefined,
|
|
98523
98523
|
/*finallyBlock*/ ts.setEmitFlags(factory.createBlock([
|
|
98524
98524
|
ts.setEmitFlags(factory.createIfStatement(errorRecord, factory.createThrowStatement(factory.createPropertyAccessExpression(errorRecord, "error"))), 1 /* EmitFlags.SingleLine */)
|
|
98525
98525
|
]), 1 /* EmitFlags.SingleLine */))
|
|
@@ -98531,18 +98531,18 @@ var ts;
|
|
|
98531
98531
|
}
|
|
98532
98532
|
function visitParameter(node) {
|
|
98533
98533
|
if (parametersWithPrecedingObjectRestOrSpread === null || parametersWithPrecedingObjectRestOrSpread === void 0 ? void 0 : parametersWithPrecedingObjectRestOrSpread.has(node)) {
|
|
98534
|
-
return factory.updateParameterDeclaration(node,
|
|
98535
|
-
/*modifiers*/ undefined, node.dotDotDotToken, ts.isBindingPattern(node.name) ? factory.getGeneratedNameForNode(node) : node.name,
|
|
98536
|
-
/*questionToken*/ undefined,
|
|
98537
|
-
/*type*/ undefined,
|
|
98534
|
+
return factory.updateParameterDeclaration(node,
|
|
98535
|
+
/*modifiers*/ undefined, node.dotDotDotToken, ts.isBindingPattern(node.name) ? factory.getGeneratedNameForNode(node) : node.name,
|
|
98536
|
+
/*questionToken*/ undefined,
|
|
98537
|
+
/*type*/ undefined,
|
|
98538
98538
|
/*initializer*/ undefined);
|
|
98539
98539
|
}
|
|
98540
98540
|
if (node.transformFlags & 65536 /* TransformFlags.ContainsObjectRestOrSpread */) {
|
|
98541
98541
|
// Binding patterns are converted into a generated name and are
|
|
98542
98542
|
// evaluated inside the function body.
|
|
98543
|
-
return factory.updateParameterDeclaration(node,
|
|
98544
|
-
/*modifiers*/ undefined, node.dotDotDotToken, factory.getGeneratedNameForNode(node),
|
|
98545
|
-
/*questionToken*/ undefined,
|
|
98543
|
+
return factory.updateParameterDeclaration(node,
|
|
98544
|
+
/*modifiers*/ undefined, node.dotDotDotToken, factory.getGeneratedNameForNode(node),
|
|
98545
|
+
/*questionToken*/ undefined,
|
|
98546
98546
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
98547
98547
|
}
|
|
98548
98548
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -98575,7 +98575,7 @@ var ts;
|
|
|
98575
98575
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
98576
98576
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
98577
98577
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
98578
|
-
var updated = factory.updateGetAccessorDeclaration(node, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98578
|
+
var updated = factory.updateGetAccessorDeclaration(node, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98579
98579
|
/*type*/ undefined, transformFunctionBody(node));
|
|
98580
98580
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
98581
98581
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
@@ -98600,8 +98600,8 @@ var ts;
|
|
|
98600
98600
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifierLike)
|
|
98601
98601
|
: node.modifiers, enclosingFunctionFlags & 2 /* FunctionFlags.Async */
|
|
98602
98602
|
? undefined
|
|
98603
|
-
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(/*questionToken*/ undefined, visitor, ts.isToken),
|
|
98604
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98603
|
+
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(/*questionToken*/ undefined, visitor, ts.isToken),
|
|
98604
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98605
98605
|
/*type*/ undefined, enclosingFunctionFlags & 2 /* FunctionFlags.Async */ && enclosingFunctionFlags & 1 /* FunctionFlags.Generator */
|
|
98606
98606
|
? transformAsyncGeneratorFunctionBody(node)
|
|
98607
98607
|
: transformFunctionBody(node));
|
|
@@ -98618,8 +98618,8 @@ var ts;
|
|
|
98618
98618
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
|
|
98619
98619
|
: node.modifiers, enclosingFunctionFlags & 2 /* FunctionFlags.Async */
|
|
98620
98620
|
? undefined
|
|
98621
|
-
: node.asteriskToken, node.name,
|
|
98622
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98621
|
+
: node.asteriskToken, node.name,
|
|
98622
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98623
98623
|
/*type*/ undefined, enclosingFunctionFlags & 2 /* FunctionFlags.Async */ && enclosingFunctionFlags & 1 /* FunctionFlags.Generator */
|
|
98624
98624
|
? transformAsyncGeneratorFunctionBody(node)
|
|
98625
98625
|
: transformFunctionBody(node));
|
|
@@ -98632,8 +98632,8 @@ var ts;
|
|
|
98632
98632
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
98633
98633
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
98634
98634
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
98635
|
-
var updated = factory.updateArrowFunction(node, node.modifiers,
|
|
98636
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98635
|
+
var updated = factory.updateArrowFunction(node, node.modifiers,
|
|
98636
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98637
98637
|
/*type*/ undefined, node.equalsGreaterThanToken, transformFunctionBody(node));
|
|
98638
98638
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
98639
98639
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
@@ -98648,8 +98648,8 @@ var ts;
|
|
|
98648
98648
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
|
|
98649
98649
|
: node.modifiers, enclosingFunctionFlags & 2 /* FunctionFlags.Async */
|
|
98650
98650
|
? undefined
|
|
98651
|
-
: node.asteriskToken, node.name,
|
|
98652
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98651
|
+
: node.asteriskToken, node.name,
|
|
98652
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
98653
98653
|
/*type*/ undefined, enclosingFunctionFlags & 2 /* FunctionFlags.Async */ && enclosingFunctionFlags & 1 /* FunctionFlags.Generator */
|
|
98654
98654
|
? transformAsyncGeneratorFunctionBody(node)
|
|
98655
98655
|
: transformFunctionBody(node));
|
|
@@ -98667,9 +98667,9 @@ var ts;
|
|
|
98667
98667
|
capturedSuperProperties = new ts.Set();
|
|
98668
98668
|
hasSuperElementAccess = false;
|
|
98669
98669
|
var returnStatement = factory.createReturnStatement(emitHelpers().createAsyncGeneratorHelper(factory.createFunctionExpression(
|
|
98670
|
-
/*modifiers*/ undefined, factory.createToken(41 /* SyntaxKind.AsteriskToken */), node.name && factory.getGeneratedNameForNode(node.name),
|
|
98671
|
-
/*typeParameters*/ undefined,
|
|
98672
|
-
/*parameters*/ [],
|
|
98670
|
+
/*modifiers*/ undefined, factory.createToken(41 /* SyntaxKind.AsteriskToken */), node.name && factory.getGeneratedNameForNode(node.name),
|
|
98671
|
+
/*typeParameters*/ undefined,
|
|
98672
|
+
/*parameters*/ [],
|
|
98673
98673
|
/*type*/ undefined, factory.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))), !!(hierarchyFacts & 1 /* HierarchyFacts.HasLexicalThis */)));
|
|
98674
98674
|
// Minor optimization, emit `_super` helper to capture `super` access in an arrow.
|
|
98675
98675
|
// This step isn't needed if we eventually transform this to ES5.
|
|
@@ -98774,8 +98774,8 @@ var ts;
|
|
|
98774
98774
|
}
|
|
98775
98775
|
else if (parameter.transformFlags & 65536 /* TransformFlags.ContainsObjectRestOrSpread */) {
|
|
98776
98776
|
containsPrecedingObjectRestOrSpread = true;
|
|
98777
|
-
var declarations = ts.flattenDestructuringBinding(parameter, visitor, context, 1 /* FlattenLevel.ObjectRest */, factory.getGeneratedNameForNode(parameter),
|
|
98778
|
-
/*doNotRecordTempVariablesInLine*/ false,
|
|
98777
|
+
var declarations = ts.flattenDestructuringBinding(parameter, visitor, context, 1 /* FlattenLevel.ObjectRest */, factory.getGeneratedNameForNode(parameter),
|
|
98778
|
+
/*doNotRecordTempVariablesInLine*/ false,
|
|
98779
98779
|
/*skipInitializer*/ true);
|
|
98780
98780
|
if (ts.some(declarations)) {
|
|
98781
98781
|
var declarationList = factory.createVariableDeclarationList(declarations);
|
|
@@ -98877,7 +98877,7 @@ var ts;
|
|
|
98877
98877
|
var argumentExpression = ts.isPropertyAccessExpression(expression)
|
|
98878
98878
|
? substitutePropertyAccessExpression(expression)
|
|
98879
98879
|
: substituteElementAccessExpression(expression);
|
|
98880
|
-
return factory.createCallExpression(factory.createPropertyAccessExpression(argumentExpression, "call"),
|
|
98880
|
+
return factory.createCallExpression(factory.createPropertyAccessExpression(argumentExpression, "call"),
|
|
98881
98881
|
/*typeArguments*/ undefined, __spreadArray([
|
|
98882
98882
|
factory.createThis()
|
|
98883
98883
|
], node.arguments, true));
|
|
@@ -98894,11 +98894,11 @@ var ts;
|
|
|
98894
98894
|
}
|
|
98895
98895
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
98896
98896
|
if (enclosingSuperContainerFlags & 4096 /* NodeCheckFlags.AsyncMethodWithSuperBinding */) {
|
|
98897
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createCallExpression(factory.createIdentifier("_superIndex"),
|
|
98897
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createCallExpression(factory.createIdentifier("_superIndex"),
|
|
98898
98898
|
/*typeArguments*/ undefined, [argumentExpression]), "value"), location);
|
|
98899
98899
|
}
|
|
98900
98900
|
else {
|
|
98901
|
-
return ts.setTextRange(factory.createCallExpression(factory.createIdentifier("_superIndex"),
|
|
98901
|
+
return ts.setTextRange(factory.createCallExpression(factory.createIdentifier("_superIndex"),
|
|
98902
98902
|
/*typeArguments*/ undefined, [argumentExpression]), location);
|
|
98903
98903
|
}
|
|
98904
98904
|
}
|
|
@@ -99083,7 +99083,7 @@ var ts;
|
|
|
99083
99083
|
rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 106 /* SyntaxKind.SuperKeyword */ ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
|
|
99084
99084
|
}
|
|
99085
99085
|
else {
|
|
99086
|
-
rightExpression = factory.createCallExpression(rightExpression,
|
|
99086
|
+
rightExpression = factory.createCallExpression(rightExpression,
|
|
99087
99087
|
/*typeArguments*/ undefined, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
|
|
99088
99088
|
}
|
|
99089
99089
|
break;
|
|
@@ -99106,8 +99106,8 @@ var ts;
|
|
|
99106
99106
|
right = factory.createTempVariable(hoistVariableDeclaration);
|
|
99107
99107
|
left = factory.createAssignment(right, left);
|
|
99108
99108
|
}
|
|
99109
|
-
return ts.setTextRange(factory.createConditionalExpression(createNotNullCondition(left, right),
|
|
99110
|
-
/*questionToken*/ undefined, right,
|
|
99109
|
+
return ts.setTextRange(factory.createConditionalExpression(createNotNullCondition(left, right),
|
|
99110
|
+
/*questionToken*/ undefined, right,
|
|
99111
99111
|
/*colonToken*/ undefined, ts.visitNode(node.right, visitor, ts.isExpression)), node);
|
|
99112
99112
|
}
|
|
99113
99113
|
function visitDeleteExpression(node) {
|
|
@@ -99276,8 +99276,8 @@ var ts;
|
|
|
99276
99276
|
else if (ts.isExternalOrCommonJsModule(node)) {
|
|
99277
99277
|
// Add `require` statement
|
|
99278
99278
|
var requireStatement = factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
99279
|
-
factory.createVariableDeclaration(factory.createObjectBindingPattern(ts.map(ts.arrayFrom(importSpecifiersMap.values()), function (s) { return factory.createBindingElement(/*dotdotdot*/ undefined, s.propertyName, s.name); })),
|
|
99280
|
-
/*exclaimationToken*/ undefined,
|
|
99279
|
+
factory.createVariableDeclaration(factory.createObjectBindingPattern(ts.map(ts.arrayFrom(importSpecifiersMap.values()), function (s) { return factory.createBindingElement(/*dotdotdot*/ undefined, s.propertyName, s.name); })),
|
|
99280
|
+
/*exclaimationToken*/ undefined,
|
|
99281
99281
|
/*type*/ undefined, factory.createCallExpression(factory.createIdentifier("require"), /*typeArguments*/ undefined, [factory.createStringLiteral(importSource)]))
|
|
99282
99282
|
], 2 /* NodeFlags.Const */));
|
|
99283
99283
|
ts.setParentRecursive(requireStatement, /*incremental*/ false);
|
|
@@ -99444,7 +99444,7 @@ var ts;
|
|
|
99444
99444
|
childrenProps = result;
|
|
99445
99445
|
}
|
|
99446
99446
|
}
|
|
99447
|
-
return visitJsxOpeningLikeElementOrFragmentJSX(getImplicitJsxFragmentReference(), childrenProps || factory.createObjectLiteralExpression([]),
|
|
99447
|
+
return visitJsxOpeningLikeElementOrFragmentJSX(getImplicitJsxFragmentReference(), childrenProps || factory.createObjectLiteralExpression([]),
|
|
99448
99448
|
/*keyAttr*/ undefined, children, isChild, location);
|
|
99449
99449
|
}
|
|
99450
99450
|
function visitJsxOpeningFragmentCreateElement(node, children, isChild, location) {
|
|
@@ -100438,8 +100438,8 @@ var ts;
|
|
|
100438
100438
|
// }
|
|
100439
100439
|
// return C;
|
|
100440
100440
|
// }());
|
|
100441
|
-
var variable = factory.createVariableDeclaration(factory.getLocalName(node, /*allowComments*/ true),
|
|
100442
|
-
/*exclamationToken*/ undefined,
|
|
100441
|
+
var variable = factory.createVariableDeclaration(factory.getLocalName(node, /*allowComments*/ true),
|
|
100442
|
+
/*exclamationToken*/ undefined,
|
|
100443
100443
|
/*type*/ undefined, transformClassLikeDeclarationToExpression(node));
|
|
100444
100444
|
ts.setOriginalNode(variable, node);
|
|
100445
100445
|
var statements = [];
|
|
@@ -100514,10 +100514,10 @@ var ts;
|
|
|
100514
100514
|
}
|
|
100515
100515
|
var extendsClauseElement = ts.getClassExtendsHeritageElement(node);
|
|
100516
100516
|
var classFunction = factory.createFunctionExpression(
|
|
100517
|
-
/*modifiers*/ undefined,
|
|
100518
|
-
/*asteriskToken*/ undefined,
|
|
100519
|
-
/*name*/ undefined,
|
|
100520
|
-
/*typeParameters*/ undefined, extendsClauseElement ? [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, factory.createUniqueName("_super", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */))] : [],
|
|
100517
|
+
/*modifiers*/ undefined,
|
|
100518
|
+
/*asteriskToken*/ undefined,
|
|
100519
|
+
/*name*/ undefined,
|
|
100520
|
+
/*typeParameters*/ undefined, extendsClauseElement ? [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, factory.createUniqueName("_super", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */))] : [],
|
|
100521
100521
|
/*type*/ undefined, transformClassBody(node, extendsClauseElement));
|
|
100522
100522
|
// To preserve the behavior of the old emitter, we explicitly indent
|
|
100523
100523
|
// the body of the function here if it was requested in an earlier
|
|
@@ -100531,7 +100531,7 @@ var ts;
|
|
|
100531
100531
|
var outer = factory.createPartiallyEmittedExpression(inner);
|
|
100532
100532
|
ts.setTextRangeEnd(outer, ts.skipTrivia(currentText, node.pos));
|
|
100533
100533
|
ts.setEmitFlags(outer, 1536 /* EmitFlags.NoComments */);
|
|
100534
|
-
var result = factory.createParenthesizedExpression(factory.createCallExpression(outer,
|
|
100534
|
+
var result = factory.createParenthesizedExpression(factory.createCallExpression(outer,
|
|
100535
100535
|
/*typeArguments*/ undefined, extendsClauseElement
|
|
100536
100536
|
? [ts.visitNode(extendsClauseElement.expression, visitor, ts.isExpression)]
|
|
100537
100537
|
: []));
|
|
@@ -100577,7 +100577,7 @@ var ts;
|
|
|
100577
100577
|
*/
|
|
100578
100578
|
function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {
|
|
100579
100579
|
if (extendsClauseElement) {
|
|
100580
|
-
statements.push(ts.setTextRange(factory.createExpressionStatement(emitHelpers().createExtendsHelper(factory.getInternalName(node))),
|
|
100580
|
+
statements.push(ts.setTextRange(factory.createExpressionStatement(emitHelpers().createExtendsHelper(factory.getInternalName(node))),
|
|
100581
100581
|
/*location*/ extendsClauseElement));
|
|
100582
100582
|
}
|
|
100583
100583
|
}
|
|
@@ -100595,9 +100595,9 @@ var ts;
|
|
|
100595
100595
|
var constructor = ts.getFirstConstructorWithBody(node);
|
|
100596
100596
|
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
|
|
100597
100597
|
var constructorFunction = factory.createFunctionDeclaration(
|
|
100598
|
-
/*modifiers*/ undefined,
|
|
100599
|
-
/*asteriskToken*/ undefined, name,
|
|
100600
|
-
/*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper),
|
|
100598
|
+
/*modifiers*/ undefined,
|
|
100599
|
+
/*asteriskToken*/ undefined, name,
|
|
100600
|
+
/*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper),
|
|
100601
100601
|
/*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
|
|
100602
100602
|
ts.setTextRange(constructorFunction, constructor || node);
|
|
100603
100603
|
if (extendsClauseElement) {
|
|
@@ -100790,8 +100790,8 @@ var ts;
|
|
|
100790
100790
|
// ```
|
|
100791
100791
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
100792
100792
|
}
|
|
100793
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
100794
|
-
/*location*/ constructor.body.statements),
|
|
100793
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
100794
|
+
/*location*/ constructor.body.statements),
|
|
100795
100795
|
/*multiLine*/ true);
|
|
100796
100796
|
ts.setTextRange(body, constructor.body);
|
|
100797
100797
|
return body;
|
|
@@ -100859,23 +100859,23 @@ var ts;
|
|
|
100859
100859
|
// Binding patterns are converted into a generated name and are
|
|
100860
100860
|
// evaluated inside the function body.
|
|
100861
100861
|
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(
|
|
100862
|
-
/*modifiers*/ undefined,
|
|
100863
|
-
/*dotDotDotToken*/ undefined, factory.getGeneratedNameForNode(node),
|
|
100864
|
-
/*questionToken*/ undefined,
|
|
100865
|
-
/*type*/ undefined,
|
|
100866
|
-
/*initializer*/ undefined),
|
|
100867
|
-
/*location*/ node),
|
|
100862
|
+
/*modifiers*/ undefined,
|
|
100863
|
+
/*dotDotDotToken*/ undefined, factory.getGeneratedNameForNode(node),
|
|
100864
|
+
/*questionToken*/ undefined,
|
|
100865
|
+
/*type*/ undefined,
|
|
100866
|
+
/*initializer*/ undefined),
|
|
100867
|
+
/*location*/ node),
|
|
100868
100868
|
/*original*/ node);
|
|
100869
100869
|
}
|
|
100870
100870
|
else if (node.initializer) {
|
|
100871
100871
|
// Initializers are elided
|
|
100872
100872
|
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(
|
|
100873
|
-
/*modifiers*/ undefined,
|
|
100874
|
-
/*dotDotDotToken*/ undefined, node.name,
|
|
100875
|
-
/*questionToken*/ undefined,
|
|
100876
|
-
/*type*/ undefined,
|
|
100877
|
-
/*initializer*/ undefined),
|
|
100878
|
-
/*location*/ node),
|
|
100873
|
+
/*modifiers*/ undefined,
|
|
100874
|
+
/*dotDotDotToken*/ undefined, node.name,
|
|
100875
|
+
/*questionToken*/ undefined,
|
|
100876
|
+
/*type*/ undefined,
|
|
100877
|
+
/*initializer*/ undefined),
|
|
100878
|
+
/*location*/ node),
|
|
100879
100879
|
/*original*/ node);
|
|
100880
100880
|
}
|
|
100881
100881
|
else {
|
|
@@ -100996,10 +100996,10 @@ var ts;
|
|
|
100996
100996
|
// var param = [];
|
|
100997
100997
|
prologueStatements.push(ts.setEmitFlags(ts.setTextRange(factory.createVariableStatement(
|
|
100998
100998
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
100999
|
-
factory.createVariableDeclaration(declarationName,
|
|
101000
|
-
/*exclamationToken*/ undefined,
|
|
100999
|
+
factory.createVariableDeclaration(declarationName,
|
|
101000
|
+
/*exclamationToken*/ undefined,
|
|
101001
101001
|
/*type*/ undefined, factory.createArrayLiteralExpression([]))
|
|
101002
|
-
])),
|
|
101002
|
+
])),
|
|
101003
101003
|
/*location*/ parameter), 1048576 /* EmitFlags.CustomPrologue */));
|
|
101004
101004
|
// for (var _i = restIndex; _i < arguments.length; _i++) {
|
|
101005
101005
|
// param[_i - restIndex] = arguments[_i];
|
|
@@ -101009,7 +101009,7 @@ var ts;
|
|
|
101009
101009
|
]), parameter), ts.setTextRange(factory.createLessThan(temp, factory.createPropertyAccessExpression(factory.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(factory.createPostfixIncrement(temp), parameter), factory.createBlock([
|
|
101010
101010
|
ts.startOnNewLine(ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(factory.createElementAccessExpression(expressionName, restIndex === 0
|
|
101011
101011
|
? temp
|
|
101012
|
-
: factory.createSubtract(temp, factory.createNumericLiteral(restIndex))), factory.createElementAccessExpression(factory.createIdentifier("arguments"), temp))),
|
|
101012
|
+
: factory.createSubtract(temp, factory.createNumericLiteral(restIndex))), factory.createElementAccessExpression(factory.createIdentifier("arguments"), temp))),
|
|
101013
101013
|
/*location*/ parameter))
|
|
101014
101014
|
]));
|
|
101015
101015
|
ts.setEmitFlags(forStatement, 1048576 /* EmitFlags.CustomPrologue */);
|
|
@@ -101053,8 +101053,8 @@ var ts;
|
|
|
101053
101053
|
enableSubstitutionsForCapturedThis();
|
|
101054
101054
|
var captureThisStatement = factory.createVariableStatement(
|
|
101055
101055
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
101056
|
-
factory.createVariableDeclaration(factory.createUniqueName("_this", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
101057
|
-
/*exclamationToken*/ undefined,
|
|
101056
|
+
factory.createVariableDeclaration(factory.createUniqueName("_this", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
101057
|
+
/*exclamationToken*/ undefined,
|
|
101058
101058
|
/*type*/ undefined, initializer)
|
|
101059
101059
|
]));
|
|
101060
101060
|
ts.setEmitFlags(captureThisStatement, 1536 /* EmitFlags.NoComments */ | 1048576 /* EmitFlags.CustomPrologue */);
|
|
@@ -101083,8 +101083,8 @@ var ts;
|
|
|
101083
101083
|
case 213 /* SyntaxKind.FunctionExpression */:
|
|
101084
101084
|
// Functions can be called or constructed, and may have a `this` due to
|
|
101085
101085
|
// being a member or when calling an imported function via `other_1.f()`.
|
|
101086
|
-
newTarget = factory.createConditionalExpression(factory.createLogicalAnd(ts.setEmitFlags(factory.createThis(), 4 /* EmitFlags.NoSubstitution */), factory.createBinaryExpression(ts.setEmitFlags(factory.createThis(), 4 /* EmitFlags.NoSubstitution */), 102 /* SyntaxKind.InstanceOfKeyword */, factory.getLocalName(node))),
|
|
101087
|
-
/*questionToken*/ undefined, factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createThis(), 4 /* EmitFlags.NoSubstitution */), "constructor"),
|
|
101086
|
+
newTarget = factory.createConditionalExpression(factory.createLogicalAnd(ts.setEmitFlags(factory.createThis(), 4 /* EmitFlags.NoSubstitution */), factory.createBinaryExpression(ts.setEmitFlags(factory.createThis(), 4 /* EmitFlags.NoSubstitution */), 102 /* SyntaxKind.InstanceOfKeyword */, factory.getLocalName(node))),
|
|
101087
|
+
/*questionToken*/ undefined, factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createThis(), 4 /* EmitFlags.NoSubstitution */), "constructor"),
|
|
101088
101088
|
/*colonToken*/ undefined, factory.createVoidZero());
|
|
101089
101089
|
break;
|
|
101090
101090
|
default:
|
|
@@ -101092,8 +101092,8 @@ var ts;
|
|
|
101092
101092
|
}
|
|
101093
101093
|
var captureNewTargetStatement = factory.createVariableStatement(
|
|
101094
101094
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
101095
|
-
factory.createVariableDeclaration(factory.createUniqueName("_newTarget", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
101096
|
-
/*exclamationToken*/ undefined,
|
|
101095
|
+
factory.createVariableDeclaration(factory.createUniqueName("_newTarget", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
|
|
101096
|
+
/*exclamationToken*/ undefined,
|
|
101097
101097
|
/*type*/ undefined, newTarget)
|
|
101098
101098
|
]));
|
|
101099
101099
|
ts.setEmitFlags(captureNewTargetStatement, 1536 /* EmitFlags.NoComments */ | 1048576 /* EmitFlags.CustomPrologue */);
|
|
@@ -101233,7 +101233,7 @@ var ts;
|
|
|
101233
101233
|
properties.push(setter);
|
|
101234
101234
|
}
|
|
101235
101235
|
properties.push(factory.createPropertyAssignment("enumerable", getAccessor || setAccessor ? factory.createFalse() : factory.createTrue()), factory.createPropertyAssignment("configurable", factory.createTrue()));
|
|
101236
|
-
var call = factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"),
|
|
101236
|
+
var call = factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"),
|
|
101237
101237
|
/*typeArguments*/ undefined, [
|
|
101238
101238
|
target,
|
|
101239
101239
|
propertyName,
|
|
@@ -101257,10 +101257,10 @@ var ts;
|
|
|
101257
101257
|
convertedLoopState = undefined;
|
|
101258
101258
|
var ancestorFacts = enterSubtree(15232 /* HierarchyFacts.ArrowFunctionExcludes */, 66 /* HierarchyFacts.ArrowFunctionIncludes */);
|
|
101259
101259
|
var func = factory.createFunctionExpression(
|
|
101260
|
-
/*modifiers*/ undefined,
|
|
101261
|
-
/*asteriskToken*/ undefined,
|
|
101262
|
-
/*name*/ undefined,
|
|
101263
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
101260
|
+
/*modifiers*/ undefined,
|
|
101261
|
+
/*asteriskToken*/ undefined,
|
|
101262
|
+
/*name*/ undefined,
|
|
101263
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
101264
101264
|
/*type*/ undefined, transformFunctionBody(node));
|
|
101265
101265
|
ts.setTextRange(func, node);
|
|
101266
101266
|
ts.setOriginalNode(func, node);
|
|
@@ -101288,9 +101288,9 @@ var ts;
|
|
|
101288
101288
|
: node.name;
|
|
101289
101289
|
exitSubtree(ancestorFacts, 98304 /* HierarchyFacts.FunctionSubtreeExcludes */, 0 /* HierarchyFacts.None */);
|
|
101290
101290
|
convertedLoopState = savedConvertedLoopState;
|
|
101291
|
-
return factory.updateFunctionExpression(node,
|
|
101292
|
-
/*modifiers*/ undefined, node.asteriskToken, name,
|
|
101293
|
-
/*typeParameters*/ undefined, parameters,
|
|
101291
|
+
return factory.updateFunctionExpression(node,
|
|
101292
|
+
/*modifiers*/ undefined, node.asteriskToken, name,
|
|
101293
|
+
/*typeParameters*/ undefined, parameters,
|
|
101294
101294
|
/*type*/ undefined, body);
|
|
101295
101295
|
}
|
|
101296
101296
|
/**
|
|
@@ -101309,8 +101309,8 @@ var ts;
|
|
|
101309
101309
|
: node.name;
|
|
101310
101310
|
exitSubtree(ancestorFacts, 98304 /* HierarchyFacts.FunctionSubtreeExcludes */, 0 /* HierarchyFacts.None */);
|
|
101311
101311
|
convertedLoopState = savedConvertedLoopState;
|
|
101312
|
-
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name,
|
|
101313
|
-
/*typeParameters*/ undefined, parameters,
|
|
101312
|
+
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name,
|
|
101313
|
+
/*typeParameters*/ undefined, parameters,
|
|
101314
101314
|
/*type*/ undefined, body);
|
|
101315
101315
|
}
|
|
101316
101316
|
/**
|
|
@@ -101334,9 +101334,9 @@ var ts;
|
|
|
101334
101334
|
exitSubtree(ancestorFacts, 98304 /* HierarchyFacts.FunctionSubtreeExcludes */, 0 /* HierarchyFacts.None */);
|
|
101335
101335
|
convertedLoopState = savedConvertedLoopState;
|
|
101336
101336
|
return ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(
|
|
101337
|
-
/*modifiers*/ undefined, node.asteriskToken, name,
|
|
101338
|
-
/*typeParameters*/ undefined, parameters,
|
|
101339
|
-
/*type*/ undefined, body), location),
|
|
101337
|
+
/*modifiers*/ undefined, node.asteriskToken, name,
|
|
101338
|
+
/*typeParameters*/ undefined, parameters,
|
|
101339
|
+
/*type*/ undefined, body), location),
|
|
101340
101340
|
/*original*/ node);
|
|
101341
101341
|
}
|
|
101342
101342
|
/**
|
|
@@ -101655,7 +101655,7 @@ var ts;
|
|
|
101655
101655
|
var ancestorFacts = enterSubtree(32 /* HierarchyFacts.ExportedVariableStatement */, 0 /* HierarchyFacts.None */);
|
|
101656
101656
|
var updated;
|
|
101657
101657
|
if (ts.isBindingPattern(node.name)) {
|
|
101658
|
-
updated = ts.flattenDestructuringBinding(node, visitor, context, 0 /* FlattenLevel.All */,
|
|
101658
|
+
updated = ts.flattenDestructuringBinding(node, visitor, context, 0 /* FlattenLevel.All */,
|
|
101659
101659
|
/*value*/ undefined, (ancestorFacts & 32 /* HierarchyFacts.ExportedVariableStatement */) !== 0);
|
|
101660
101660
|
}
|
|
101661
101661
|
else {
|
|
@@ -101738,8 +101738,8 @@ var ts;
|
|
|
101738
101738
|
// to emit it separately.
|
|
101739
101739
|
statements.push(ts.setTextRange(factory.createVariableStatement(
|
|
101740
101740
|
/*modifiers*/ undefined, ts.setOriginalNode(ts.setTextRange(factory.createVariableDeclarationList([
|
|
101741
|
-
factory.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : factory.createTempVariable(/*recordTempVariable*/ undefined),
|
|
101742
|
-
/*exclamationToken*/ undefined,
|
|
101741
|
+
factory.createVariableDeclaration(firstOriginalDeclaration ? firstOriginalDeclaration.name : factory.createTempVariable(/*recordTempVariable*/ undefined),
|
|
101742
|
+
/*exclamationToken*/ undefined,
|
|
101743
101743
|
/*type*/ undefined, boundValue)
|
|
101744
101744
|
]), ts.moveRangePos(initializer, -1)), initializer)), ts.moveRangeEnd(initializer, -1)));
|
|
101745
101745
|
}
|
|
@@ -101771,7 +101771,7 @@ var ts;
|
|
|
101771
101771
|
}
|
|
101772
101772
|
}
|
|
101773
101773
|
function createSyntheticBlockForConvertedStatements(statements) {
|
|
101774
|
-
return ts.setEmitFlags(factory.createBlock(factory.createNodeArray(statements),
|
|
101774
|
+
return ts.setEmitFlags(factory.createBlock(factory.createNodeArray(statements),
|
|
101775
101775
|
/*multiLine*/ true), 48 /* EmitFlags.NoSourceMap */ | 384 /* EmitFlags.NoTokenSourceMaps */);
|
|
101776
101776
|
}
|
|
101777
101777
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
@@ -101809,10 +101809,10 @@ var ts;
|
|
|
101809
101809
|
/*initializer*/ ts.setEmitFlags(ts.setTextRange(factory.createVariableDeclarationList([
|
|
101810
101810
|
ts.setTextRange(factory.createVariableDeclaration(counter, /*exclamationToken*/ undefined, /*type*/ undefined, factory.createNumericLiteral(0)), ts.moveRangePos(node.expression, -1)),
|
|
101811
101811
|
ts.setTextRange(factory.createVariableDeclaration(rhsReference, /*exclamationToken*/ undefined, /*type*/ undefined, expression), node.expression)
|
|
101812
|
-
]), node.expression), 2097152 /* EmitFlags.NoHoisting */),
|
|
101813
|
-
/*condition*/ ts.setTextRange(factory.createLessThan(counter, factory.createPropertyAccessExpression(rhsReference, "length")), node.expression),
|
|
101814
|
-
/*incrementor*/ ts.setTextRange(factory.createPostfixIncrement(counter), node.expression),
|
|
101815
|
-
/*statement*/ convertForOfStatementHead(node, factory.createElementAccessExpression(rhsReference, counter), convertedLoopBodyStatements)),
|
|
101812
|
+
]), node.expression), 2097152 /* EmitFlags.NoHoisting */),
|
|
101813
|
+
/*condition*/ ts.setTextRange(factory.createLessThan(counter, factory.createPropertyAccessExpression(rhsReference, "length")), node.expression),
|
|
101814
|
+
/*incrementor*/ ts.setTextRange(factory.createPostfixIncrement(counter), node.expression),
|
|
101815
|
+
/*statement*/ convertForOfStatementHead(node, factory.createElementAccessExpression(rhsReference, counter), convertedLoopBodyStatements)),
|
|
101816
101816
|
/*location*/ node);
|
|
101817
101817
|
// Disable trailing source maps for the OpenParenToken to align source map emit with the old emitter.
|
|
101818
101818
|
ts.setEmitFlags(forStatement, 256 /* EmitFlags.NoTokenTrailingSourceMaps */);
|
|
@@ -101838,10 +101838,10 @@ var ts;
|
|
|
101838
101838
|
/*initializer*/ ts.setEmitFlags(ts.setTextRange(factory.createVariableDeclarationList([
|
|
101839
101839
|
ts.setTextRange(factory.createVariableDeclaration(iterator, /*exclamationToken*/ undefined, /*type*/ undefined, initializer), node.expression),
|
|
101840
101840
|
factory.createVariableDeclaration(result, /*exclamationToken*/ undefined, /*type*/ undefined, next)
|
|
101841
|
-
]), node.expression), 2097152 /* EmitFlags.NoHoisting */),
|
|
101842
|
-
/*condition*/ factory.createLogicalNot(factory.createPropertyAccessExpression(result, "done")),
|
|
101843
|
-
/*incrementor*/ factory.createAssignment(result, next),
|
|
101844
|
-
/*statement*/ convertForOfStatementHead(node, factory.createPropertyAccessExpression(result, "value"), convertedLoopBodyStatements)),
|
|
101841
|
+
]), node.expression), 2097152 /* EmitFlags.NoHoisting */),
|
|
101842
|
+
/*condition*/ factory.createLogicalNot(factory.createPropertyAccessExpression(result, "done")),
|
|
101843
|
+
/*incrementor*/ factory.createAssignment(result, next),
|
|
101844
|
+
/*statement*/ convertForOfStatementHead(node, factory.createPropertyAccessExpression(result, "value"), convertedLoopBodyStatements)),
|
|
101845
101845
|
/*location*/ node), 256 /* EmitFlags.NoTokenTrailingSourceMaps */);
|
|
101846
101846
|
return factory.createTryStatement(factory.createBlock([
|
|
101847
101847
|
factory.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel)
|
|
@@ -101853,8 +101853,8 @@ var ts;
|
|
|
101853
101853
|
factory.createTryStatement(
|
|
101854
101854
|
/*tryBlock*/ factory.createBlock([
|
|
101855
101855
|
ts.setEmitFlags(factory.createIfStatement(factory.createLogicalAnd(factory.createLogicalAnd(result, factory.createLogicalNot(factory.createPropertyAccessExpression(result, "done"))), factory.createAssignment(returnMethod, factory.createPropertyAccessExpression(iterator, "return"))), factory.createExpressionStatement(factory.createFunctionCallCall(returnMethod, iterator, []))), 1 /* EmitFlags.SingleLine */),
|
|
101856
|
-
]),
|
|
101857
|
-
/*catchClause*/ undefined,
|
|
101856
|
+
]),
|
|
101857
|
+
/*catchClause*/ undefined,
|
|
101858
101858
|
/*finallyBlock*/ ts.setEmitFlags(factory.createBlock([
|
|
101859
101859
|
ts.setEmitFlags(factory.createIfStatement(errorRecord, factory.createThrowStatement(factory.createPropertyAccessExpression(errorRecord, "error"))), 1 /* EmitFlags.SingleLine */)
|
|
101860
101860
|
]), 1 /* EmitFlags.SingleLine */))
|
|
@@ -102004,7 +102004,7 @@ var ts;
|
|
|
102004
102004
|
return factory.updateForStatement(node, ts.visitNode(initializerFunction ? initializerFunction.part : node.initializer, visitorWithUnusedExpressionResult, ts.isForInitializer), ts.visitNode(shouldConvertCondition ? undefined : node.condition, visitor, ts.isExpression), ts.visitNode(shouldConvertIncrementor ? undefined : node.incrementor, visitorWithUnusedExpressionResult, ts.isExpression), convertedLoopBody);
|
|
102005
102005
|
}
|
|
102006
102006
|
function convertForOfStatement(node, convertedLoopBody) {
|
|
102007
|
-
return factory.updateForOfStatement(node,
|
|
102007
|
+
return factory.updateForOfStatement(node,
|
|
102008
102008
|
/*awaitModifier*/ undefined, ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), convertedLoopBody);
|
|
102009
102009
|
}
|
|
102010
102010
|
function convertForInStatement(node, convertedLoopBody) {
|
|
@@ -102074,8 +102074,8 @@ var ts;
|
|
|
102074
102074
|
}
|
|
102075
102075
|
else {
|
|
102076
102076
|
// this is top level converted loop and we need to create an alias for 'arguments' object
|
|
102077
|
-
(extraVariableDeclarations || (extraVariableDeclarations = [])).push(factory.createVariableDeclaration(state.argumentsName,
|
|
102078
|
-
/*exclamationToken*/ undefined,
|
|
102077
|
+
(extraVariableDeclarations || (extraVariableDeclarations = [])).push(factory.createVariableDeclaration(state.argumentsName,
|
|
102078
|
+
/*exclamationToken*/ undefined,
|
|
102079
102079
|
/*type*/ undefined, factory.createIdentifier("arguments")));
|
|
102080
102080
|
}
|
|
102081
102081
|
}
|
|
@@ -102090,8 +102090,8 @@ var ts;
|
|
|
102090
102090
|
// NOTE:
|
|
102091
102091
|
// if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set.
|
|
102092
102092
|
// If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'.
|
|
102093
|
-
(extraVariableDeclarations || (extraVariableDeclarations = [])).push(factory.createVariableDeclaration(state.thisName,
|
|
102094
|
-
/*exclamationToken*/ undefined,
|
|
102093
|
+
(extraVariableDeclarations || (extraVariableDeclarations = [])).push(factory.createVariableDeclaration(state.thisName,
|
|
102094
|
+
/*exclamationToken*/ undefined,
|
|
102095
102095
|
/*type*/ undefined, factory.createIdentifier("this")));
|
|
102096
102096
|
}
|
|
102097
102097
|
}
|
|
@@ -102176,13 +102176,13 @@ var ts;
|
|
|
102176
102176
|
// from affecting the initial value for `i` outside of the per-iteration environment.
|
|
102177
102177
|
var functionDeclaration = factory.createVariableStatement(
|
|
102178
102178
|
/*modifiers*/ undefined, ts.setEmitFlags(factory.createVariableDeclarationList([
|
|
102179
|
-
factory.createVariableDeclaration(functionName,
|
|
102180
|
-
/*exclamationToken*/ undefined,
|
|
102179
|
+
factory.createVariableDeclaration(functionName,
|
|
102180
|
+
/*exclamationToken*/ undefined,
|
|
102181
102181
|
/*type*/ undefined, ts.setEmitFlags(factory.createFunctionExpression(
|
|
102182
|
-
/*modifiers*/ undefined, containsYield ? factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined,
|
|
102183
|
-
/*name*/ undefined,
|
|
102184
|
-
/*typeParameters*/ undefined,
|
|
102185
|
-
/*parameters*/ undefined,
|
|
102182
|
+
/*modifiers*/ undefined, containsYield ? factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined,
|
|
102183
|
+
/*name*/ undefined,
|
|
102184
|
+
/*typeParameters*/ undefined,
|
|
102185
|
+
/*parameters*/ undefined,
|
|
102186
102186
|
/*type*/ undefined, ts.visitNode(factory.createBlock(statements, /*multiLine*/ true), visitor, ts.isBlock)), emitFlags))
|
|
102187
102187
|
]), 2097152 /* EmitFlags.NoHoisting */));
|
|
102188
102188
|
var part = factory.createVariableDeclarationList(ts.map(currentState.loopOutParameters, createOutVariable));
|
|
@@ -102282,12 +102282,12 @@ var ts;
|
|
|
102282
102282
|
// }
|
|
102283
102283
|
var functionDeclaration = factory.createVariableStatement(
|
|
102284
102284
|
/*modifiers*/ undefined, ts.setEmitFlags(factory.createVariableDeclarationList([
|
|
102285
|
-
factory.createVariableDeclaration(functionName,
|
|
102286
|
-
/*exclamationToken*/ undefined,
|
|
102285
|
+
factory.createVariableDeclaration(functionName,
|
|
102286
|
+
/*exclamationToken*/ undefined,
|
|
102287
102287
|
/*type*/ undefined, ts.setEmitFlags(factory.createFunctionExpression(
|
|
102288
|
-
/*modifiers*/ undefined, containsYield ? factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined,
|
|
102289
|
-
/*name*/ undefined,
|
|
102290
|
-
/*typeParameters*/ undefined, currentState.loopParameters,
|
|
102288
|
+
/*modifiers*/ undefined, containsYield ? factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined,
|
|
102289
|
+
/*name*/ undefined,
|
|
102290
|
+
/*typeParameters*/ undefined, currentState.loopParameters,
|
|
102291
102291
|
/*type*/ undefined, loopBody), emitFlags))
|
|
102292
102292
|
]), 2097152 /* EmitFlags.NoHoisting */));
|
|
102293
102293
|
var part = generateCallToConvertedLoop(functionName, currentState, outerState, containsYield);
|
|
@@ -102543,7 +102543,7 @@ var ts;
|
|
|
102543
102543
|
ts.Debug.assert(!ts.isComputedPropertyName(node.name));
|
|
102544
102544
|
var functionExpression = transformFunctionLikeToExpression(node, /*location*/ ts.moveRangePos(node, -1), /*name*/ undefined, /*container*/ undefined);
|
|
102545
102545
|
ts.setEmitFlags(functionExpression, 512 /* EmitFlags.NoLeadingComments */ | ts.getEmitFlags(functionExpression));
|
|
102546
|
-
return ts.setTextRange(factory.createPropertyAssignment(node.name, functionExpression),
|
|
102546
|
+
return ts.setTextRange(factory.createPropertyAssignment(node.name, functionExpression),
|
|
102547
102547
|
/*location*/ node);
|
|
102548
102548
|
}
|
|
102549
102549
|
/**
|
|
@@ -102575,7 +102575,7 @@ var ts;
|
|
|
102575
102575
|
* @param node A ShorthandPropertyAssignment node.
|
|
102576
102576
|
*/
|
|
102577
102577
|
function visitShorthandPropertyAssignment(node) {
|
|
102578
|
-
return ts.setTextRange(factory.createPropertyAssignment(node.name, visitIdentifier(factory.cloneNode(node.name))),
|
|
102578
|
+
return ts.setTextRange(factory.createPropertyAssignment(node.name, visitIdentifier(factory.cloneNode(node.name))),
|
|
102579
102579
|
/*location*/ node);
|
|
102580
102580
|
}
|
|
102581
102581
|
function visitComputedPropertyName(node) {
|
|
@@ -102617,7 +102617,7 @@ var ts;
|
|
|
102617
102617
|
ts.some(node.arguments, ts.isSpreadElement)) {
|
|
102618
102618
|
return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ true);
|
|
102619
102619
|
}
|
|
102620
|
-
return factory.updateCallExpression(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression),
|
|
102620
|
+
return factory.updateCallExpression(node, ts.visitNode(node.expression, callExpressionVisitor, ts.isExpression),
|
|
102621
102621
|
/*typeArguments*/ undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
|
|
102622
102622
|
}
|
|
102623
102623
|
function visitTypeScriptClassWrapper(node) {
|
|
@@ -102728,12 +102728,12 @@ var ts;
|
|
|
102728
102728
|
ts.addRange(statements, classStatements, /*start*/ 1);
|
|
102729
102729
|
// Recreate any outer parentheses or partially-emitted expressions to preserve source map
|
|
102730
102730
|
// and comment locations.
|
|
102731
|
-
return factory.restoreOuterExpressions(node.expression, factory.restoreOuterExpressions(variable.initializer, factory.restoreOuterExpressions(aliasAssignment && aliasAssignment.right, factory.updateCallExpression(call, factory.restoreOuterExpressions(call.expression, factory.updateFunctionExpression(func,
|
|
102732
|
-
/*modifiers*/ undefined,
|
|
102733
|
-
/*asteriskToken*/ undefined,
|
|
102734
|
-
/*name*/ undefined,
|
|
102735
|
-
/*typeParameters*/ undefined, func.parameters,
|
|
102736
|
-
/*type*/ undefined, factory.updateBlock(func.body, statements))),
|
|
102731
|
+
return factory.restoreOuterExpressions(node.expression, factory.restoreOuterExpressions(variable.initializer, factory.restoreOuterExpressions(aliasAssignment && aliasAssignment.right, factory.updateCallExpression(call, factory.restoreOuterExpressions(call.expression, factory.updateFunctionExpression(func,
|
|
102732
|
+
/*modifiers*/ undefined,
|
|
102733
|
+
/*asteriskToken*/ undefined,
|
|
102734
|
+
/*name*/ undefined,
|
|
102735
|
+
/*typeParameters*/ undefined, func.parameters,
|
|
102736
|
+
/*type*/ undefined, factory.updateBlock(func.body, statements))),
|
|
102737
102737
|
/*typeArguments*/ undefined, call.arguments))));
|
|
102738
102738
|
}
|
|
102739
102739
|
function visitSuperCallInBody(node) {
|
|
@@ -102802,7 +102802,7 @@ var ts;
|
|
|
102802
102802
|
// [output]
|
|
102803
102803
|
// new ((_a = C).bind.apply(_a, [void 0].concat(a)))()
|
|
102804
102804
|
var _a = factory.createCallBinding(factory.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
|
|
102805
|
-
return factory.createNewExpression(factory.createFunctionApplyCall(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(factory.createNodeArray(__spreadArray([factory.createVoidZero()], node.arguments, true)), /*isArgumentList*/ true, /*multiLine*/ false, /*hasTrailingComma*/ false)),
|
|
102805
|
+
return factory.createNewExpression(factory.createFunctionApplyCall(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(factory.createNodeArray(__spreadArray([factory.createVoidZero()], node.arguments, true)), /*isArgumentList*/ true, /*multiLine*/ false, /*hasTrailingComma*/ false)),
|
|
102806
102806
|
/*typeArguments*/ undefined, []);
|
|
102807
102807
|
}
|
|
102808
102808
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -102961,7 +102961,7 @@ var ts;
|
|
|
102961
102961
|
if (span.literal.text.length > 0) {
|
|
102962
102962
|
args.push(factory.createStringLiteral(span.literal.text));
|
|
102963
102963
|
}
|
|
102964
|
-
expression = factory.createCallExpression(factory.createPropertyAccessExpression(expression, "concat"),
|
|
102964
|
+
expression = factory.createCallExpression(factory.createPropertyAccessExpression(expression, "concat"),
|
|
102965
102965
|
/*typeArguments*/ undefined, args);
|
|
102966
102966
|
}
|
|
102967
102967
|
return ts.setTextRange(expression, node);
|
|
@@ -103659,10 +103659,10 @@ var ts;
|
|
|
103659
103659
|
function visitFunctionDeclaration(node) {
|
|
103660
103660
|
// Currently, we only support generators that were originally async functions.
|
|
103661
103661
|
if (node.asteriskToken) {
|
|
103662
|
-
node = ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(node.modifiers,
|
|
103663
|
-
/*asteriskToken*/ undefined, node.name,
|
|
103664
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
103665
|
-
/*type*/ undefined, transformGeneratorFunctionBody(node.body)),
|
|
103662
|
+
node = ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(node.modifiers,
|
|
103663
|
+
/*asteriskToken*/ undefined, node.name,
|
|
103664
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
103665
|
+
/*type*/ undefined, transformGeneratorFunctionBody(node.body)),
|
|
103666
103666
|
/*location*/ node), node);
|
|
103667
103667
|
}
|
|
103668
103668
|
else {
|
|
@@ -103697,10 +103697,10 @@ var ts;
|
|
|
103697
103697
|
// Currently, we only support generators that were originally async functions.
|
|
103698
103698
|
if (node.asteriskToken) {
|
|
103699
103699
|
node = ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(
|
|
103700
|
-
/*modifiers*/ undefined,
|
|
103701
|
-
/*asteriskToken*/ undefined, node.name,
|
|
103702
|
-
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
103703
|
-
/*type*/ undefined, transformGeneratorFunctionBody(node.body)),
|
|
103700
|
+
/*modifiers*/ undefined,
|
|
103701
|
+
/*asteriskToken*/ undefined, node.name,
|
|
103702
|
+
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
103703
|
+
/*type*/ undefined, transformGeneratorFunctionBody(node.body)),
|
|
103704
103704
|
/*location*/ node), node);
|
|
103705
103705
|
}
|
|
103706
103706
|
else {
|
|
@@ -104223,8 +104223,8 @@ var ts;
|
|
|
104223
104223
|
// .mark resumeLabel
|
|
104224
104224
|
// new (_b.apply(_a, _c.concat([%sent%, 2])));
|
|
104225
104225
|
var _a = factory.createCallBinding(factory.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
|
|
104226
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createNewExpression(factory.createFunctionApplyCall(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments,
|
|
104227
|
-
/*leadingElement*/ factory.createVoidZero())),
|
|
104226
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createNewExpression(factory.createFunctionApplyCall(cacheExpression(ts.visitNode(target, visitor, ts.isExpression)), thisArg, visitElements(node.arguments,
|
|
104227
|
+
/*leadingElement*/ factory.createVoidZero())),
|
|
104228
104228
|
/*typeArguments*/ undefined, []), node), node);
|
|
104229
104229
|
}
|
|
104230
104230
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -104541,7 +104541,7 @@ var ts;
|
|
|
104541
104541
|
var initializer = node.initializer;
|
|
104542
104542
|
hoistVariableDeclaration(keysIndex);
|
|
104543
104543
|
emitAssignment(keysArray, factory.createArrayLiteralExpression());
|
|
104544
|
-
emitStatement(factory.createForInStatement(key, ts.visitNode(node.expression, visitor, ts.isExpression), factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(keysArray, "push"),
|
|
104544
|
+
emitStatement(factory.createForInStatement(key, ts.visitNode(node.expression, visitor, ts.isExpression), factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(keysArray, "push"),
|
|
104545
104545
|
/*typeArguments*/ undefined, [key]))));
|
|
104546
104546
|
emitAssignment(keysIndex, factory.createNumericLiteral(0));
|
|
104547
104547
|
var conditionLabel = defineLabel();
|
|
@@ -104643,11 +104643,11 @@ var ts;
|
|
|
104643
104643
|
return ts.visitEachChild(node, visitor, context);
|
|
104644
104644
|
}
|
|
104645
104645
|
function transformAndEmitReturnStatement(node) {
|
|
104646
|
-
emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
104646
|
+
emitReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
104647
104647
|
/*location*/ node);
|
|
104648
104648
|
}
|
|
104649
104649
|
function visitReturnStatement(node) {
|
|
104650
|
-
return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
104650
|
+
return createInlineReturn(ts.visitNode(node.expression, visitor, ts.isExpression),
|
|
104651
104651
|
/*location*/ node);
|
|
104652
104652
|
}
|
|
104653
104653
|
function transformAndEmitWithStatement(node) {
|
|
@@ -104806,7 +104806,7 @@ var ts;
|
|
|
104806
104806
|
function transformAndEmitThrowStatement(node) {
|
|
104807
104807
|
var _a;
|
|
104808
104808
|
// TODO(rbuckton): `expression` should be required on `throw`.
|
|
104809
|
-
emitThrow(ts.visitNode((_a = node.expression) !== null && _a !== void 0 ? _a : factory.createVoidZero(), visitor, ts.isExpression),
|
|
104809
|
+
emitThrow(ts.visitNode((_a = node.expression) !== null && _a !== void 0 ? _a : factory.createVoidZero(), visitor, ts.isExpression),
|
|
104810
104810
|
/*location*/ node);
|
|
104811
104811
|
}
|
|
104812
104812
|
function transformAndEmitTryStatement(node) {
|
|
@@ -105343,7 +105343,7 @@ var ts;
|
|
|
105343
105343
|
* Creates an expression that can be used to resume from a Yield operation.
|
|
105344
105344
|
*/
|
|
105345
105345
|
function createGeneratorResume(location) {
|
|
105346
|
-
return ts.setTextRange(factory.createCallExpression(factory.createPropertyAccessExpression(state, "sent"),
|
|
105346
|
+
return ts.setTextRange(factory.createCallExpression(factory.createPropertyAccessExpression(state, "sent"),
|
|
105347
105347
|
/*typeArguments*/ undefined, []), location);
|
|
105348
105348
|
}
|
|
105349
105349
|
/**
|
|
@@ -105485,11 +105485,11 @@ var ts;
|
|
|
105485
105485
|
withBlockStack = undefined;
|
|
105486
105486
|
var buildResult = buildStatements();
|
|
105487
105487
|
return emitHelpers().createGeneratorHelper(ts.setEmitFlags(factory.createFunctionExpression(
|
|
105488
|
-
/*modifiers*/ undefined,
|
|
105489
|
-
/*asteriskToken*/ undefined,
|
|
105490
|
-
/*name*/ undefined,
|
|
105491
|
-
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)],
|
|
105492
|
-
/*type*/ undefined, factory.createBlock(buildResult,
|
|
105488
|
+
/*modifiers*/ undefined,
|
|
105489
|
+
/*asteriskToken*/ undefined,
|
|
105490
|
+
/*name*/ undefined,
|
|
105491
|
+
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)],
|
|
105492
|
+
/*type*/ undefined, factory.createBlock(buildResult,
|
|
105493
105493
|
/*multiLine*/ buildResult.length > 0)), 524288 /* EmitFlags.ReuseTempVariableScope */));
|
|
105494
105494
|
}
|
|
105495
105495
|
/**
|
|
@@ -105590,7 +105590,7 @@ var ts;
|
|
|
105590
105590
|
// indicate entry into a protected region by pushing the label numbers
|
|
105591
105591
|
// for each block in the protected region.
|
|
105592
105592
|
var startLabel = currentExceptionBlock.startLabel, catchLabel = currentExceptionBlock.catchLabel, finallyLabel = currentExceptionBlock.finallyLabel, endLabel = currentExceptionBlock.endLabel;
|
|
105593
|
-
statements.unshift(factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(state, "trys"), "push"),
|
|
105593
|
+
statements.unshift(factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(state, "trys"), "push"),
|
|
105594
105594
|
/*typeArguments*/ undefined, [
|
|
105595
105595
|
factory.createArrayLiteralExpression([
|
|
105596
105596
|
createLabel(startLabel),
|
|
@@ -105988,7 +105988,7 @@ var ts;
|
|
|
105988
105988
|
//
|
|
105989
105989
|
// define(mofactory.updateSourceFile", "module2"], function ...
|
|
105990
105990
|
var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
|
|
105991
|
-
factory.createExpressionStatement(factory.createCallExpression(define,
|
|
105991
|
+
factory.createExpressionStatement(factory.createCallExpression(define,
|
|
105992
105992
|
/*typeArguments*/ undefined, __spreadArray(__spreadArray([], (moduleName ? [moduleName] : []), true), [
|
|
105993
105993
|
// Add the dependency array argument:
|
|
105994
105994
|
//
|
|
@@ -106003,16 +106003,16 @@ var ts;
|
|
|
106003
106003
|
jsonSourceFile ?
|
|
106004
106004
|
jsonSourceFile.statements.length ? jsonSourceFile.statements[0].expression : factory.createObjectLiteralExpression() :
|
|
106005
106005
|
factory.createFunctionExpression(
|
|
106006
|
-
/*modifiers*/ undefined,
|
|
106007
|
-
/*asteriskToken*/ undefined,
|
|
106008
|
-
/*name*/ undefined,
|
|
106006
|
+
/*modifiers*/ undefined,
|
|
106007
|
+
/*asteriskToken*/ undefined,
|
|
106008
|
+
/*name*/ undefined,
|
|
106009
106009
|
/*typeParameters*/ undefined, __spreadArray([
|
|
106010
106010
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
|
|
106011
106011
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
|
|
106012
|
-
], importAliasNames, true),
|
|
106012
|
+
], importAliasNames, true),
|
|
106013
106013
|
/*type*/ undefined, transformAsynchronousModuleBody(node))
|
|
106014
106014
|
], false)))
|
|
106015
|
-
]),
|
|
106015
|
+
]),
|
|
106016
106016
|
/*location*/ node.statements));
|
|
106017
106017
|
ts.addEmitHelpers(updated, context.readEmitHelpers());
|
|
106018
106018
|
return updated;
|
|
@@ -106026,17 +106026,17 @@ var ts;
|
|
|
106026
106026
|
var _a = collectAsynchronousDependencies(node, /*includeNonAmdDependencies*/ false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
|
|
106027
106027
|
var moduleName = ts.tryGetModuleNameFromFile(factory, node, host, compilerOptions);
|
|
106028
106028
|
var umdHeader = factory.createFunctionExpression(
|
|
106029
|
-
/*modifiers*/ undefined,
|
|
106030
|
-
/*asteriskToken*/ undefined,
|
|
106031
|
-
/*name*/ undefined,
|
|
106032
|
-
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "factory")],
|
|
106029
|
+
/*modifiers*/ undefined,
|
|
106030
|
+
/*asteriskToken*/ undefined,
|
|
106031
|
+
/*name*/ undefined,
|
|
106032
|
+
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "factory")],
|
|
106033
106033
|
/*type*/ undefined, ts.setTextRange(factory.createBlock([
|
|
106034
106034
|
factory.createIfStatement(factory.createLogicalAnd(factory.createTypeCheck(factory.createIdentifier("module"), "object"), factory.createTypeCheck(factory.createPropertyAccessExpression(factory.createIdentifier("module"), "exports"), "object")), factory.createBlock([
|
|
106035
106035
|
factory.createVariableStatement(
|
|
106036
106036
|
/*modifiers*/ undefined, [
|
|
106037
|
-
factory.createVariableDeclaration("v",
|
|
106038
|
-
/*exclamationToken*/ undefined,
|
|
106039
|
-
/*type*/ undefined, factory.createCallExpression(factory.createIdentifier("factory"),
|
|
106037
|
+
factory.createVariableDeclaration("v",
|
|
106038
|
+
/*exclamationToken*/ undefined,
|
|
106039
|
+
/*type*/ undefined, factory.createCallExpression(factory.createIdentifier("factory"),
|
|
106040
106040
|
/*typeArguments*/ undefined, [
|
|
106041
106041
|
factory.createIdentifier("require"),
|
|
106042
106042
|
factory.createIdentifier("exports")
|
|
@@ -106044,7 +106044,7 @@ var ts;
|
|
|
106044
106044
|
]),
|
|
106045
106045
|
ts.setEmitFlags(factory.createIfStatement(factory.createStrictInequality(factory.createIdentifier("v"), factory.createIdentifier("undefined")), factory.createExpressionStatement(factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("module"), "exports"), factory.createIdentifier("v")))), 1 /* EmitFlags.SingleLine */)
|
|
106046
106046
|
]), factory.createIfStatement(factory.createLogicalAnd(factory.createTypeCheck(factory.createIdentifier("define"), "function"), factory.createPropertyAccessExpression(factory.createIdentifier("define"), "amd")), factory.createBlock([
|
|
106047
|
-
factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("define"),
|
|
106047
|
+
factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("define"),
|
|
106048
106048
|
/*typeArguments*/ undefined, __spreadArray(__spreadArray([], (moduleName ? [moduleName] : []), true), [
|
|
106049
106049
|
factory.createArrayLiteralExpression(__spreadArray(__spreadArray([
|
|
106050
106050
|
factory.createStringLiteral("require"),
|
|
@@ -106053,8 +106053,8 @@ var ts;
|
|
|
106053
106053
|
factory.createIdentifier("factory")
|
|
106054
106054
|
], false)))
|
|
106055
106055
|
])))
|
|
106056
|
-
],
|
|
106057
|
-
/*multiLine*/ true),
|
|
106056
|
+
],
|
|
106057
|
+
/*multiLine*/ true),
|
|
106058
106058
|
/*location*/ undefined));
|
|
106059
106059
|
// Create an updated SourceFile:
|
|
106060
106060
|
//
|
|
@@ -106068,22 +106068,22 @@ var ts;
|
|
|
106068
106068
|
// }
|
|
106069
106069
|
// })(function ...)
|
|
106070
106070
|
var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
|
|
106071
|
-
factory.createExpressionStatement(factory.createCallExpression(umdHeader,
|
|
106071
|
+
factory.createExpressionStatement(factory.createCallExpression(umdHeader,
|
|
106072
106072
|
/*typeArguments*/ undefined, [
|
|
106073
106073
|
// Add the module body function argument:
|
|
106074
106074
|
//
|
|
106075
106075
|
// function (require, exports) ...
|
|
106076
106076
|
factory.createFunctionExpression(
|
|
106077
|
-
/*modifiers*/ undefined,
|
|
106078
|
-
/*asteriskToken*/ undefined,
|
|
106079
|
-
/*name*/ undefined,
|
|
106077
|
+
/*modifiers*/ undefined,
|
|
106078
|
+
/*asteriskToken*/ undefined,
|
|
106079
|
+
/*name*/ undefined,
|
|
106080
106080
|
/*typeParameters*/ undefined, __spreadArray([
|
|
106081
106081
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"),
|
|
106082
106082
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports")
|
|
106083
|
-
], importAliasNames, true),
|
|
106083
|
+
], importAliasNames, true),
|
|
106084
106084
|
/*type*/ undefined, transformAsynchronousModuleBody(node))
|
|
106085
106085
|
]))
|
|
106086
|
-
]),
|
|
106086
|
+
]),
|
|
106087
106087
|
/*location*/ node.statements));
|
|
106088
106088
|
ts.addEmitHelpers(updated, context.readEmitHelpers());
|
|
106089
106089
|
return updated;
|
|
@@ -106423,19 +106423,19 @@ var ts;
|
|
|
106423
106423
|
if (ts.isSimpleCopiableExpression(arg)) {
|
|
106424
106424
|
var argClone = ts.isGeneratedIdentifier(arg) ? arg : ts.isStringLiteral(arg) ? factory.createStringLiteralFromNode(arg) : ts.setEmitFlags(ts.setTextRange(factory.cloneNode(arg), arg), 1536 /* EmitFlags.NoComments */);
|
|
106425
106425
|
return factory.createConditionalExpression(
|
|
106426
|
-
/*condition*/ factory.createIdentifier("__syncRequire"),
|
|
106427
|
-
/*questionToken*/ undefined,
|
|
106428
|
-
/*whenTrue*/ createImportCallExpressionCommonJS(arg, containsLexicalThis),
|
|
106429
|
-
/*colonToken*/ undefined,
|
|
106426
|
+
/*condition*/ factory.createIdentifier("__syncRequire"),
|
|
106427
|
+
/*questionToken*/ undefined,
|
|
106428
|
+
/*whenTrue*/ createImportCallExpressionCommonJS(arg, containsLexicalThis),
|
|
106429
|
+
/*colonToken*/ undefined,
|
|
106430
106430
|
/*whenFalse*/ createImportCallExpressionAMD(argClone, containsLexicalThis));
|
|
106431
106431
|
}
|
|
106432
106432
|
else {
|
|
106433
106433
|
var temp = factory.createTempVariable(hoistVariableDeclaration);
|
|
106434
106434
|
return factory.createComma(factory.createAssignment(temp, arg), factory.createConditionalExpression(
|
|
106435
|
-
/*condition*/ factory.createIdentifier("__syncRequire"),
|
|
106436
|
-
/*questionToken*/ undefined,
|
|
106437
|
-
/*whenTrue*/ createImportCallExpressionCommonJS(temp, containsLexicalThis),
|
|
106438
|
-
/*colonToken*/ undefined,
|
|
106435
|
+
/*condition*/ factory.createIdentifier("__syncRequire"),
|
|
106436
|
+
/*questionToken*/ undefined,
|
|
106437
|
+
/*whenTrue*/ createImportCallExpressionCommonJS(temp, containsLexicalThis),
|
|
106438
|
+
/*colonToken*/ undefined,
|
|
106439
106439
|
/*whenFalse*/ createImportCallExpressionAMD(temp, containsLexicalThis)));
|
|
106440
106440
|
}
|
|
106441
106441
|
}
|
|
@@ -106453,23 +106453,23 @@ var ts;
|
|
|
106453
106453
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject)
|
|
106454
106454
|
];
|
|
106455
106455
|
var body = factory.createBlock([
|
|
106456
|
-
factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("require"),
|
|
106456
|
+
factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("require"),
|
|
106457
106457
|
/*typeArguments*/ undefined, [factory.createArrayLiteralExpression([arg || factory.createOmittedExpression()]), resolve, reject]))
|
|
106458
106458
|
]);
|
|
106459
106459
|
var func;
|
|
106460
106460
|
if (languageVersion >= 2 /* ScriptTarget.ES2015 */) {
|
|
106461
106461
|
func = factory.createArrowFunction(
|
|
106462
|
-
/*modifiers*/ undefined,
|
|
106463
|
-
/*typeParameters*/ undefined, parameters,
|
|
106464
|
-
/*type*/ undefined,
|
|
106462
|
+
/*modifiers*/ undefined,
|
|
106463
|
+
/*typeParameters*/ undefined, parameters,
|
|
106464
|
+
/*type*/ undefined,
|
|
106465
106465
|
/*equalsGreaterThanToken*/ undefined, body);
|
|
106466
106466
|
}
|
|
106467
106467
|
else {
|
|
106468
106468
|
func = factory.createFunctionExpression(
|
|
106469
|
-
/*modifiers*/ undefined,
|
|
106470
|
-
/*asteriskToken*/ undefined,
|
|
106471
|
-
/*name*/ undefined,
|
|
106472
|
-
/*typeParameters*/ undefined, parameters,
|
|
106469
|
+
/*modifiers*/ undefined,
|
|
106470
|
+
/*asteriskToken*/ undefined,
|
|
106471
|
+
/*name*/ undefined,
|
|
106472
|
+
/*typeParameters*/ undefined, parameters,
|
|
106473
106473
|
/*type*/ undefined, body);
|
|
106474
106474
|
// if there is a lexical 'this' in the import call arguments, ensure we indicate
|
|
106475
106475
|
// that this new function expression indicates it captures 'this' so that the
|
|
@@ -106498,19 +106498,19 @@ var ts;
|
|
|
106498
106498
|
var func;
|
|
106499
106499
|
if (languageVersion >= 2 /* ScriptTarget.ES2015 */) {
|
|
106500
106500
|
func = factory.createArrowFunction(
|
|
106501
|
-
/*modifiers*/ undefined,
|
|
106502
|
-
/*typeParameters*/ undefined,
|
|
106503
|
-
/*parameters*/ [],
|
|
106504
|
-
/*type*/ undefined,
|
|
106501
|
+
/*modifiers*/ undefined,
|
|
106502
|
+
/*typeParameters*/ undefined,
|
|
106503
|
+
/*parameters*/ [],
|
|
106504
|
+
/*type*/ undefined,
|
|
106505
106505
|
/*equalsGreaterThanToken*/ undefined, requireCall);
|
|
106506
106506
|
}
|
|
106507
106507
|
else {
|
|
106508
106508
|
func = factory.createFunctionExpression(
|
|
106509
|
-
/*modifiers*/ undefined,
|
|
106510
|
-
/*asteriskToken*/ undefined,
|
|
106511
|
-
/*name*/ undefined,
|
|
106512
|
-
/*typeParameters*/ undefined,
|
|
106513
|
-
/*parameters*/ [],
|
|
106509
|
+
/*modifiers*/ undefined,
|
|
106510
|
+
/*asteriskToken*/ undefined,
|
|
106511
|
+
/*name*/ undefined,
|
|
106512
|
+
/*typeParameters*/ undefined,
|
|
106513
|
+
/*parameters*/ [],
|
|
106514
106514
|
/*type*/ undefined, factory.createBlock([factory.createReturnStatement(requireCall)]));
|
|
106515
106515
|
// if there is a lexical 'this' in the import call arguments, ensure we indicate
|
|
106516
106516
|
// that this new function expression indicates it captures 'this' so that the
|
|
@@ -106559,8 +106559,8 @@ var ts;
|
|
|
106559
106559
|
var variables = [];
|
|
106560
106560
|
if (namespaceDeclaration && !ts.isDefaultImport(node)) {
|
|
106561
106561
|
// import * as n from "mod";
|
|
106562
|
-
variables.push(factory.createVariableDeclaration(factory.cloneNode(namespaceDeclaration.name),
|
|
106563
|
-
/*exclamationToken*/ undefined,
|
|
106562
|
+
variables.push(factory.createVariableDeclaration(factory.cloneNode(namespaceDeclaration.name),
|
|
106563
|
+
/*exclamationToken*/ undefined,
|
|
106564
106564
|
/*type*/ undefined, getHelperExpressionForImport(node, createRequireCall(node))));
|
|
106565
106565
|
}
|
|
106566
106566
|
else {
|
|
@@ -106568,18 +106568,18 @@ var ts;
|
|
|
106568
106568
|
// import { x, y } from "mod";
|
|
106569
106569
|
// import d, { x, y } from "mod";
|
|
106570
106570
|
// import d, * as n from "mod";
|
|
106571
|
-
variables.push(factory.createVariableDeclaration(factory.getGeneratedNameForNode(node),
|
|
106572
|
-
/*exclamationToken*/ undefined,
|
|
106571
|
+
variables.push(factory.createVariableDeclaration(factory.getGeneratedNameForNode(node),
|
|
106572
|
+
/*exclamationToken*/ undefined,
|
|
106573
106573
|
/*type*/ undefined, getHelperExpressionForImport(node, createRequireCall(node))));
|
|
106574
106574
|
if (namespaceDeclaration && ts.isDefaultImport(node)) {
|
|
106575
|
-
variables.push(factory.createVariableDeclaration(factory.cloneNode(namespaceDeclaration.name),
|
|
106576
|
-
/*exclamationToken*/ undefined,
|
|
106575
|
+
variables.push(factory.createVariableDeclaration(factory.cloneNode(namespaceDeclaration.name),
|
|
106576
|
+
/*exclamationToken*/ undefined,
|
|
106577
106577
|
/*type*/ undefined, factory.getGeneratedNameForNode(node)));
|
|
106578
106578
|
}
|
|
106579
106579
|
}
|
|
106580
106580
|
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(
|
|
106581
|
-
/*modifiers*/ undefined, factory.createVariableDeclarationList(variables, languageVersion >= 2 /* ScriptTarget.ES2015 */ ? 2 /* NodeFlags.Const */ : 0 /* NodeFlags.None */)),
|
|
106582
|
-
/*location*/ node),
|
|
106581
|
+
/*modifiers*/ undefined, factory.createVariableDeclarationList(variables, languageVersion >= 2 /* ScriptTarget.ES2015 */ ? 2 /* NodeFlags.Const */ : 0 /* NodeFlags.None */)),
|
|
106582
|
+
/*location*/ node),
|
|
106583
106583
|
/*original*/ node));
|
|
106584
106584
|
}
|
|
106585
106585
|
}
|
|
@@ -106587,10 +106587,10 @@ var ts;
|
|
|
106587
106587
|
// import d, * as n from "mod";
|
|
106588
106588
|
statements = ts.append(statements, factory.createVariableStatement(
|
|
106589
106589
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
106590
|
-
ts.setOriginalNode(ts.setTextRange(factory.createVariableDeclaration(factory.cloneNode(namespaceDeclaration.name),
|
|
106591
|
-
/*exclamationToken*/ undefined,
|
|
106592
|
-
/*type*/ undefined, factory.getGeneratedNameForNode(node)),
|
|
106593
|
-
/*location*/ node),
|
|
106590
|
+
ts.setOriginalNode(ts.setTextRange(factory.createVariableDeclaration(factory.cloneNode(namespaceDeclaration.name),
|
|
106591
|
+
/*exclamationToken*/ undefined,
|
|
106592
|
+
/*type*/ undefined, factory.getGeneratedNameForNode(node)),
|
|
106593
|
+
/*location*/ node),
|
|
106594
106594
|
/*original*/ node)
|
|
106595
106595
|
], languageVersion >= 2 /* ScriptTarget.ES2015 */ ? 2 /* NodeFlags.Const */ : 0 /* NodeFlags.None */)));
|
|
106596
106596
|
}
|
|
@@ -106632,10 +106632,10 @@ var ts;
|
|
|
106632
106632
|
else {
|
|
106633
106633
|
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(
|
|
106634
106634
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
106635
|
-
factory.createVariableDeclaration(factory.cloneNode(node.name),
|
|
106636
|
-
/*exclamationToken*/ undefined,
|
|
106635
|
+
factory.createVariableDeclaration(factory.cloneNode(node.name),
|
|
106636
|
+
/*exclamationToken*/ undefined,
|
|
106637
106637
|
/*type*/ undefined, createRequireCall(node))
|
|
106638
|
-
],
|
|
106638
|
+
],
|
|
106639
106639
|
/*flags*/ languageVersion >= 2 /* ScriptTarget.ES2015 */ ? 2 /* NodeFlags.Const */ : 0 /* NodeFlags.None */)), node), node));
|
|
106640
106640
|
}
|
|
106641
106641
|
}
|
|
@@ -106672,11 +106672,11 @@ var ts;
|
|
|
106672
106672
|
if (moduleKind !== ts.ModuleKind.AMD) {
|
|
106673
106673
|
statements.push(ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(
|
|
106674
106674
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
106675
|
-
factory.createVariableDeclaration(generatedName,
|
|
106676
|
-
/*exclamationToken*/ undefined,
|
|
106675
|
+
factory.createVariableDeclaration(generatedName,
|
|
106676
|
+
/*exclamationToken*/ undefined,
|
|
106677
106677
|
/*type*/ undefined, createRequireCall(node))
|
|
106678
|
-
])),
|
|
106679
|
-
/*location*/ node),
|
|
106678
|
+
])),
|
|
106679
|
+
/*location*/ node),
|
|
106680
106680
|
/* original */ node));
|
|
106681
106681
|
}
|
|
106682
106682
|
for (var _i = 0, _a = node.exportClause.elements; _i < _a.length; _i++) {
|
|
@@ -106738,10 +106738,10 @@ var ts;
|
|
|
106738
106738
|
function visitFunctionDeclaration(node) {
|
|
106739
106739
|
var statements;
|
|
106740
106740
|
if (ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
|
|
106741
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
106742
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor),
|
|
106743
|
-
/*type*/ undefined, ts.visitEachChild(node.body, visitor, context)),
|
|
106744
|
-
/*location*/ node),
|
|
106741
|
+
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
106742
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor),
|
|
106743
|
+
/*type*/ undefined, ts.visitEachChild(node.body, visitor, context)),
|
|
106744
|
+
/*location*/ node),
|
|
106745
106745
|
/*original*/ node));
|
|
106746
106746
|
}
|
|
106747
106747
|
else {
|
|
@@ -106765,7 +106765,7 @@ var ts;
|
|
|
106765
106765
|
function visitClassDeclaration(node) {
|
|
106766
106766
|
var statements;
|
|
106767
106767
|
if (ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
|
|
106768
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
106768
|
+
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
106769
106769
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor), ts.visitNodes(node.members, visitor)), node), node));
|
|
106770
106770
|
}
|
|
106771
106771
|
else {
|
|
@@ -106804,7 +106804,7 @@ var ts;
|
|
|
106804
106804
|
}
|
|
106805
106805
|
else if (variable.initializer) {
|
|
106806
106806
|
if (!ts.isBindingPattern(variable.name) && (ts.isArrowFunction(variable.initializer) || ts.isFunctionExpression(variable.initializer) || ts.isClassExpression(variable.initializer))) {
|
|
106807
|
-
var expression = factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), variable.name),
|
|
106807
|
+
var expression = factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), variable.name),
|
|
106808
106808
|
/*location*/ variable.name), factory.createIdentifier(ts.getTextOfIdentifierOrLiteral(variable.name)));
|
|
106809
106809
|
var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor));
|
|
106810
106810
|
variables = ts.append(variables, updatedVariable);
|
|
@@ -106862,12 +106862,12 @@ var ts;
|
|
|
106862
106862
|
*/
|
|
106863
106863
|
function transformInitializedVariable(node) {
|
|
106864
106864
|
if (ts.isBindingPattern(node.name)) {
|
|
106865
|
-
return ts.flattenDestructuringAssignment(ts.visitNode(node, visitor),
|
|
106866
|
-
/*visitor*/ undefined, context, 0 /* FlattenLevel.All */,
|
|
106865
|
+
return ts.flattenDestructuringAssignment(ts.visitNode(node, visitor),
|
|
106866
|
+
/*visitor*/ undefined, context, 0 /* FlattenLevel.All */,
|
|
106867
106867
|
/*needsValue*/ false, createAllExportExpressions);
|
|
106868
106868
|
}
|
|
106869
106869
|
else {
|
|
106870
|
-
return factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), node.name),
|
|
106870
|
+
return factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), node.name),
|
|
106871
106871
|
/*location*/ node.name), node.initializer ? ts.visitNode(node.initializer, visitor) : factory.createVoidZero());
|
|
106872
106872
|
}
|
|
106873
106873
|
}
|
|
@@ -107076,7 +107076,7 @@ var ts;
|
|
|
107076
107076
|
statement = factory.createExpressionStatement(createExportExpression(factory.createIdentifier("__esModule"), factory.createTrue()));
|
|
107077
107077
|
}
|
|
107078
107078
|
else {
|
|
107079
|
-
statement = factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"),
|
|
107079
|
+
statement = factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"),
|
|
107080
107080
|
/*typeArguments*/ undefined, [
|
|
107081
107081
|
factory.createIdentifier("exports"),
|
|
107082
107082
|
factory.createStringLiteral("__esModule"),
|
|
@@ -107112,18 +107112,18 @@ var ts;
|
|
|
107112
107112
|
* @param location The location to use for source maps and comments for the export.
|
|
107113
107113
|
*/
|
|
107114
107114
|
function createExportExpression(name, value, location, liveBinding) {
|
|
107115
|
-
return ts.setTextRange(liveBinding && languageVersion !== 0 /* ScriptTarget.ES3 */ ? factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"),
|
|
107115
|
+
return ts.setTextRange(liveBinding && languageVersion !== 0 /* ScriptTarget.ES3 */ ? factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"),
|
|
107116
107116
|
/*typeArguments*/ undefined, [
|
|
107117
107117
|
factory.createIdentifier("exports"),
|
|
107118
107118
|
factory.createStringLiteralFromNode(name),
|
|
107119
107119
|
factory.createObjectLiteralExpression([
|
|
107120
107120
|
factory.createPropertyAssignment("enumerable", factory.createTrue()),
|
|
107121
107121
|
factory.createPropertyAssignment("get", factory.createFunctionExpression(
|
|
107122
|
-
/*modifiers*/ undefined,
|
|
107123
|
-
/*asteriskToken*/ undefined,
|
|
107124
|
-
/*name*/ undefined,
|
|
107125
|
-
/*typeParameters*/ undefined,
|
|
107126
|
-
/*parameters*/ [],
|
|
107122
|
+
/*modifiers*/ undefined,
|
|
107123
|
+
/*asteriskToken*/ undefined,
|
|
107124
|
+
/*name*/ undefined,
|
|
107125
|
+
/*typeParameters*/ undefined,
|
|
107126
|
+
/*parameters*/ [],
|
|
107127
107127
|
/*type*/ undefined, factory.createBlock([factory.createReturnStatement(value)])))
|
|
107128
107128
|
])
|
|
107129
107129
|
]) : factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(name)), value), location);
|
|
@@ -107232,7 +107232,7 @@ var ts;
|
|
|
107232
107232
|
var expression = substituteExpressionIdentifier(node.expression);
|
|
107233
107233
|
noSubstitution[ts.getNodeId(expression)] = true;
|
|
107234
107234
|
if (!ts.isIdentifier(expression) && !(ts.getEmitFlags(node.expression) & 4096 /* EmitFlags.HelperName */)) {
|
|
107235
|
-
return ts.addEmitFlags(factory.updateCallExpression(node, expression,
|
|
107235
|
+
return ts.addEmitFlags(factory.updateCallExpression(node, expression,
|
|
107236
107236
|
/*typeArguments*/ undefined, node.arguments), 536870912 /* EmitFlags.IndirectCall */);
|
|
107237
107237
|
}
|
|
107238
107238
|
}
|
|
@@ -107243,7 +107243,7 @@ var ts;
|
|
|
107243
107243
|
var tag = substituteExpressionIdentifier(node.tag);
|
|
107244
107244
|
noSubstitution[ts.getNodeId(tag)] = true;
|
|
107245
107245
|
if (!ts.isIdentifier(tag) && !(ts.getEmitFlags(node.tag) & 4096 /* EmitFlags.HelperName */)) {
|
|
107246
|
-
return ts.addEmitFlags(factory.updateTaggedTemplateExpression(node, tag,
|
|
107246
|
+
return ts.addEmitFlags(factory.updateTaggedTemplateExpression(node, tag,
|
|
107247
107247
|
/*typeArguments*/ undefined, node.template), 536870912 /* EmitFlags.IndirectCall */);
|
|
107248
107248
|
}
|
|
107249
107249
|
}
|
|
@@ -107267,18 +107267,18 @@ var ts;
|
|
|
107267
107267
|
else if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* GeneratedIdentifierFlags.AllowNameSubstitution */)) && !ts.isLocalName(node)) {
|
|
107268
107268
|
var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
|
|
107269
107269
|
if (exportContainer && exportContainer.kind === 305 /* SyntaxKind.SourceFile */) {
|
|
107270
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)),
|
|
107270
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)),
|
|
107271
107271
|
/*location*/ node);
|
|
107272
107272
|
}
|
|
107273
107273
|
var importDeclaration = resolver.getReferencedImportDeclaration(node);
|
|
107274
107274
|
if (importDeclaration) {
|
|
107275
107275
|
if (ts.isImportClause(importDeclaration)) {
|
|
107276
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(importDeclaration.parent), factory.createIdentifier("default")),
|
|
107276
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(importDeclaration.parent), factory.createIdentifier("default")),
|
|
107277
107277
|
/*location*/ node);
|
|
107278
107278
|
}
|
|
107279
107279
|
else if (ts.isImportSpecifier(importDeclaration)) {
|
|
107280
107280
|
var name = importDeclaration.propertyName || importDeclaration.name;
|
|
107281
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) || importDeclaration), factory.cloneNode(name)),
|
|
107281
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) || importDeclaration), factory.cloneNode(name)),
|
|
107282
107282
|
/*location*/ node);
|
|
107283
107283
|
}
|
|
107284
107284
|
}
|
|
@@ -107408,13 +107408,13 @@ var ts;
|
|
|
107408
107408
|
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
|
|
107409
107409
|
var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
|
|
107410
107410
|
var moduleBodyFunction = factory.createFunctionExpression(
|
|
107411
|
-
/*modifiers*/ undefined,
|
|
107412
|
-
/*asteriskToken*/ undefined,
|
|
107413
|
-
/*name*/ undefined,
|
|
107411
|
+
/*modifiers*/ undefined,
|
|
107412
|
+
/*asteriskToken*/ undefined,
|
|
107413
|
+
/*name*/ undefined,
|
|
107414
107414
|
/*typeParameters*/ undefined, [
|
|
107415
107415
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, exportFunction),
|
|
107416
107416
|
factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, contextObject)
|
|
107417
|
-
],
|
|
107417
|
+
],
|
|
107418
107418
|
/*type*/ undefined, moduleBodyBlock);
|
|
107419
107419
|
// Write the call to `System.register`
|
|
107420
107420
|
// Clear the emit-helpers flag for later passes since we'll have already used it in the module body
|
|
@@ -107422,7 +107422,7 @@ var ts;
|
|
|
107422
107422
|
var moduleName = ts.tryGetModuleNameFromFile(factory, node, host, compilerOptions);
|
|
107423
107423
|
var dependencies = factory.createArrayLiteralExpression(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
|
|
107424
107424
|
var updated = ts.setEmitFlags(factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
|
|
107425
|
-
factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("System"), "register"),
|
|
107425
|
+
factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("System"), "register"),
|
|
107426
107426
|
/*typeArguments*/ undefined, moduleName
|
|
107427
107427
|
? [moduleName, dependencies, moduleBodyFunction]
|
|
107428
107428
|
: [dependencies, moduleBodyFunction]))
|
|
@@ -107529,8 +107529,8 @@ var ts;
|
|
|
107529
107529
|
// var __moduleName = context_1 && context_1.id;
|
|
107530
107530
|
statements.push(factory.createVariableStatement(
|
|
107531
107531
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
107532
|
-
factory.createVariableDeclaration("__moduleName",
|
|
107533
|
-
/*exclamationToken*/ undefined,
|
|
107532
|
+
factory.createVariableDeclaration("__moduleName",
|
|
107533
|
+
/*exclamationToken*/ undefined,
|
|
107534
107534
|
/*type*/ undefined, factory.createLogicalAnd(contextObject, factory.createPropertyAccessExpression(contextObject, "id")))
|
|
107535
107535
|
])));
|
|
107536
107536
|
// Visit the synthetic external helpers import declaration if present
|
|
@@ -107553,11 +107553,11 @@ var ts;
|
|
|
107553
107553
|
undefined;
|
|
107554
107554
|
var moduleObject = factory.createObjectLiteralExpression([
|
|
107555
107555
|
factory.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
|
|
107556
|
-
factory.createPropertyAssignment("execute", factory.createFunctionExpression(modifiers,
|
|
107557
|
-
/*asteriskToken*/ undefined,
|
|
107558
|
-
/*name*/ undefined,
|
|
107559
|
-
/*typeParameters*/ undefined,
|
|
107560
|
-
/*parameters*/ [],
|
|
107556
|
+
factory.createPropertyAssignment("execute", factory.createFunctionExpression(modifiers,
|
|
107557
|
+
/*asteriskToken*/ undefined,
|
|
107558
|
+
/*name*/ undefined,
|
|
107559
|
+
/*typeParameters*/ undefined,
|
|
107560
|
+
/*parameters*/ [],
|
|
107561
107561
|
/*type*/ undefined, factory.createBlock(executeStatements, /*multiLine*/ true)))
|
|
107562
107562
|
], /*multiLine*/ true);
|
|
107563
107563
|
statements.push(factory.createReturnStatement(moduleObject));
|
|
@@ -107609,8 +107609,8 @@ var ts;
|
|
|
107609
107609
|
var exportedNamesStorageRef = factory.createUniqueName("exportedNames");
|
|
107610
107610
|
statements.push(factory.createVariableStatement(
|
|
107611
107611
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
107612
|
-
factory.createVariableDeclaration(exportedNamesStorageRef,
|
|
107613
|
-
/*exclamationToken*/ undefined,
|
|
107612
|
+
factory.createVariableDeclaration(exportedNamesStorageRef,
|
|
107613
|
+
/*exclamationToken*/ undefined,
|
|
107614
107614
|
/*type*/ undefined, factory.createObjectLiteralExpression(exportedNames, /*multiline*/ true))
|
|
107615
107615
|
])));
|
|
107616
107616
|
var exportStarFunction = createExportStarFunction(exportedNamesStorageRef);
|
|
@@ -107631,18 +107631,18 @@ var ts;
|
|
|
107631
107631
|
var exports = factory.createIdentifier("exports");
|
|
107632
107632
|
var condition = factory.createStrictInequality(n, factory.createStringLiteral("default"));
|
|
107633
107633
|
if (localNames) {
|
|
107634
|
-
condition = factory.createLogicalAnd(condition, factory.createLogicalNot(factory.createCallExpression(factory.createPropertyAccessExpression(localNames, "hasOwnProperty"),
|
|
107634
|
+
condition = factory.createLogicalAnd(condition, factory.createLogicalNot(factory.createCallExpression(factory.createPropertyAccessExpression(localNames, "hasOwnProperty"),
|
|
107635
107635
|
/*typeArguments*/ undefined, [n])));
|
|
107636
107636
|
}
|
|
107637
107637
|
return factory.createFunctionDeclaration(
|
|
107638
|
-
/*modifiers*/ undefined,
|
|
107639
|
-
/*asteriskToken*/ undefined, exportStarFunction,
|
|
107640
|
-
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, m)],
|
|
107638
|
+
/*modifiers*/ undefined,
|
|
107639
|
+
/*asteriskToken*/ undefined, exportStarFunction,
|
|
107640
|
+
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, m)],
|
|
107641
107641
|
/*type*/ undefined, factory.createBlock([
|
|
107642
107642
|
factory.createVariableStatement(
|
|
107643
107643
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
107644
|
-
factory.createVariableDeclaration(exports,
|
|
107645
|
-
/*exclamationToken*/ undefined,
|
|
107644
|
+
factory.createVariableDeclaration(exports,
|
|
107645
|
+
/*exclamationToken*/ undefined,
|
|
107646
107646
|
/*type*/ undefined, factory.createObjectLiteralExpression([]))
|
|
107647
107647
|
])),
|
|
107648
107648
|
factory.createForInStatement(factory.createVariableDeclarationList([
|
|
@@ -107650,7 +107650,7 @@ var ts;
|
|
|
107650
107650
|
]), m, factory.createBlock([
|
|
107651
107651
|
ts.setEmitFlags(factory.createIfStatement(condition, factory.createExpressionStatement(factory.createAssignment(factory.createElementAccessExpression(exports, n), factory.createElementAccessExpression(m, n)))), 1 /* EmitFlags.SingleLine */)
|
|
107652
107652
|
])),
|
|
107653
|
-
factory.createExpressionStatement(factory.createCallExpression(exportFunction,
|
|
107653
|
+
factory.createExpressionStatement(factory.createCallExpression(exportFunction,
|
|
107654
107654
|
/*typeArguments*/ undefined, [exports]))
|
|
107655
107655
|
], /*multiline*/ true));
|
|
107656
107656
|
}
|
|
@@ -107701,11 +107701,11 @@ var ts;
|
|
|
107701
107701
|
var e = _d[_c];
|
|
107702
107702
|
properties.push(factory.createPropertyAssignment(factory.createStringLiteral(ts.idText(e.name)), factory.createElementAccessExpression(parameterName, factory.createStringLiteral(ts.idText(e.propertyName || e.name)))));
|
|
107703
107703
|
}
|
|
107704
|
-
statements.push(factory.createExpressionStatement(factory.createCallExpression(exportFunction,
|
|
107704
|
+
statements.push(factory.createExpressionStatement(factory.createCallExpression(exportFunction,
|
|
107705
107705
|
/*typeArguments*/ undefined, [factory.createObjectLiteralExpression(properties, /*multiline*/ true)])));
|
|
107706
107706
|
}
|
|
107707
107707
|
else {
|
|
107708
|
-
statements.push(factory.createExpressionStatement(factory.createCallExpression(exportFunction,
|
|
107708
|
+
statements.push(factory.createExpressionStatement(factory.createCallExpression(exportFunction,
|
|
107709
107709
|
/*typeArguments*/ undefined, [
|
|
107710
107710
|
factory.createStringLiteral(ts.idText(entry.exportClause.name)),
|
|
107711
107711
|
parameterName
|
|
@@ -107718,17 +107718,17 @@ var ts;
|
|
|
107718
107718
|
// emit as:
|
|
107719
107719
|
//
|
|
107720
107720
|
// exportStar(foo_1_1);
|
|
107721
|
-
statements.push(factory.createExpressionStatement(factory.createCallExpression(exportStarFunction,
|
|
107721
|
+
statements.push(factory.createExpressionStatement(factory.createCallExpression(exportStarFunction,
|
|
107722
107722
|
/*typeArguments*/ undefined, [parameterName])));
|
|
107723
107723
|
}
|
|
107724
107724
|
break;
|
|
107725
107725
|
}
|
|
107726
107726
|
}
|
|
107727
107727
|
setters.push(factory.createFunctionExpression(
|
|
107728
|
-
/*modifiers*/ undefined,
|
|
107729
|
-
/*asteriskToken*/ undefined,
|
|
107730
|
-
/*name*/ undefined,
|
|
107731
|
-
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
|
|
107728
|
+
/*modifiers*/ undefined,
|
|
107729
|
+
/*asteriskToken*/ undefined,
|
|
107730
|
+
/*name*/ undefined,
|
|
107731
|
+
/*typeParameters*/ undefined, [factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)],
|
|
107732
107732
|
/*type*/ undefined, factory.createBlock(statements, /*multiLine*/ true)));
|
|
107733
107733
|
}
|
|
107734
107734
|
return factory.createArrayLiteralExpression(setters, /*multiLine*/ true);
|
|
@@ -107826,8 +107826,8 @@ var ts;
|
|
|
107826
107826
|
*/
|
|
107827
107827
|
function visitFunctionDeclaration(node) {
|
|
107828
107828
|
if (ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
|
|
107829
|
-
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.asteriskToken, factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
107830
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
107829
|
+
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.asteriskToken, factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
107830
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
107831
107831
|
/*type*/ undefined, ts.visitNode(node.body, visitor, ts.isBlock)));
|
|
107832
107832
|
}
|
|
107833
107833
|
else {
|
|
@@ -107854,7 +107854,7 @@ var ts;
|
|
|
107854
107854
|
var name = factory.getLocalName(node);
|
|
107855
107855
|
hoistVariableDeclaration(name);
|
|
107856
107856
|
// Rewrite the class declaration into an assignment of a class expression.
|
|
107857
|
-
statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.name,
|
|
107857
|
+
statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.name,
|
|
107858
107858
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement)), node))), node));
|
|
107859
107859
|
if (hasAssociatedEndOfDeclarationMarker(node)) {
|
|
107860
107860
|
// Defer exports until we encounter an EndOfDeclarationMarker node
|
|
@@ -107940,7 +107940,7 @@ var ts;
|
|
|
107940
107940
|
function transformInitializedVariable(node, isExportedDeclaration) {
|
|
107941
107941
|
var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
|
|
107942
107942
|
return ts.isBindingPattern(node.name)
|
|
107943
|
-
? ts.flattenDestructuringAssignment(node, visitor, context, 0 /* FlattenLevel.All */,
|
|
107943
|
+
? ts.flattenDestructuringAssignment(node, visitor, context, 0 /* FlattenLevel.All */,
|
|
107944
107944
|
/*needsValue*/ false, createAssignment)
|
|
107945
107945
|
: node.initializer ? createAssignment(node.name, ts.visitNode(node.initializer, visitor, ts.isExpression)) : node.name;
|
|
107946
107946
|
}
|
|
@@ -108518,7 +108518,7 @@ var ts;
|
|
|
108518
108518
|
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
108519
108519
|
// Only use the external module name if it differs from the first argument. This allows us to preserve the quote style of the argument on output.
|
|
108520
108520
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
108521
|
-
return factory.createCallExpression(factory.createPropertyAccessExpression(contextObject, factory.createIdentifier("import")),
|
|
108521
|
+
return factory.createCallExpression(factory.createPropertyAccessExpression(contextObject, factory.createIdentifier("import")),
|
|
108522
108522
|
/*typeArguments*/ undefined, argument ? [argument] : []);
|
|
108523
108523
|
}
|
|
108524
108524
|
/**
|
|
@@ -108703,11 +108703,11 @@ var ts;
|
|
|
108703
108703
|
var importDeclaration = resolver.getReferencedImportDeclaration(name);
|
|
108704
108704
|
if (importDeclaration) {
|
|
108705
108705
|
if (ts.isImportClause(importDeclaration)) {
|
|
108706
|
-
return ts.setTextRange(factory.createPropertyAssignment(factory.cloneNode(name), factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(importDeclaration.parent), factory.createIdentifier("default"))),
|
|
108706
|
+
return ts.setTextRange(factory.createPropertyAssignment(factory.cloneNode(name), factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(importDeclaration.parent), factory.createIdentifier("default"))),
|
|
108707
108707
|
/*location*/ node);
|
|
108708
108708
|
}
|
|
108709
108709
|
else if (ts.isImportSpecifier(importDeclaration)) {
|
|
108710
|
-
return ts.setTextRange(factory.createPropertyAssignment(factory.cloneNode(name), factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) || importDeclaration), factory.cloneNode(importDeclaration.propertyName || importDeclaration.name))),
|
|
108710
|
+
return ts.setTextRange(factory.createPropertyAssignment(factory.cloneNode(name), factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) || importDeclaration), factory.cloneNode(importDeclaration.propertyName || importDeclaration.name))),
|
|
108711
108711
|
/*location*/ node);
|
|
108712
108712
|
}
|
|
108713
108713
|
}
|
|
@@ -108754,11 +108754,11 @@ var ts;
|
|
|
108754
108754
|
var importDeclaration = resolver.getReferencedImportDeclaration(node);
|
|
108755
108755
|
if (importDeclaration) {
|
|
108756
108756
|
if (ts.isImportClause(importDeclaration)) {
|
|
108757
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(importDeclaration.parent), factory.createIdentifier("default")),
|
|
108757
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(importDeclaration.parent), factory.createIdentifier("default")),
|
|
108758
108758
|
/*location*/ node);
|
|
108759
108759
|
}
|
|
108760
108760
|
else if (ts.isImportSpecifier(importDeclaration)) {
|
|
108761
|
-
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) || importDeclaration), factory.cloneNode(importDeclaration.propertyName || importDeclaration.name)),
|
|
108761
|
+
return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) || importDeclaration), factory.cloneNode(importDeclaration.propertyName || importDeclaration.name)),
|
|
108762
108762
|
/*location*/ node);
|
|
108763
108763
|
}
|
|
108764
108764
|
}
|
|
@@ -108926,19 +108926,19 @@ var ts;
|
|
|
108926
108926
|
var createRequireName = factory.createUniqueName("_createRequire", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */);
|
|
108927
108927
|
var importStatement = factory.createImportDeclaration(
|
|
108928
108928
|
/*modifiers*/ undefined, factory.createImportClause(
|
|
108929
|
-
/*isTypeOnly*/ false,
|
|
108929
|
+
/*isTypeOnly*/ false,
|
|
108930
108930
|
/*name*/ undefined, factory.createNamedImports([
|
|
108931
108931
|
factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier("createRequire"), createRequireName)
|
|
108932
108932
|
])), factory.createStringLiteral("module"));
|
|
108933
108933
|
var requireHelperName = factory.createUniqueName("__require", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */);
|
|
108934
108934
|
var requireStatement = factory.createVariableStatement(
|
|
108935
108935
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
108936
|
-
factory.createVariableDeclaration(requireHelperName,
|
|
108937
|
-
/*exclamationToken*/ undefined,
|
|
108936
|
+
factory.createVariableDeclaration(requireHelperName,
|
|
108937
|
+
/*exclamationToken*/ undefined,
|
|
108938
108938
|
/*type*/ undefined, factory.createCallExpression(factory.cloneNode(createRequireName), /*typeArguments*/ undefined, [
|
|
108939
108939
|
factory.createPropertyAccessExpression(factory.createMetaProperty(100 /* SyntaxKind.ImportKeyword */, factory.createIdentifier("meta")), factory.createIdentifier("url"))
|
|
108940
108940
|
]))
|
|
108941
|
-
],
|
|
108941
|
+
],
|
|
108942
108942
|
/*flags*/ languageVersion >= 2 /* ScriptTarget.ES2015 */ ? 2 /* NodeFlags.Const */ : 0 /* NodeFlags.None */));
|
|
108943
108943
|
importRequireStatements = [importStatement, requireStatement];
|
|
108944
108944
|
}
|
|
@@ -108956,10 +108956,10 @@ var ts;
|
|
|
108956
108956
|
var statements;
|
|
108957
108957
|
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(
|
|
108958
108958
|
/*modifiers*/ undefined, factory.createVariableDeclarationList([
|
|
108959
|
-
factory.createVariableDeclaration(factory.cloneNode(node.name),
|
|
108960
|
-
/*exclamationToken*/ undefined,
|
|
108959
|
+
factory.createVariableDeclaration(factory.cloneNode(node.name),
|
|
108960
|
+
/*exclamationToken*/ undefined,
|
|
108961
108961
|
/*type*/ undefined, createRequireCall(node))
|
|
108962
|
-
],
|
|
108962
|
+
],
|
|
108963
108963
|
/*flags*/ languageVersion >= 2 /* ScriptTarget.ES2015 */ ? 2 /* NodeFlags.Const */ : 0 /* NodeFlags.None */)), node), node));
|
|
108964
108964
|
statements = appendExportsOfImportEqualsDeclaration(statements, node);
|
|
108965
108965
|
return ts.singleOrMany(statements);
|
|
@@ -108988,11 +108988,11 @@ var ts;
|
|
|
108988
108988
|
var synthName = factory.getGeneratedNameForNode(oldIdentifier);
|
|
108989
108989
|
var importDecl = factory.createImportDeclaration(
|
|
108990
108990
|
/*modifiers*/ undefined, factory.createImportClause(
|
|
108991
|
-
/*isTypeOnly*/ false,
|
|
108991
|
+
/*isTypeOnly*/ false,
|
|
108992
108992
|
/*name*/ undefined, factory.createNamespaceImport(synthName)), node.moduleSpecifier, node.assertClause);
|
|
108993
108993
|
ts.setOriginalNode(importDecl, node.exportClause);
|
|
108994
108994
|
var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(
|
|
108995
|
-
/*modifiers*/ undefined,
|
|
108995
|
+
/*modifiers*/ undefined,
|
|
108996
108996
|
/*isTypeOnly*/ false, factory.createNamedExports([factory.createExportSpecifier(/*isTypeOnly*/ false, synthName, oldIdentifier)]));
|
|
108997
108997
|
ts.setOriginalNode(exportDecl, node);
|
|
108998
108998
|
return [importDecl, exportDecl];
|
|
@@ -109899,7 +109899,7 @@ var ts;
|
|
|
109899
109899
|
recordTypeReferenceDirectivesIfNecessary([[specifier, /*mode*/ undefined]]);
|
|
109900
109900
|
return;
|
|
109901
109901
|
}
|
|
109902
|
-
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
|
|
109902
|
+
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
|
|
109903
109903
|
/*isAbsolutePathAnUrl*/ false);
|
|
109904
109904
|
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
|
|
109905
109905
|
fileName = fileName.substring(2);
|
|
@@ -109952,7 +109952,7 @@ var ts;
|
|
|
109952
109952
|
}
|
|
109953
109953
|
if (elem.propertyName && ts.isIdentifier(elem.propertyName) && ts.isIdentifier(elem.name) && !elem.symbol.isReferenced) {
|
|
109954
109954
|
// Unnecessary property renaming is forbidden in types, so remove renaming
|
|
109955
|
-
return factory.updateBindingElement(elem, elem.dotDotDotToken,
|
|
109955
|
+
return factory.updateBindingElement(elem, elem.dotDotDotToken,
|
|
109956
109956
|
/* propertyName */ undefined, elem.propertyName, shouldPrintWithInitializer(elem) ? elem.initializer : undefined);
|
|
109957
109957
|
}
|
|
109958
109958
|
return factory.updateBindingElement(elem, elem.dotDotDotToken, elem.propertyName, filterBindingPatternInitializersAndRenamings(elem.name), shouldPrintWithInitializer(elem) ? elem.initializer : undefined);
|
|
@@ -110101,7 +110101,7 @@ var ts;
|
|
|
110101
110101
|
}
|
|
110102
110102
|
if (!newValueParameter) {
|
|
110103
110103
|
newValueParameter = factory.createParameterDeclaration(
|
|
110104
|
-
/*modifiers*/ undefined,
|
|
110104
|
+
/*modifiers*/ undefined,
|
|
110105
110105
|
/*dotDotDotToken*/ undefined, "value");
|
|
110106
110106
|
}
|
|
110107
110107
|
newParams = ts.append(newParams, newValueParameter);
|
|
@@ -110177,7 +110177,7 @@ var ts;
|
|
|
110177
110177
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
110178
110178
|
if (!decl.importClause.namedBindings) {
|
|
110179
110179
|
// No named bindings (either namespace or list), meaning the import is just default or should be elided
|
|
110180
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding,
|
|
110180
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding,
|
|
110181
110181
|
/*namedBindings*/ undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
110182
110182
|
}
|
|
110183
110183
|
if (decl.importClause.namedBindings.kind === 268 /* SyntaxKind.NamespaceImport */) {
|
|
@@ -110192,7 +110192,7 @@ var ts;
|
|
|
110192
110192
|
}
|
|
110193
110193
|
// Augmentation of export depends on import
|
|
110194
110194
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
110195
|
-
return factory.updateImportDeclaration(decl, decl.modifiers,
|
|
110195
|
+
return factory.updateImportDeclaration(decl, decl.modifiers,
|
|
110196
110196
|
/*importClause*/ undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
110197
110197
|
}
|
|
110198
110198
|
// Nothing visible
|
|
@@ -110321,7 +110321,7 @@ var ts;
|
|
|
110321
110321
|
case 171 /* SyntaxKind.Constructor */: {
|
|
110322
110322
|
// A constructor declaration may not have a type annotation
|
|
110323
110323
|
var ctor = factory.createConstructorDeclaration(
|
|
110324
|
-
/*modifiers*/ ensureModifiers(input), updateParamsList(input, input.parameters, 0 /* ModifierFlags.None */),
|
|
110324
|
+
/*modifiers*/ ensureModifiers(input), updateParamsList(input, input.parameters, 0 /* ModifierFlags.None */),
|
|
110325
110325
|
/*body*/ undefined);
|
|
110326
110326
|
return cleanup(ctor);
|
|
110327
110327
|
}
|
|
@@ -110329,8 +110329,8 @@ var ts;
|
|
|
110329
110329
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
110330
110330
|
return cleanup(/*returnValue*/ undefined);
|
|
110331
110331
|
}
|
|
110332
|
-
var sig = factory.createMethodDeclaration(ensureModifiers(input),
|
|
110333
|
-
/*asteriskToken*/ undefined, input.name, input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
|
|
110332
|
+
var sig = factory.createMethodDeclaration(ensureModifiers(input),
|
|
110333
|
+
/*asteriskToken*/ undefined, input.name, input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
|
|
110334
110334
|
/*body*/ undefined);
|
|
110335
110335
|
return cleanup(sig);
|
|
110336
110336
|
}
|
|
@@ -110339,14 +110339,14 @@ var ts;
|
|
|
110339
110339
|
return cleanup(/*returnValue*/ undefined);
|
|
110340
110340
|
}
|
|
110341
110341
|
var accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input));
|
|
110342
|
-
return cleanup(factory.updateGetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8 /* ModifierFlags.Private */)), ensureType(input, accessorType),
|
|
110342
|
+
return cleanup(factory.updateGetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8 /* ModifierFlags.Private */)), ensureType(input, accessorType),
|
|
110343
110343
|
/*body*/ undefined));
|
|
110344
110344
|
}
|
|
110345
110345
|
case 173 /* SyntaxKind.SetAccessor */: {
|
|
110346
110346
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
110347
110347
|
return cleanup(/*returnValue*/ undefined);
|
|
110348
110348
|
}
|
|
110349
|
-
return cleanup(factory.updateSetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8 /* ModifierFlags.Private */)),
|
|
110349
|
+
return cleanup(factory.updateSetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8 /* ModifierFlags.Private */)),
|
|
110350
110350
|
/*body*/ undefined));
|
|
110351
110351
|
}
|
|
110352
110352
|
case 167 /* SyntaxKind.PropertyDeclaration */:
|
|
@@ -110532,8 +110532,8 @@ var ts;
|
|
|
110532
110532
|
}
|
|
110533
110533
|
case 256 /* SyntaxKind.FunctionDeclaration */: {
|
|
110534
110534
|
// Generators lose their generator-ness, excepting their return type
|
|
110535
|
-
var clean = cleanup(factory.updateFunctionDeclaration(input, ensureModifiers(input),
|
|
110536
|
-
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
|
|
110535
|
+
var clean = cleanup(factory.updateFunctionDeclaration(input, ensureModifiers(input),
|
|
110536
|
+
/*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type),
|
|
110537
110537
|
/*body*/ undefined));
|
|
110538
110538
|
if (clean && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {
|
|
110539
110539
|
var props = resolver.getPropertiesOfContainerFunction(input);
|
|
@@ -110564,7 +110564,7 @@ var ts;
|
|
|
110564
110564
|
}
|
|
110565
110565
|
else {
|
|
110566
110566
|
declarations.push(factory.createExportDeclaration(
|
|
110567
|
-
/*modifiers*/ undefined,
|
|
110567
|
+
/*modifiers*/ undefined,
|
|
110568
110568
|
/*isTypeOnly*/ false, factory.createNamedExports(ts.map(exportMappings_1, function (_a) {
|
|
110569
110569
|
var gen = _a[0], exp = _a[1];
|
|
110570
110570
|
return factory.createExportSpecifier(/*isTypeOnly*/ false, gen, exp);
|
|
@@ -110575,12 +110575,12 @@ var ts;
|
|
|
110575
110575
|
return [clean, namespaceDecl];
|
|
110576
110576
|
}
|
|
110577
110577
|
var modifiers = factory.createModifiersFromModifierFlags((ts.getEffectiveModifierFlags(clean) & ~513 /* ModifierFlags.ExportDefault */) | 2 /* ModifierFlags.Ambient */);
|
|
110578
|
-
var cleanDeclaration = factory.updateFunctionDeclaration(clean, modifiers,
|
|
110579
|
-
/*asteriskToken*/ undefined, clean.name, clean.typeParameters, clean.parameters, clean.type,
|
|
110578
|
+
var cleanDeclaration = factory.updateFunctionDeclaration(clean, modifiers,
|
|
110579
|
+
/*asteriskToken*/ undefined, clean.name, clean.typeParameters, clean.parameters, clean.type,
|
|
110580
110580
|
/*body*/ undefined);
|
|
110581
110581
|
var namespaceDeclaration = factory.updateModuleDeclaration(namespaceDecl, modifiers, namespaceDecl.name, namespaceDecl.body);
|
|
110582
110582
|
var exportDefaultDeclaration = factory.createExportAssignment(
|
|
110583
|
-
/*modifiers*/ undefined,
|
|
110583
|
+
/*modifiers*/ undefined,
|
|
110584
110584
|
/*isExportEquals*/ false, namespaceDecl.name);
|
|
110585
110585
|
if (ts.isSourceFile(input.parent)) {
|
|
110586
110586
|
resultHasExternalModuleIndicator = true;
|
|
@@ -110666,8 +110666,8 @@ var ts;
|
|
|
110666
110666
|
elems = ts.concatenate(elems, walkBindingPattern(elem.name));
|
|
110667
110667
|
}
|
|
110668
110668
|
elems = elems || [];
|
|
110669
|
-
elems.push(factory.createPropertyDeclaration(ensureModifiers(param), elem.name,
|
|
110670
|
-
/*questionToken*/ undefined, ensureType(elem, /*type*/ undefined),
|
|
110669
|
+
elems.push(factory.createPropertyDeclaration(ensureModifiers(param), elem.name,
|
|
110670
|
+
/*questionToken*/ undefined, ensureType(elem, /*type*/ undefined),
|
|
110671
110671
|
/*initializer*/ undefined));
|
|
110672
110672
|
}
|
|
110673
110673
|
return elems;
|
|
@@ -110680,9 +110680,9 @@ var ts;
|
|
|
110680
110680
|
// Prevents other classes with the same public members from being used in place of the current class
|
|
110681
110681
|
var privateIdentifier = hasPrivateIdentifier ? [
|
|
110682
110682
|
factory.createPropertyDeclaration(
|
|
110683
|
-
/*modifiers*/ undefined, factory.createPrivateIdentifier("#private"),
|
|
110684
|
-
/*questionToken*/ undefined,
|
|
110685
|
-
/*type*/ undefined,
|
|
110683
|
+
/*modifiers*/ undefined, factory.createPrivateIdentifier("#private"),
|
|
110684
|
+
/*questionToken*/ undefined,
|
|
110685
|
+
/*type*/ undefined,
|
|
110686
110686
|
/*initializer*/ undefined)
|
|
110687
110687
|
] : undefined;
|
|
110688
110688
|
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
|
|
@@ -112013,7 +112013,7 @@ var ts;
|
|
|
112013
112013
|
sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir);
|
|
112014
112014
|
return encodeURI(ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(filePath)), // get the relative sourceMapDir path based on jsFilePath
|
|
112015
112015
|
ts.combinePaths(sourceMapDir, sourceMapFile), // this is where user expects to see sourceMap
|
|
112016
|
-
host.getCurrentDirectory(), host.getCanonicalFileName,
|
|
112016
|
+
host.getCurrentDirectory(), host.getCanonicalFileName,
|
|
112017
112017
|
/*isAbsolutePathAnUrl*/ true));
|
|
112018
112018
|
}
|
|
112019
112019
|
else {
|
|
@@ -112147,7 +112147,7 @@ var ts;
|
|
|
112147
112147
|
if (declarationMapPath && ts.computeSignature(declarationMapText, createHash) !== buildInfo.bundle.dts.mapHash)
|
|
112148
112148
|
return declarationMapPath;
|
|
112149
112149
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
112150
|
-
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo,
|
|
112150
|
+
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo,
|
|
112151
112151
|
/*onlyOwnText*/ true);
|
|
112152
112152
|
var outputFiles = [];
|
|
112153
112153
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
@@ -112220,7 +112220,7 @@ var ts;
|
|
|
112220
112220
|
getFileIncludeReasons: ts.notImplemented,
|
|
112221
112221
|
createHash: createHash,
|
|
112222
112222
|
};
|
|
112223
|
-
emitFiles(ts.notImplementedResolver, emitHost,
|
|
112223
|
+
emitFiles(ts.notImplementedResolver, emitHost,
|
|
112224
112224
|
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
|
|
112225
112225
|
return outputFiles;
|
|
112226
112226
|
}
|
|
@@ -115240,8 +115240,8 @@ var ts;
|
|
|
115240
115240
|
textRange.pos = modifiers.pos;
|
|
115241
115241
|
if (pos === modifiers.length - 1)
|
|
115242
115242
|
textRange.end = modifiers.end;
|
|
115243
|
-
emitNodeListItems(emit, node, modifiers, lastMode === "modifiers" ? 2359808 /* ListFormat.Modifiers */ : 2146305 /* ListFormat.Decorators */,
|
|
115244
|
-
/*parenthesizerRule*/ undefined, start, pos - start,
|
|
115243
|
+
emitNodeListItems(emit, node, modifiers, lastMode === "modifiers" ? 2359808 /* ListFormat.Modifiers */ : 2146305 /* ListFormat.Decorators */,
|
|
115244
|
+
/*parenthesizerRule*/ undefined, start, pos - start,
|
|
115245
115245
|
/*hasTrailingComma*/ false, textRange);
|
|
115246
115246
|
start = pos;
|
|
115247
115247
|
lastMode = mode;
|
|
@@ -116638,7 +116638,7 @@ var ts;
|
|
|
116638
116638
|
return;
|
|
116639
116639
|
}
|
|
116640
116640
|
var _a = ts.getLineAndCharacterOfPosition(sourceMapSource, pos), sourceLine = _a.line, sourceCharacter = _a.character;
|
|
116641
|
-
sourceMapGenerator.addMapping(writer.getLine(), writer.getColumn(), sourceMapSourceIndex, sourceLine, sourceCharacter,
|
|
116641
|
+
sourceMapGenerator.addMapping(writer.getLine(), writer.getColumn(), sourceMapSourceIndex, sourceLine, sourceCharacter,
|
|
116642
116642
|
/*nameIndex*/ undefined);
|
|
116643
116643
|
}
|
|
116644
116644
|
function emitSourcePos(source, pos) {
|
|
@@ -118995,10 +118995,10 @@ var ts;
|
|
|
118995
118995
|
ts.Debug.assert(!ts.outFile(options));
|
|
118996
118996
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit" /* tracing.Phase.Emit */, "emitBuildInfo", {}, /*separateBeginAndEnd*/ true);
|
|
118997
118997
|
ts.performance.mark("beforeEmit");
|
|
118998
|
-
var emitResult = ts.emitFiles(ts.notImplementedResolver, getEmitHost(writeFileCallback),
|
|
118999
|
-
/*targetSourceFile*/ undefined,
|
|
119000
|
-
/*transformers*/ ts.noTransformers,
|
|
119001
|
-
/*emitOnlyDtsFiles*/ false,
|
|
118998
|
+
var emitResult = ts.emitFiles(ts.notImplementedResolver, getEmitHost(writeFileCallback),
|
|
118999
|
+
/*targetSourceFile*/ undefined,
|
|
119000
|
+
/*transformers*/ ts.noTransformers,
|
|
119001
|
+
/*emitOnlyDtsFiles*/ false,
|
|
119002
119002
|
/*onlyBuildInfo*/ true);
|
|
119003
119003
|
ts.performance.mark("afterEmit");
|
|
119004
119004
|
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
|
|
@@ -119069,7 +119069,7 @@ var ts;
|
|
|
119069
119069
|
// checked is to not pass the file to getEmitResolver.
|
|
119070
119070
|
var emitResolver = getTypeChecker().getEmitResolver(ts.outFile(options) ? undefined : sourceFile, cancellationToken);
|
|
119071
119071
|
ts.performance.mark("beforeEmit");
|
|
119072
|
-
var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, ts.getTransformers(options, customTransformers, emitOnlyDtsFiles), emitOnlyDtsFiles,
|
|
119072
|
+
var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile, ts.getTransformers(options, customTransformers, emitOnlyDtsFiles), emitOnlyDtsFiles,
|
|
119073
119073
|
/*onlyBuildInfo*/ false, forceDtsEmit);
|
|
119074
119074
|
ts.performance.mark("afterEmit");
|
|
119075
119075
|
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
|
|
@@ -119989,8 +119989,8 @@ var ts;
|
|
|
119989
119989
|
}
|
|
119990
119990
|
function processReferencedFiles(file, isDefaultLib) {
|
|
119991
119991
|
ts.forEach(file.referencedFiles, function (ref, index) {
|
|
119992
|
-
processSourceFile(resolveTripleslashReference(ref.fileName, file.fileName), isDefaultLib,
|
|
119993
|
-
/*ignoreNoDefaultLib*/ false,
|
|
119992
|
+
processSourceFile(resolveTripleslashReference(ref.fileName, file.fileName), isDefaultLib,
|
|
119993
|
+
/*ignoreNoDefaultLib*/ false,
|
|
119994
119994
|
/*packageId*/ undefined, { kind: ts.FileIncludeKind.ReferenceFile, file: file.path, index: index, });
|
|
119995
119995
|
});
|
|
119996
119996
|
}
|
|
@@ -120145,8 +120145,8 @@ var ts;
|
|
|
120145
120145
|
modulesWithElidedImports.set(file.path, true);
|
|
120146
120146
|
}
|
|
120147
120147
|
else if (shouldAddFile) {
|
|
120148
|
-
findSourceFile(resolvedFileName,
|
|
120149
|
-
/*isDefaultLib*/ false,
|
|
120148
|
+
findSourceFile(resolvedFileName,
|
|
120149
|
+
/*isDefaultLib*/ false,
|
|
120150
120150
|
/*ignoreNoDefaultLib*/ false, { kind: ts.FileIncludeKind.Import, file: file.path, index: index, }, resolution.packageId);
|
|
120151
120151
|
}
|
|
120152
120152
|
if (isFromNodeModulesSearch) {
|
|
@@ -121361,9 +121361,9 @@ var ts;
|
|
|
121361
121361
|
if (latestSignature !== prevSignature) {
|
|
121362
121362
|
updateExportedModules(state, sourceFile, sourceFiles[0].exportedModulesFromDeclarationEmit);
|
|
121363
121363
|
}
|
|
121364
|
-
}, cancellationToken,
|
|
121365
|
-
/*emitOnlyDtsFiles*/ true,
|
|
121366
|
-
/*customTransformers*/ undefined,
|
|
121364
|
+
}, cancellationToken,
|
|
121365
|
+
/*emitOnlyDtsFiles*/ true,
|
|
121366
|
+
/*customTransformers*/ undefined,
|
|
121367
121367
|
/*forceDtsEmit*/ true);
|
|
121368
121368
|
}
|
|
121369
121369
|
// Default is to use file version as signature
|
|
@@ -122392,11 +122392,11 @@ var ts;
|
|
|
122392
122392
|
return undefined;
|
|
122393
122393
|
}
|
|
122394
122394
|
var affected_1 = ts.Debug.checkDefined(state.program);
|
|
122395
|
-
return toAffectedFileEmitResult(state,
|
|
122395
|
+
return toAffectedFileEmitResult(state,
|
|
122396
122396
|
// When whole program is affected, do emit only once (eg when --out or --outFile is specified)
|
|
122397
122397
|
// Otherwise just affected file
|
|
122398
|
-
affected_1.emitBuildInfo(writeFile || ts.maybeBind(host, host.writeFile), cancellationToken), affected_1, 1 /* BuilderFileEmit.Full */,
|
|
122399
|
-
/*isPendingEmitFile*/ false,
|
|
122398
|
+
affected_1.emitBuildInfo(writeFile || ts.maybeBind(host, host.writeFile), cancellationToken), affected_1, 1 /* BuilderFileEmit.Full */,
|
|
122399
|
+
/*isPendingEmitFile*/ false,
|
|
122400
122400
|
/*isBuildInfoEmit*/ true);
|
|
122401
122401
|
}
|
|
122402
122402
|
(affected = pendingAffectedFile.affectedFile, emitKind = pendingAffectedFile.emitKind);
|
|
@@ -122409,7 +122409,7 @@ var ts;
|
|
|
122409
122409
|
affected = program;
|
|
122410
122410
|
}
|
|
122411
122411
|
}
|
|
122412
|
-
return toAffectedFileEmitResult(state,
|
|
122412
|
+
return toAffectedFileEmitResult(state,
|
|
122413
122413
|
// When whole program is affected, do emit only once (eg when --out or --outFile is specified)
|
|
122414
122414
|
// Otherwise just affected file
|
|
122415
122415
|
ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
@@ -122865,11 +122865,11 @@ var ts;
|
|
|
122865
122865
|
var resolvedModuleNames = new ts.Map();
|
|
122866
122866
|
var perDirectoryResolvedModuleNames = ts.createCacheWithRedirects();
|
|
122867
122867
|
var nonRelativeModuleNameCache = ts.createCacheWithRedirects();
|
|
122868
|
-
var moduleResolutionCache = ts.createModuleResolutionCache(getCurrentDirectory(), resolutionHost.getCanonicalFileName,
|
|
122868
|
+
var moduleResolutionCache = ts.createModuleResolutionCache(getCurrentDirectory(), resolutionHost.getCanonicalFileName,
|
|
122869
122869
|
/*options*/ undefined, perDirectoryResolvedModuleNames, nonRelativeModuleNameCache);
|
|
122870
122870
|
var resolvedTypeReferenceDirectives = new ts.Map();
|
|
122871
122871
|
var perDirectoryResolvedTypeReferenceDirectives = ts.createCacheWithRedirects();
|
|
122872
|
-
var typeReferenceDirectiveResolutionCache = ts.createTypeReferenceDirectiveResolutionCache(getCurrentDirectory(), resolutionHost.getCanonicalFileName,
|
|
122872
|
+
var typeReferenceDirectiveResolutionCache = ts.createTypeReferenceDirectiveResolutionCache(getCurrentDirectory(), resolutionHost.getCanonicalFileName,
|
|
122873
122873
|
/*options*/ undefined, moduleResolutionCache.getPackageJsonInfoCache(), perDirectoryResolvedTypeReferenceDirectives);
|
|
122874
122874
|
/**
|
|
122875
122875
|
* These are the extensions that failed lookup files will have by default,
|
|
@@ -124068,7 +124068,7 @@ var ts;
|
|
|
124068
124068
|
var getCanonicalFileName = ts.hostGetCanonicalFileName(host);
|
|
124069
124069
|
var allFileNames = new ts.Map();
|
|
124070
124070
|
var importedFileFromNodeModules = false;
|
|
124071
|
-
forEachFileNameOfModule(importingFileName, importedFileName, host,
|
|
124071
|
+
forEachFileNameOfModule(importingFileName, importedFileName, host,
|
|
124072
124072
|
/*preferSymlinks*/ true, function (path, isRedirect) {
|
|
124073
124073
|
var isInNodeModules = ts.pathContainsNodeModules(path);
|
|
124074
124074
|
allFileNames.set(path, { path: getCanonicalFileName(path), isRedirect: isRedirect, isInNodeModules: isInNodeModules });
|
|
@@ -125327,7 +125327,7 @@ var ts;
|
|
|
125327
125327
|
// Cache for the module resolution
|
|
125328
125328
|
var resolutionCache = ts.createResolutionCache(compilerHost, configFileName ?
|
|
125329
125329
|
ts.getDirectoryPath(ts.getNormalizedAbsolutePath(configFileName, currentDirectory)) :
|
|
125330
|
-
currentDirectory,
|
|
125330
|
+
currentDirectory,
|
|
125331
125331
|
/*logChangesWhenResolvingModule*/ false);
|
|
125332
125332
|
// Resolve module using host module resolution strategy if provided otherwise use resolution cache to resolve module names
|
|
125333
125333
|
compilerHost.resolveModuleNames = host.resolveModuleNames ?
|
|
@@ -125719,7 +125719,7 @@ var ts;
|
|
|
125719
125719
|
// Ignore the file absent errors
|
|
125720
125720
|
var onUnRecoverableConfigFileDiagnostic = parseConfigFileHost.onUnRecoverableConfigFileDiagnostic;
|
|
125721
125721
|
parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
|
|
125722
|
-
var parsedCommandLine = ts.getParsedCommandLineOfConfigFile(configFileName,
|
|
125722
|
+
var parsedCommandLine = ts.getParsedCommandLineOfConfigFile(configFileName,
|
|
125723
125723
|
/*optionsToExtend*/ undefined, parseConfigFileHost, extendedConfigCache || (extendedConfigCache = new ts.Map()), watchOptionsToExtend);
|
|
125724
125724
|
parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = onUnRecoverableConfigFileDiagnostic;
|
|
125725
125725
|
return parsedCommandLine;
|
|
@@ -126520,9 +126520,9 @@ var ts;
|
|
|
126520
126520
|
var declDiagnostics;
|
|
126521
126521
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
126522
126522
|
var outputFiles = [];
|
|
126523
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
|
|
126524
|
-
/*write*/ undefined,
|
|
126525
|
-
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark, buildInfo: data === null || data === void 0 ? void 0 : data.buildInfo }); }, cancellationToken,
|
|
126523
|
+
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
|
|
126524
|
+
/*write*/ undefined,
|
|
126525
|
+
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark, buildInfo: data === null || data === void 0 ? void 0 : data.buildInfo }); }, cancellationToken,
|
|
126526
126526
|
/*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
126527
126527
|
// Don't emit .d.ts if there are decl file errors
|
|
126528
126528
|
if (declDiagnostics) {
|
|
@@ -129688,7 +129688,7 @@ var ts;
|
|
|
129688
129688
|
return n;
|
|
129689
129689
|
}
|
|
129690
129690
|
return ts.firstDefined(n.getChildren(sourceFile), function (child) {
|
|
129691
|
-
var shouldDiveInChildNode =
|
|
129691
|
+
var shouldDiveInChildNode =
|
|
129692
129692
|
// previous token is enclosed somewhere in the child
|
|
129693
129693
|
(child.pos <= previousToken.pos && child.end > previousToken.end) ||
|
|
129694
129694
|
// previous token ends exactly at the beginning of child
|
|
@@ -130333,7 +130333,7 @@ var ts;
|
|
|
130333
130333
|
return ts.factory.createImportDeclaration(
|
|
130334
130334
|
/*modifiers*/ undefined, defaultImport || namedImports
|
|
130335
130335
|
? ts.factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? ts.factory.createNamedImports(namedImports) : undefined)
|
|
130336
|
-
: undefined, typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,
|
|
130336
|
+
: undefined, typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,
|
|
130337
130337
|
/*assertClause*/ undefined);
|
|
130338
130338
|
}
|
|
130339
130339
|
ts.makeImport = makeImport;
|
|
@@ -131967,7 +131967,7 @@ var ts;
|
|
|
131967
131967
|
}
|
|
131968
131968
|
var getCanonicalFileName = ts.hostGetCanonicalFileName(moduleSpecifierResolutionHost);
|
|
131969
131969
|
var globalTypingsCache = (_a = moduleSpecifierResolutionHost.getGlobalTypingsCacheLocation) === null || _a === void 0 ? void 0 : _a.call(moduleSpecifierResolutionHost);
|
|
131970
|
-
var hasImportablePath = !!ts.moduleSpecifiers.forEachFileNameOfModule(from.fileName, to.fileName, moduleSpecifierResolutionHost,
|
|
131970
|
+
var hasImportablePath = !!ts.moduleSpecifiers.forEachFileNameOfModule(from.fileName, to.fileName, moduleSpecifierResolutionHost,
|
|
131971
131971
|
/*preferSymlinks*/ false, function (toPath) {
|
|
131972
131972
|
var toFile = program.getSourceFile(toPath);
|
|
131973
131973
|
// Determine to import using toPath only if toPath is what we were looking at
|
|
@@ -133433,7 +133433,7 @@ var ts;
|
|
|
133433
133433
|
return convertPathCompletions(completion.paths);
|
|
133434
133434
|
case 1 /* StringLiteralCompletionKind.Properties */: {
|
|
133435
133435
|
var entries = ts.createSortedArray();
|
|
133436
|
-
Completions.getCompletionEntriesFromSymbols(completion.symbols, entries, contextToken, contextToken, sourceFile, sourceFile, host, program, 99 /* ScriptTarget.ESNext */, log, 4 /* CompletionKind.String */, preferences, options,
|
|
133436
|
+
Completions.getCompletionEntriesFromSymbols(completion.symbols, entries, contextToken, contextToken, sourceFile, sourceFile, host, program, 99 /* ScriptTarget.ESNext */, log, 4 /* CompletionKind.String */, preferences, options,
|
|
133437
133437
|
/*formatContext*/ undefined); // Target will not be used, so arbitrary
|
|
133438
133438
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan: optionalReplacementSpan, entries: entries };
|
|
133439
133439
|
}
|
|
@@ -134470,7 +134470,7 @@ var ts;
|
|
|
134470
134470
|
return undefined;
|
|
134471
134471
|
var lowerCaseTokenText = location.text.toLowerCase();
|
|
134472
134472
|
var exportMap = ts.getExportInfoMap(file, host, program, preferences, cancellationToken);
|
|
134473
|
-
var newEntries = resolvingModuleSpecifiers("continuePreviousIncompleteResponse", host, ts.codefix.createImportSpecifierResolver(file, program, host, preferences), program, location.getStart(), preferences,
|
|
134473
|
+
var newEntries = resolvingModuleSpecifiers("continuePreviousIncompleteResponse", host, ts.codefix.createImportSpecifierResolver(file, program, host, preferences), program, location.getStart(), preferences,
|
|
134474
134474
|
/*isForImportStatementCompletion*/ false, ts.isValidTypeOnlyAliasUseSite(location), function (context) {
|
|
134475
134475
|
var entries = ts.mapDefined(previousResponse.entries, function (entry) {
|
|
134476
134476
|
var _a;
|
|
@@ -134558,7 +134558,7 @@ var ts;
|
|
|
134558
134558
|
if (isChecked && !isNewIdentifierLocation && (!symbols || symbols.length === 0) && keywordFilters === 0 /* KeywordCompletionFilters.None */) {
|
|
134559
134559
|
return undefined;
|
|
134560
134560
|
}
|
|
134561
|
-
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
134561
|
+
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
134562
134562
|
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
134563
134563
|
if (keywordFilters !== 0 /* KeywordCompletionFilters.None */) {
|
|
134564
134564
|
for (var _i = 0, _a = getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && ts.isSourceFileJS(sourceFile)); _i < _a.length; _i++) {
|
|
@@ -134893,7 +134893,7 @@ var ts;
|
|
|
134893
134893
|
var _a = getPresentModifiers(contextToken), presentModifiers = _a.modifiers, modifiersSpan = _a.span;
|
|
134894
134894
|
var isAbstract = !!(presentModifiers & 128 /* ModifierFlags.Abstract */);
|
|
134895
134895
|
var completionNodes = [];
|
|
134896
|
-
ts.codefix.addNewNodeForMemberSymbol(symbol, classLikeDeclaration, sourceFile, { program: program, host: host }, preferences, importAdder,
|
|
134896
|
+
ts.codefix.addNewNodeForMemberSymbol(symbol, classLikeDeclaration, sourceFile, { program: program, host: host }, preferences, importAdder,
|
|
134897
134897
|
// `addNewNodeForMemberSymbol` calls this callback function for each new member node
|
|
134898
134898
|
// it adds for the given member symbol.
|
|
134899
134899
|
// We store these member nodes in the `completionNodes` array.
|
|
@@ -135009,7 +135009,7 @@ var ts;
|
|
|
135009
135009
|
// The `labelDetails.detail` will be displayed right beside the method name,
|
|
135010
135010
|
// so we drop the name (and modifiers) from the signature.
|
|
135011
135011
|
var methodSignature = ts.factory.createMethodSignature(
|
|
135012
|
-
/*modifiers*/ undefined,
|
|
135012
|
+
/*modifiers*/ undefined,
|
|
135013
135013
|
/*name*/ "", method.questionToken, method.typeParameters, method.parameters, method.type);
|
|
135014
135014
|
var labelDetails = { detail: signaturePrinter.printNode(4 /* EmitHint.Unspecified */, methodSignature, sourceFile) };
|
|
135015
135015
|
return { isSnippet: isSnippet, insertText: insertText, labelDetails: labelDetails };
|
|
@@ -135064,14 +135064,14 @@ var ts;
|
|
|
135064
135064
|
}
|
|
135065
135065
|
var parameters = typeNode.parameters.map(function (typedParam) {
|
|
135066
135066
|
return ts.factory.createParameterDeclaration(
|
|
135067
|
-
/*modifiers*/ undefined, typedParam.dotDotDotToken, typedParam.name, typedParam.questionToken,
|
|
135067
|
+
/*modifiers*/ undefined, typedParam.dotDotDotToken, typedParam.name, typedParam.questionToken,
|
|
135068
135068
|
/*type*/ undefined, typedParam.initializer);
|
|
135069
135069
|
});
|
|
135070
135070
|
return ts.factory.createMethodDeclaration(
|
|
135071
|
-
/*modifiers*/ undefined,
|
|
135072
|
-
/*asteriskToken*/ undefined, name,
|
|
135073
|
-
/*questionToken*/ undefined,
|
|
135074
|
-
/*typeParameters*/ undefined, parameters,
|
|
135071
|
+
/*modifiers*/ undefined,
|
|
135072
|
+
/*asteriskToken*/ undefined, name,
|
|
135073
|
+
/*questionToken*/ undefined,
|
|
135074
|
+
/*typeParameters*/ undefined, parameters,
|
|
135075
135075
|
/*type*/ undefined, body);
|
|
135076
135076
|
}
|
|
135077
135077
|
default:
|
|
@@ -135124,8 +135124,8 @@ var ts;
|
|
|
135124
135124
|
var formatOptions = ts.getFormatCodeSettingsForWriting(formatContext, sourceFile);
|
|
135125
135125
|
var changes = ts.flatMap(list, function (node) {
|
|
135126
135126
|
var nodeWithPos = ts.textChanges.assignPositionsToNode(node);
|
|
135127
|
-
return ts.formatting.formatNodeGivenIndentation(nodeWithPos, syntheticFile, sourceFile.languageVariant,
|
|
135128
|
-
/* indentation */ 0,
|
|
135127
|
+
return ts.formatting.formatNodeGivenIndentation(nodeWithPos, syntheticFile, sourceFile.languageVariant,
|
|
135128
|
+
/* indentation */ 0,
|
|
135129
135129
|
/* delta */ 0, __assign(__assign({}, formatContext), { options: formatOptions }));
|
|
135130
135130
|
});
|
|
135131
135131
|
var allChanges = escapes
|
|
@@ -136284,7 +136284,7 @@ var ts;
|
|
|
136284
136284
|
var packageJsonAutoImportProvider = (_b = host.getPackageJsonAutoImportProvider) === null || _b === void 0 ? void 0 : _b.call(host);
|
|
136285
136285
|
var packageJsonFilter = detailsEntryId ? undefined : ts.createPackageJsonImportFilter(sourceFile, preferences, host);
|
|
136286
136286
|
resolvingModuleSpecifiers("collectAutoImports", host, importSpecifierResolver || (importSpecifierResolver = ts.codefix.createImportSpecifierResolver(sourceFile, program, host, preferences)), program, position, preferences, !!importCompletionNode, ts.isValidTypeOnlyAliasUseSite(location), function (context) {
|
|
136287
|
-
exportInfo.search(sourceFile.path,
|
|
136287
|
+
exportInfo.search(sourceFile.path,
|
|
136288
136288
|
/*preferCapitalized*/ isRightOfOpenTag, function (symbolName, targetFlags) {
|
|
136289
136289
|
if (!ts.isIdentifierText(symbolName, ts.getEmitScriptTarget(host.getCompilationSettings())))
|
|
136290
136290
|
return false;
|
|
@@ -136384,8 +136384,8 @@ var ts;
|
|
|
136384
136384
|
if (!isObjectLiteralMethodSymbol(member)) {
|
|
136385
136385
|
return;
|
|
136386
136386
|
}
|
|
136387
|
-
var displayName = getCompletionEntryDisplayNameForSymbol(member, ts.getEmitScriptTarget(compilerOptions),
|
|
136388
|
-
/*origin*/ undefined, 0 /* CompletionKind.ObjectPropertyDeclaration */,
|
|
136387
|
+
var displayName = getCompletionEntryDisplayNameForSymbol(member, ts.getEmitScriptTarget(compilerOptions),
|
|
136388
|
+
/*origin*/ undefined, 0 /* CompletionKind.ObjectPropertyDeclaration */,
|
|
136389
136389
|
/*jsxIdentifierExpected*/ false);
|
|
136390
136390
|
if (!displayName) {
|
|
136391
136391
|
return;
|
|
@@ -137112,7 +137112,7 @@ var ts;
|
|
|
137112
137112
|
var symbolId = ts.getSymbolId(symbol);
|
|
137113
137113
|
var origin = symbolToOriginInfoMap === null || symbolToOriginInfoMap === void 0 ? void 0 : symbolToOriginInfoMap[i];
|
|
137114
137114
|
var target = ts.getEmitScriptTarget(compilerOptions);
|
|
137115
|
-
var displayName = getCompletionEntryDisplayNameForSymbol(symbol, target, origin, 0 /* CompletionKind.ObjectPropertyDeclaration */,
|
|
137115
|
+
var displayName = getCompletionEntryDisplayNameForSymbol(symbol, target, origin, 0 /* CompletionKind.ObjectPropertyDeclaration */,
|
|
137116
137116
|
/*jsxIdentifierExpected*/ false);
|
|
137117
137117
|
if (displayName) {
|
|
137118
137118
|
var originalSortText = (_a = symbolToSortTextMap[symbolId]) !== null && _a !== void 0 ? _a : Completions.SortText.LocationPriority;
|
|
@@ -140945,7 +140945,7 @@ var ts;
|
|
|
140945
140945
|
}
|
|
140946
140946
|
}
|
|
140947
140947
|
result.push(base || root || sym);
|
|
140948
|
-
},
|
|
140948
|
+
},
|
|
140949
140949
|
// when try to find implementation, implementations is true, and not allowed to find base class
|
|
140950
140950
|
/*allowBaseTypes*/ function () { return !implementations; });
|
|
140951
140951
|
return result;
|
|
@@ -140953,7 +140953,7 @@ var ts;
|
|
|
140953
140953
|
/**
|
|
140954
140954
|
* @param allowBaseTypes return true means it would try to find in base class or interface.
|
|
140955
140955
|
*/
|
|
140956
|
-
function forEachRelatedSymbol(symbol, location, checker, isForRenamePopulateSearchSymbolSet, onlyIncludeBindingElementAtReferenceLocation,
|
|
140956
|
+
function forEachRelatedSymbol(symbol, location, checker, isForRenamePopulateSearchSymbolSet, onlyIncludeBindingElementAtReferenceLocation,
|
|
140957
140957
|
/**
|
|
140958
140958
|
* @param baseSymbol This symbol means one property/mehtod from base class or interface when it is not null or undefined,
|
|
140959
140959
|
*/
|
|
@@ -141095,7 +141095,7 @@ var ts;
|
|
|
141095
141095
|
}
|
|
141096
141096
|
function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) {
|
|
141097
141097
|
var checker = state.checker;
|
|
141098
|
-
return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false,
|
|
141098
|
+
return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false,
|
|
141099
141099
|
/*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== 2 /* FindReferencesUse.Rename */ || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) {
|
|
141100
141100
|
// check whether the symbol used to search itself is just the searched one.
|
|
141101
141101
|
if (baseSymbol) {
|
|
@@ -141108,7 +141108,7 @@ var ts;
|
|
|
141108
141108
|
// For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol.
|
|
141109
141109
|
? { symbol: rootSymbol && !(ts.getCheckFlags(sym) & 6 /* CheckFlags.Synthetic */) ? rootSymbol : sym, kind: kind }
|
|
141110
141110
|
: undefined;
|
|
141111
|
-
},
|
|
141111
|
+
},
|
|
141112
141112
|
/*allowBaseTypes*/ function (rootSymbol) {
|
|
141113
141113
|
return !(search.parents && !search.parents.some(function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, state.inheritsFromCache, checker); }));
|
|
141114
141114
|
});
|
|
@@ -143489,8 +143489,8 @@ var ts;
|
|
|
143489
143489
|
}
|
|
143490
143490
|
}
|
|
143491
143491
|
lastANode = a.node = ts.setTextRange(ts.factory.createClassDeclaration(
|
|
143492
|
-
/* modifiers */ undefined, a.name || ts.factory.createIdentifier("__class__"),
|
|
143493
|
-
/* typeParameters */ undefined,
|
|
143492
|
+
/* modifiers */ undefined, a.name || ts.factory.createIdentifier("__class__"),
|
|
143493
|
+
/* typeParameters */ undefined,
|
|
143494
143494
|
/* heritageClauses */ undefined, []), a.node);
|
|
143495
143495
|
}
|
|
143496
143496
|
else {
|
|
@@ -143513,8 +143513,8 @@ var ts;
|
|
|
143513
143513
|
if (!a.additionalNodes)
|
|
143514
143514
|
a.additionalNodes = [];
|
|
143515
143515
|
a.additionalNodes.push(ts.setTextRange(ts.factory.createClassDeclaration(
|
|
143516
|
-
/* modifiers */ undefined, a.name || ts.factory.createIdentifier("__class__"),
|
|
143517
|
-
/* typeParameters */ undefined,
|
|
143516
|
+
/* modifiers */ undefined, a.name || ts.factory.createIdentifier("__class__"),
|
|
143517
|
+
/* typeParameters */ undefined,
|
|
143518
143518
|
/* heritageClauses */ undefined, []), b.node));
|
|
143519
143519
|
}
|
|
143520
143520
|
return true;
|
|
@@ -144021,8 +144021,8 @@ var ts;
|
|
|
144021
144021
|
else if (hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier)) {
|
|
144022
144022
|
// If we’re in a declaration file, it’s safe to remove the import clause from it
|
|
144023
144023
|
if (sourceFile.isDeclarationFile) {
|
|
144024
|
-
usedImports.push(ts.factory.createImportDeclaration(importDecl.modifiers,
|
|
144025
|
-
/*importClause*/ undefined, moduleSpecifier,
|
|
144024
|
+
usedImports.push(ts.factory.createImportDeclaration(importDecl.modifiers,
|
|
144025
|
+
/*importClause*/ undefined, moduleSpecifier,
|
|
144026
144026
|
/*assertClause*/ undefined));
|
|
144027
144027
|
}
|
|
144028
144028
|
// If we’re not in a declaration file, we can’t remove the import clause even though
|
|
@@ -146115,7 +146115,7 @@ var ts;
|
|
|
146115
146115
|
var type = declaration.symbol && typeChecker.getTypeOfSymbolAtLocation(declaration.symbol, declaration);
|
|
146116
146116
|
var callSignatures = type && type.getCallSignatures();
|
|
146117
146117
|
if (callSignatures && callSignatures.length) {
|
|
146118
|
-
return typeChecker.runWithCancellationToken(cancellationToken, function (typeChecker) { return createSignatureHelpItems(callSignatures, callSignatures[0], argumentInfo, sourceFile, typeChecker,
|
|
146118
|
+
return typeChecker.runWithCancellationToken(cancellationToken, function (typeChecker) { return createSignatureHelpItems(callSignatures, callSignatures[0], argumentInfo, sourceFile, typeChecker,
|
|
146119
146119
|
/*useFullPrefix*/ true); });
|
|
146120
146120
|
}
|
|
146121
146121
|
});
|
|
@@ -149639,7 +149639,7 @@ var ts;
|
|
|
149639
149639
|
// edit in the middle of a token where the range ended, so if we have a non-contiguous
|
|
149640
149640
|
// pair here, we're already done and we can ignore it.
|
|
149641
149641
|
var parent = ((_b = ts.findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) === null || _b === void 0 ? void 0 : _b.parent) || previousParent;
|
|
149642
|
-
processPair(tokenInfo, sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, parent, previousRange, previousRangeStartLine, previousParent, parent,
|
|
149642
|
+
processPair(tokenInfo, sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, parent, previousRange, previousRangeStartLine, previousParent, parent,
|
|
149643
149643
|
/*dynamicIndentation*/ undefined);
|
|
149644
149644
|
}
|
|
149645
149645
|
}
|
|
@@ -150078,7 +150078,7 @@ var ts;
|
|
|
150078
150078
|
var lineAction = 0 /* LineAction.None */;
|
|
150079
150079
|
if (rules) {
|
|
150080
150080
|
// Apply rules in reverse order so that higher priority rules (which are first in the array)
|
|
150081
|
-
// win
|
|
150081
|
+
// win a conflict with lower priority rules.
|
|
150082
150082
|
ts.forEachRight(rules, function (rule) {
|
|
150083
150083
|
lineAction = applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine);
|
|
150084
150084
|
if (dynamicIndentation) {
|
|
@@ -152679,8 +152679,8 @@ var ts;
|
|
|
152679
152679
|
var sourceFile = context.sourceFile;
|
|
152680
152680
|
var changes = ts.textChanges.ChangeTracker.with(context, function (changes) {
|
|
152681
152681
|
var exportDeclaration = ts.factory.createExportDeclaration(
|
|
152682
|
-
/*modifiers*/ undefined,
|
|
152683
|
-
/*isTypeOnly*/ false, ts.factory.createNamedExports([]),
|
|
152682
|
+
/*modifiers*/ undefined,
|
|
152683
|
+
/*isTypeOnly*/ false, ts.factory.createNamedExports([]),
|
|
152684
152684
|
/*moduleSpecifier*/ undefined);
|
|
152685
152685
|
changes.insertNodeAtEndOfScope(sourceFile, sourceFile, exportDeclaration);
|
|
152686
152686
|
});
|
|
@@ -153468,9 +153468,9 @@ var ts;
|
|
|
153468
153468
|
}
|
|
153469
153469
|
function transformJSDocIndexSignature(node) {
|
|
153470
153470
|
var index = ts.factory.createParameterDeclaration(
|
|
153471
|
-
/*modifiers*/ undefined,
|
|
153472
|
-
/*dotDotDotToken*/ undefined, node.typeArguments[0].kind === 147 /* SyntaxKind.NumberKeyword */ ? "n" : "s",
|
|
153473
|
-
/*questionToken*/ undefined, ts.factory.createTypeReferenceNode(node.typeArguments[0].kind === 147 /* SyntaxKind.NumberKeyword */ ? "number" : "string", []),
|
|
153471
|
+
/*modifiers*/ undefined,
|
|
153472
|
+
/*dotDotDotToken*/ undefined, node.typeArguments[0].kind === 147 /* SyntaxKind.NumberKeyword */ ? "n" : "s",
|
|
153473
|
+
/*questionToken*/ undefined, ts.factory.createTypeReferenceNode(node.typeArguments[0].kind === 147 /* SyntaxKind.NumberKeyword */ ? "number" : "string", []),
|
|
153474
153474
|
/*initializer*/ undefined);
|
|
153475
153475
|
var indexSignature = ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(/*modifiers*/ undefined, [index], node.typeArguments[1])]);
|
|
153476
153476
|
ts.setEmitFlags(indexSignature, 1 /* EmitFlags.SingleLine */);
|
|
@@ -153614,7 +153614,7 @@ var ts;
|
|
|
153614
153614
|
? assignmentBinaryExpression.parent : assignmentBinaryExpression;
|
|
153615
153615
|
changes.delete(sourceFile, nodeToDelete);
|
|
153616
153616
|
if (!assignmentExpr) {
|
|
153617
|
-
members.push(ts.factory.createPropertyDeclaration(modifiers, symbol.name, /*questionToken*/ undefined,
|
|
153617
|
+
members.push(ts.factory.createPropertyDeclaration(modifiers, symbol.name, /*questionToken*/ undefined,
|
|
153618
153618
|
/*type*/ undefined, /*initializer*/ undefined));
|
|
153619
153619
|
return;
|
|
153620
153620
|
}
|
|
@@ -153663,7 +153663,7 @@ var ts;
|
|
|
153663
153663
|
}
|
|
153664
153664
|
function createFunctionExpressionMember(members, functionExpression, name) {
|
|
153665
153665
|
var fullModifiers = ts.concatenate(modifiers, getModifierKindFromSource(functionExpression, 131 /* SyntaxKind.AsyncKeyword */));
|
|
153666
|
-
var method = ts.factory.createMethodDeclaration(fullModifiers, /*asteriskToken*/ undefined, name, /*questionToken*/ undefined,
|
|
153666
|
+
var method = ts.factory.createMethodDeclaration(fullModifiers, /*asteriskToken*/ undefined, name, /*questionToken*/ undefined,
|
|
153667
153667
|
/*typeParameters*/ undefined, functionExpression.parameters, /*type*/ undefined, functionExpression.body);
|
|
153668
153668
|
ts.copyLeadingComments(assignmentBinaryExpression, method, sourceFile);
|
|
153669
153669
|
members.push(method);
|
|
@@ -153681,7 +153681,7 @@ var ts;
|
|
|
153681
153681
|
bodyBlock = ts.factory.createBlock([ts.factory.createReturnStatement(arrowFunctionBody)]);
|
|
153682
153682
|
}
|
|
153683
153683
|
var fullModifiers = ts.concatenate(modifiers, getModifierKindFromSource(arrowFunction, 131 /* SyntaxKind.AsyncKeyword */));
|
|
153684
|
-
var method = ts.factory.createMethodDeclaration(fullModifiers, /*asteriskToken*/ undefined, name, /*questionToken*/ undefined,
|
|
153684
|
+
var method = ts.factory.createMethodDeclaration(fullModifiers, /*asteriskToken*/ undefined, name, /*questionToken*/ undefined,
|
|
153685
153685
|
/*typeParameters*/ undefined, arrowFunction.parameters, /*type*/ undefined, bodyBlock);
|
|
153686
153686
|
ts.copyLeadingComments(assignmentBinaryExpression, method, sourceFile);
|
|
153687
153687
|
members.push(method);
|
|
@@ -153698,7 +153698,7 @@ var ts;
|
|
|
153698
153698
|
memberElements.unshift(ts.factory.createConstructorDeclaration(/*modifiers*/ undefined, initializer.parameters, initializer.body));
|
|
153699
153699
|
}
|
|
153700
153700
|
var modifiers = getModifierKindFromSource(node.parent.parent, 93 /* SyntaxKind.ExportKeyword */);
|
|
153701
|
-
var cls = ts.factory.createClassDeclaration(modifiers, node.name,
|
|
153701
|
+
var cls = ts.factory.createClassDeclaration(modifiers, node.name,
|
|
153702
153702
|
/*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements);
|
|
153703
153703
|
// Don't call copyComments here because we'll already leave them in place
|
|
153704
153704
|
return cls;
|
|
@@ -153709,7 +153709,7 @@ var ts;
|
|
|
153709
153709
|
memberElements.unshift(ts.factory.createConstructorDeclaration(/*modifiers*/ undefined, node.parameters, node.body));
|
|
153710
153710
|
}
|
|
153711
153711
|
var modifiers = getModifierKindFromSource(node, 93 /* SyntaxKind.ExportKeyword */);
|
|
153712
|
-
var cls = ts.factory.createClassDeclaration(modifiers, node.name,
|
|
153712
|
+
var cls = ts.factory.createClassDeclaration(modifiers, node.name,
|
|
153713
153713
|
/*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements);
|
|
153714
153714
|
// Don't call copyComments here because we'll already leave them in place
|
|
153715
153715
|
return cls;
|
|
@@ -154067,8 +154067,8 @@ var ts;
|
|
|
154067
154067
|
if (continuationArgName && varDeclIdentifier && isSynthBindingPattern(continuationArgName)) {
|
|
154068
154068
|
statements.push(ts.factory.createVariableStatement(
|
|
154069
154069
|
/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
154070
|
-
ts.factory.createVariableDeclaration(ts.getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)),
|
|
154071
|
-
/*exclamationToken*/ undefined,
|
|
154070
|
+
ts.factory.createVariableDeclaration(ts.getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)),
|
|
154071
|
+
/*exclamationToken*/ undefined,
|
|
154072
154072
|
/*type*/ undefined, varDeclIdentifier)
|
|
154073
154073
|
], 2 /* NodeFlags.Const */)));
|
|
154074
154074
|
}
|
|
@@ -154173,7 +154173,7 @@ var ts;
|
|
|
154173
154173
|
return [
|
|
154174
154174
|
ts.factory.createVariableStatement(
|
|
154175
154175
|
/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
154176
|
-
ts.factory.createVariableDeclaration(ts.getSynthesizedDeepClone(declareSynthBindingName(variableName)),
|
|
154176
|
+
ts.factory.createVariableDeclaration(ts.getSynthesizedDeepClone(declareSynthBindingName(variableName)),
|
|
154177
154177
|
/*exclamationToken*/ undefined, typeAnnotation, rightHandSide)
|
|
154178
154178
|
], 2 /* NodeFlags.Const */))
|
|
154179
154179
|
];
|
|
@@ -154937,7 +154937,7 @@ var ts;
|
|
|
154937
154937
|
}
|
|
154938
154938
|
function makeExportDeclaration(exportSpecifiers, moduleSpecifier) {
|
|
154939
154939
|
return ts.factory.createExportDeclaration(
|
|
154940
|
-
/*modifiers*/ undefined,
|
|
154940
|
+
/*modifiers*/ undefined,
|
|
154941
154941
|
/*isTypeOnly*/ false, exportSpecifiers && ts.factory.createNamedExports(exportSpecifiers), moduleSpecifier === undefined ? undefined : ts.factory.createStringLiteral(moduleSpecifier));
|
|
154942
154942
|
}
|
|
154943
154943
|
function convertedImports(newImports, useSitesToUnqualify) {
|
|
@@ -155025,12 +155025,12 @@ var ts;
|
|
|
155025
155025
|
changes.insertModifierBefore(context.sourceFile, 152 /* SyntaxKind.TypeKeyword */, exportClause);
|
|
155026
155026
|
}
|
|
155027
155027
|
else {
|
|
155028
|
-
var valueExportDeclaration = ts.factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers,
|
|
155029
|
-
/*isTypeOnly*/ false, ts.factory.updateNamedExports(exportClause, ts.filter(exportClause.elements, function (e) { return !ts.contains(typeExportSpecifiers, e); })), exportDeclaration.moduleSpecifier,
|
|
155028
|
+
var valueExportDeclaration = ts.factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers,
|
|
155029
|
+
/*isTypeOnly*/ false, ts.factory.updateNamedExports(exportClause, ts.filter(exportClause.elements, function (e) { return !ts.contains(typeExportSpecifiers, e); })), exportDeclaration.moduleSpecifier,
|
|
155030
155030
|
/*assertClause*/ undefined);
|
|
155031
155031
|
var typeExportDeclaration = ts.factory.createExportDeclaration(
|
|
155032
|
-
/*modifiers*/ undefined,
|
|
155033
|
-
/*isTypeOnly*/ true, ts.factory.createNamedExports(typeExportSpecifiers), exportDeclaration.moduleSpecifier,
|
|
155032
|
+
/*modifiers*/ undefined,
|
|
155033
|
+
/*isTypeOnly*/ true, ts.factory.createNamedExports(typeExportSpecifiers), exportDeclaration.moduleSpecifier,
|
|
155034
155034
|
/*assertClause*/ undefined);
|
|
155035
155035
|
changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, {
|
|
155036
155036
|
leadingTriviaOption: ts.textChanges.LeadingTriviaOption.IncludeAll,
|
|
@@ -155091,10 +155091,10 @@ var ts;
|
|
|
155091
155091
|
// `import type foo, { Bar }` is not allowed, so move `foo` to new declaration
|
|
155092
155092
|
if (importClause.name && importClause.namedBindings) {
|
|
155093
155093
|
changes.deleteNodeRangeExcludingEnd(context.sourceFile, importClause.name, importDeclaration.importClause.namedBindings);
|
|
155094
|
-
changes.insertNodeBefore(context.sourceFile, importDeclaration, ts.factory.updateImportDeclaration(importDeclaration,
|
|
155094
|
+
changes.insertNodeBefore(context.sourceFile, importDeclaration, ts.factory.updateImportDeclaration(importDeclaration,
|
|
155095
155095
|
/*modifiers*/ undefined, ts.factory.createImportClause(
|
|
155096
|
-
/*isTypeOnly*/ true, importClause.name,
|
|
155097
|
-
/*namedBindings*/ undefined), importDeclaration.moduleSpecifier,
|
|
155096
|
+
/*isTypeOnly*/ true, importClause.name,
|
|
155097
|
+
/*namedBindings*/ undefined), importDeclaration.moduleSpecifier,
|
|
155098
155098
|
/*assertClause*/ undefined));
|
|
155099
155099
|
}
|
|
155100
155100
|
}
|
|
@@ -155144,9 +155144,9 @@ var ts;
|
|
|
155144
155144
|
function doChange(changes, sourceFile, _a) {
|
|
155145
155145
|
var container = _a.container, typeNode = _a.typeNode, constraint = _a.constraint, name = _a.name;
|
|
155146
155146
|
changes.replaceNode(sourceFile, container, ts.factory.createMappedTypeNode(
|
|
155147
|
-
/*readonlyToken*/ undefined, ts.factory.createTypeParameterDeclaration(/*modifiers*/ undefined, name, ts.factory.createTypeReferenceNode(constraint)),
|
|
155148
|
-
/*nameType*/ undefined,
|
|
155149
|
-
/*questionToken*/ undefined, typeNode,
|
|
155147
|
+
/*readonlyToken*/ undefined, ts.factory.createTypeParameterDeclaration(/*modifiers*/ undefined, name, ts.factory.createTypeReferenceNode(constraint)),
|
|
155148
|
+
/*nameType*/ undefined,
|
|
155149
|
+
/*questionToken*/ undefined, typeNode,
|
|
155150
155150
|
/*members*/ undefined));
|
|
155151
155151
|
}
|
|
155152
155152
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -155263,7 +155263,7 @@ var ts;
|
|
|
155263
155263
|
return undefined;
|
|
155264
155264
|
var fixes = info.fixes, symbolName = info.symbolName, errorIdentifierText = info.errorIdentifierText;
|
|
155265
155265
|
var quotePreference = ts.getQuotePreference(sourceFile, preferences);
|
|
155266
|
-
return fixes.map(function (fix) { return codeActionForFix(context, sourceFile, symbolName, fix,
|
|
155266
|
+
return fixes.map(function (fix) { return codeActionForFix(context, sourceFile, symbolName, fix,
|
|
155267
155267
|
/*includeSymbolNameInDescription*/ symbolName !== errorIdentifierText, quotePreference, program.getCompilerOptions()); });
|
|
155268
155268
|
},
|
|
155269
155269
|
fixIds: [importFixId],
|
|
@@ -155450,7 +155450,7 @@ var ts;
|
|
|
155450
155450
|
var importMap = createExistingImportMap(program.getTypeChecker(), importingFile, program.getCompilerOptions());
|
|
155451
155451
|
return { getModuleSpecifierForBestExportInfo: getModuleSpecifierForBestExportInfo };
|
|
155452
155452
|
function getModuleSpecifierForBestExportInfo(exportInfo, symbolName, position, isValidTypeOnlyUseSite, fromCacheOnly) {
|
|
155453
|
-
var _a = getImportFixes(exportInfo, { symbolName: symbolName, position: position }, isValidTypeOnlyUseSite,
|
|
155453
|
+
var _a = getImportFixes(exportInfo, { symbolName: symbolName, position: position }, isValidTypeOnlyUseSite,
|
|
155454
155454
|
/*useRequire*/ false, program, importingFile, host, preferences, importMap, fromCacheOnly), fixes = _a.fixes, computedWithoutCacheCount = _a.computedWithoutCacheCount;
|
|
155455
155455
|
var result = getBestFix(fixes, importingFile, program, packageJsonImportFilter, host);
|
|
155456
155456
|
return result && __assign(__assign({}, result), { computedWithoutCacheCount: computedWithoutCacheCount });
|
|
@@ -155486,7 +155486,7 @@ var ts;
|
|
|
155486
155486
|
var fix = ts.Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, program, { symbolName: symbolName, position: position }, isValidTypeOnlyUseSite, useRequire, host, preferences));
|
|
155487
155487
|
return {
|
|
155488
155488
|
moduleSpecifier: fix.moduleSpecifier,
|
|
155489
|
-
codeAction: codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix,
|
|
155489
|
+
codeAction: codeFixActionToCodeAction(codeActionForFix({ host: host, formatContext: formatContext, preferences: preferences }, sourceFile, symbolName, fix,
|
|
155490
155490
|
/*includeSymbolNameInDescription*/ false, ts.getQuotePreference(sourceFile, preferences), compilerOptions))
|
|
155491
155491
|
};
|
|
155492
155492
|
}
|
|
@@ -155557,7 +155557,7 @@ var ts;
|
|
|
155557
155557
|
return !moduleFile || ts.isImportableFile(program, importingFile, moduleFile, preferences, /*packageJsonFilter*/ undefined, getModuleSpecifierResolutionHost(isFromPackageJson), (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host));
|
|
155558
155558
|
}
|
|
155559
155559
|
}
|
|
155560
|
-
function getImportFixes(exportInfos, useNamespaceInfo,
|
|
155560
|
+
function getImportFixes(exportInfos, useNamespaceInfo,
|
|
155561
155561
|
/** undefined only for missing JSX namespace */
|
|
155562
155562
|
isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences, importMap, fromCacheOnly) {
|
|
155563
155563
|
if (importMap === void 0) { importMap = createExistingImportMap(program.getTypeChecker(), sourceFile, program.getCompilerOptions()); }
|
|
@@ -156182,7 +156182,7 @@ var ts;
|
|
|
156182
156182
|
changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), ts.factory.createIdentifier(defaultImport.name), { suffix: ", " });
|
|
156183
156183
|
}
|
|
156184
156184
|
if (namedImports.length) {
|
|
156185
|
-
var newSpecifiers = ts.stableSort(namedImports.map(function (namedImport) { return ts.factory.createImportSpecifier((!clause.isTypeOnly || promoteFromTypeOnly) && needsTypeOnly(namedImport),
|
|
156185
|
+
var newSpecifiers = ts.stableSort(namedImports.map(function (namedImport) { return ts.factory.createImportSpecifier((!clause.isTypeOnly || promoteFromTypeOnly) && needsTypeOnly(namedImport),
|
|
156186
156186
|
/*propertyName*/ undefined, ts.factory.createIdentifier(namedImport.name)); }), ts.OrganizeImports.compareImportOrExportSpecifiers);
|
|
156187
156187
|
if ((existingSpecifiers === null || existingSpecifiers === void 0 ? void 0 : existingSpecifiers.length) && ts.OrganizeImports.importSpecifiersAreSorted(existingSpecifiers)) {
|
|
156188
156188
|
for (var _b = 0, newSpecifiers_1 = newSpecifiers; _b < newSpecifiers_1.length; _b++) {
|
|
@@ -156256,7 +156256,7 @@ var ts;
|
|
|
156256
156256
|
var topLevelTypeOnly_1 = (!defaultImport || needsTypeOnly(defaultImport)) && ts.every(namedImports, needsTypeOnly);
|
|
156257
156257
|
statements = ts.combine(statements, ts.makeImport(defaultImport && ts.factory.createIdentifier(defaultImport.name), namedImports === null || namedImports === void 0 ? void 0 : namedImports.map(function (_a) {
|
|
156258
156258
|
var addAsTypeOnly = _a.addAsTypeOnly, name = _a.name;
|
|
156259
|
-
return ts.factory.createImportSpecifier(!topLevelTypeOnly_1 && addAsTypeOnly === 2 /* AddAsTypeOnly.Required */,
|
|
156259
|
+
return ts.factory.createImportSpecifier(!topLevelTypeOnly_1 && addAsTypeOnly === 2 /* AddAsTypeOnly.Required */,
|
|
156260
156260
|
/*propertyName*/ undefined, ts.factory.createIdentifier(name));
|
|
156261
156261
|
}), moduleSpecifier, quotePreference, topLevelTypeOnly_1));
|
|
156262
156262
|
}
|
|
@@ -156265,8 +156265,8 @@ var ts;
|
|
|
156265
156265
|
? ts.factory.createImportEqualsDeclaration(
|
|
156266
156266
|
/*modifiers*/ undefined, needsTypeOnly(namespaceLikeImport), ts.factory.createIdentifier(namespaceLikeImport.name), ts.factory.createExternalModuleReference(quotedModuleSpecifier))
|
|
156267
156267
|
: ts.factory.createImportDeclaration(
|
|
156268
|
-
/*modifiers*/ undefined, ts.factory.createImportClause(needsTypeOnly(namespaceLikeImport),
|
|
156269
|
-
/*name*/ undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(namespaceLikeImport.name))), quotedModuleSpecifier,
|
|
156268
|
+
/*modifiers*/ undefined, ts.factory.createImportClause(needsTypeOnly(namespaceLikeImport),
|
|
156269
|
+
/*name*/ undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(namespaceLikeImport.name))), quotedModuleSpecifier,
|
|
156270
156270
|
/*assertClause*/ undefined);
|
|
156271
156271
|
statements = ts.combine(statements, declaration);
|
|
156272
156272
|
}
|
|
@@ -156297,8 +156297,8 @@ var ts;
|
|
|
156297
156297
|
function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) {
|
|
156298
156298
|
return ts.factory.createVariableStatement(
|
|
156299
156299
|
/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
156300
|
-
ts.factory.createVariableDeclaration(typeof name === "string" ? ts.factory.createIdentifier(name) : name,
|
|
156301
|
-
/*exclamationToken*/ undefined,
|
|
156300
|
+
ts.factory.createVariableDeclaration(typeof name === "string" ? ts.factory.createIdentifier(name) : name,
|
|
156301
|
+
/*exclamationToken*/ undefined,
|
|
156302
156302
|
/*type*/ undefined, ts.factory.createCallExpression(ts.factory.createIdentifier("require"), /*typeArguments*/ undefined, [quotedModuleSpecifier]))
|
|
156303
156303
|
], 2 /* NodeFlags.Const */));
|
|
156304
156304
|
}
|
|
@@ -157018,7 +157018,7 @@ var ts;
|
|
|
157018
157018
|
if (ts.hasSyntacticModifier(declaration, 256 /* ModifierFlags.Async */)) {
|
|
157019
157019
|
exprType = checker.createPromiseType(exprType);
|
|
157020
157020
|
}
|
|
157021
|
-
var newSig = checker.createSignature(declaration, sig.typeParameters, sig.thisParameter, sig.parameters, exprType,
|
|
157021
|
+
var newSig = checker.createSignature(declaration, sig.typeParameters, sig.thisParameter, sig.parameters, exprType,
|
|
157022
157022
|
/*typePredicate*/ undefined, sig.minArgumentCount, sig.flags);
|
|
157023
157023
|
exprType = checker.createAnonymousType(
|
|
157024
157024
|
/*symbol*/ undefined, ts.createSymbolTable(), [newSig], [], []);
|
|
@@ -157343,9 +157343,9 @@ var ts;
|
|
|
157343
157343
|
}
|
|
157344
157344
|
else if (ts.isPrivateIdentifier(token)) {
|
|
157345
157345
|
var property = ts.factory.createPropertyDeclaration(
|
|
157346
|
-
/*modifiers*/ undefined, tokenName,
|
|
157347
|
-
/*questionToken*/ undefined,
|
|
157348
|
-
/*type*/ undefined,
|
|
157346
|
+
/*modifiers*/ undefined, tokenName,
|
|
157347
|
+
/*questionToken*/ undefined,
|
|
157348
|
+
/*type*/ undefined,
|
|
157349
157349
|
/*initializer*/ undefined);
|
|
157350
157350
|
var lastProp = getNodeToInsertPropertyAfter(classDeclaration);
|
|
157351
157351
|
if (lastProp) {
|
|
@@ -157425,9 +157425,9 @@ var ts;
|
|
|
157425
157425
|
// Index signatures cannot have the static modifier.
|
|
157426
157426
|
var stringTypeNode = ts.factory.createKeywordTypeNode(150 /* SyntaxKind.StringKeyword */);
|
|
157427
157427
|
var indexingParameter = ts.factory.createParameterDeclaration(
|
|
157428
|
-
/*modifiers*/ undefined,
|
|
157429
|
-
/*dotDotDotToken*/ undefined, "x",
|
|
157430
|
-
/*questionToken*/ undefined, stringTypeNode,
|
|
157428
|
+
/*modifiers*/ undefined,
|
|
157429
|
+
/*dotDotDotToken*/ undefined, "x",
|
|
157430
|
+
/*questionToken*/ undefined, stringTypeNode,
|
|
157431
157431
|
/*initializer*/ undefined);
|
|
157432
157432
|
var indexSignature = ts.factory.createIndexSignature(
|
|
157433
157433
|
/*modifiers*/ undefined, [indexingParameter], typeNode);
|
|
@@ -160187,7 +160187,7 @@ var ts;
|
|
|
160187
160187
|
importSymbols(importAdder, importableReference.symbols);
|
|
160188
160188
|
}
|
|
160189
160189
|
}
|
|
160190
|
-
addClassElement(ts.factory.createPropertyDeclaration(modifiers, name, optional && (preserveOptional & 2 /* PreserveOptionalFlags.Property */) ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, typeNode,
|
|
160190
|
+
addClassElement(ts.factory.createPropertyDeclaration(modifiers, name, optional && (preserveOptional & 2 /* PreserveOptionalFlags.Property */) ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, typeNode,
|
|
160191
160191
|
/*initializer*/ undefined));
|
|
160192
160192
|
break;
|
|
160193
160193
|
case 172 /* SyntaxKind.GetAccessor */:
|
|
@@ -160361,10 +160361,10 @@ var ts;
|
|
|
160361
160361
|
: checker.typeToTypeNode(contextualType, contextNode, /*flags*/ undefined, tracker);
|
|
160362
160362
|
switch (kind) {
|
|
160363
160363
|
case 169 /* SyntaxKind.MethodDeclaration */:
|
|
160364
|
-
return ts.factory.createMethodDeclaration(modifiers, asteriskToken, name,
|
|
160364
|
+
return ts.factory.createMethodDeclaration(modifiers, asteriskToken, name,
|
|
160365
160365
|
/*questionToken*/ undefined, typeParameters, parameters, type, createStubbedMethodBody(quotePreference));
|
|
160366
160366
|
case 168 /* SyntaxKind.MethodSignature */:
|
|
160367
|
-
return ts.factory.createMethodSignature(modifiers, name,
|
|
160367
|
+
return ts.factory.createMethodSignature(modifiers, name,
|
|
160368
160368
|
/*questionToken*/ undefined, typeParameters, parameters, type === undefined ? ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */) : type);
|
|
160369
160369
|
case 256 /* SyntaxKind.FunctionDeclaration */:
|
|
160370
160370
|
return ts.factory.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, createStubbedBody(ts.Diagnostics.Function_not_implemented.message, quotePreference));
|
|
@@ -160499,11 +160499,11 @@ var ts;
|
|
|
160499
160499
|
var parameterNameCount = parameterNameCounts.get(parameterName);
|
|
160500
160500
|
parameterNameCounts.set(parameterName, (parameterNameCount || 0) + 1);
|
|
160501
160501
|
var newParameter = ts.factory.createParameterDeclaration(
|
|
160502
|
-
/*modifiers*/ undefined,
|
|
160503
|
-
/*dotDotDotToken*/ undefined,
|
|
160504
|
-
/*name*/ parameterName + (parameterNameCount || ""),
|
|
160505
|
-
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined,
|
|
160506
|
-
/*type*/ inJs ? undefined : (types === null || types === void 0 ? void 0 : types[i]) || ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */),
|
|
160502
|
+
/*modifiers*/ undefined,
|
|
160503
|
+
/*dotDotDotToken*/ undefined,
|
|
160504
|
+
/*name*/ parameterName + (parameterNameCount || ""),
|
|
160505
|
+
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined,
|
|
160506
|
+
/*type*/ inJs ? undefined : (types === null || types === void 0 ? void 0 : types[i]) || ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */),
|
|
160507
160507
|
/*initializer*/ undefined);
|
|
160508
160508
|
parameters.push(newParameter);
|
|
160509
160509
|
}
|
|
@@ -160532,12 +160532,12 @@ var ts;
|
|
|
160532
160532
|
var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, /* types */ undefined, minArgumentCount, /*inJs*/ false);
|
|
160533
160533
|
if (someSigHasRestParameter) {
|
|
160534
160534
|
var restParameter = ts.factory.createParameterDeclaration(
|
|
160535
|
-
/*modifiers*/ undefined, ts.factory.createToken(25 /* SyntaxKind.DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest",
|
|
160536
|
-
/*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, ts.factory.createArrayTypeNode(ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */)),
|
|
160535
|
+
/*modifiers*/ undefined, ts.factory.createToken(25 /* SyntaxKind.DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest",
|
|
160536
|
+
/*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, ts.factory.createArrayTypeNode(ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */)),
|
|
160537
160537
|
/*initializer*/ undefined);
|
|
160538
160538
|
parameters.push(restParameter);
|
|
160539
160539
|
}
|
|
160540
|
-
return createStubbedMethod(modifiers, name, optional,
|
|
160540
|
+
return createStubbedMethod(modifiers, name, optional,
|
|
160541
160541
|
/*typeParameters*/ undefined, parameters, getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration), quotePreference, body);
|
|
160542
160542
|
}
|
|
160543
160543
|
function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {
|
|
@@ -160547,17 +160547,17 @@ var ts;
|
|
|
160547
160547
|
}
|
|
160548
160548
|
}
|
|
160549
160549
|
function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType, quotePreference, body) {
|
|
160550
|
-
return ts.factory.createMethodDeclaration(modifiers,
|
|
160550
|
+
return ts.factory.createMethodDeclaration(modifiers,
|
|
160551
160551
|
/*asteriskToken*/ undefined, name, optional ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, typeParameters, parameters, returnType, body || createStubbedMethodBody(quotePreference));
|
|
160552
160552
|
}
|
|
160553
160553
|
function createStubbedMethodBody(quotePreference) {
|
|
160554
160554
|
return createStubbedBody(ts.Diagnostics.Method_not_implemented.message, quotePreference);
|
|
160555
160555
|
}
|
|
160556
160556
|
function createStubbedBody(text, quotePreference) {
|
|
160557
|
-
return ts.factory.createBlock([ts.factory.createThrowStatement(ts.factory.createNewExpression(ts.factory.createIdentifier("Error"),
|
|
160558
|
-
/*typeArguments*/ undefined,
|
|
160557
|
+
return ts.factory.createBlock([ts.factory.createThrowStatement(ts.factory.createNewExpression(ts.factory.createIdentifier("Error"),
|
|
160558
|
+
/*typeArguments*/ undefined,
|
|
160559
160559
|
// TODO Handle auto quote preference.
|
|
160560
|
-
[ts.factory.createStringLiteral(text, /*isSingleQuote*/ quotePreference === 0 /* QuotePreference.Single */)]))],
|
|
160560
|
+
[ts.factory.createStringLiteral(text, /*isSingleQuote*/ quotePreference === 0 /* QuotePreference.Single */)]))],
|
|
160561
160561
|
/*multiline*/ true);
|
|
160562
160562
|
}
|
|
160563
160563
|
codefix.createStubbedBody = createStubbedBody;
|
|
@@ -160768,7 +160768,7 @@ var ts;
|
|
|
160768
160768
|
}
|
|
160769
160769
|
codefix.getAccessorConvertiblePropertyAtPosition = getAccessorConvertiblePropertyAtPosition;
|
|
160770
160770
|
function generateGetAccessor(fieldName, accessorName, type, modifiers, isStatic, container) {
|
|
160771
|
-
return ts.factory.createGetAccessorDeclaration(modifiers, accessorName,
|
|
160771
|
+
return ts.factory.createGetAccessorDeclaration(modifiers, accessorName,
|
|
160772
160772
|
/*parameters*/ undefined, // TODO: GH#18217
|
|
160773
160773
|
type, ts.factory.createBlock([
|
|
160774
160774
|
ts.factory.createReturnStatement(createAccessorAccessExpression(fieldName, isStatic, container))
|
|
@@ -160776,8 +160776,8 @@ var ts;
|
|
|
160776
160776
|
}
|
|
160777
160777
|
function generateSetAccessor(fieldName, accessorName, type, modifiers, isStatic, container) {
|
|
160778
160778
|
return ts.factory.createSetAccessorDeclaration(modifiers, accessorName, [ts.factory.createParameterDeclaration(
|
|
160779
|
-
/*modifiers*/ undefined,
|
|
160780
|
-
/*dotDotDotToken*/ undefined, ts.factory.createIdentifier("value"),
|
|
160779
|
+
/*modifiers*/ undefined,
|
|
160780
|
+
/*dotDotDotToken*/ undefined, ts.factory.createIdentifier("value"),
|
|
160781
160781
|
/*questionToken*/ undefined, type)], ts.factory.createBlock([
|
|
160782
160782
|
ts.factory.createExpressionStatement(ts.factory.createAssignment(createAccessorAccessExpression(fieldName, isStatic, container), ts.factory.createIdentifier("value")))
|
|
160783
160783
|
], /*multiLine*/ true));
|
|
@@ -160872,7 +160872,7 @@ var ts;
|
|
|
160872
160872
|
if (ts.getEmitModuleKind(opts) === ts.ModuleKind.CommonJS) {
|
|
160873
160873
|
// import Bluebird = require("bluebird");
|
|
160874
160874
|
variations.push(createAction(context, sourceFile, node, ts.factory.createImportEqualsDeclaration(
|
|
160875
|
-
/*modifiers*/ undefined,
|
|
160875
|
+
/*modifiers*/ undefined,
|
|
160876
160876
|
/*isTypeOnly*/ false, namespace.name, ts.factory.createExternalModuleReference(node.moduleSpecifier))));
|
|
160877
160877
|
}
|
|
160878
160878
|
return variations;
|
|
@@ -161368,8 +161368,8 @@ var ts;
|
|
|
161368
161368
|
var otherMembers = members.filter(function (member) { return !ts.isIndexSignatureDeclaration(member); });
|
|
161369
161369
|
var parameter = ts.first(indexSignature.parameters);
|
|
161370
161370
|
var mappedTypeParameter = ts.factory.createTypeParameterDeclaration(/*modifiers*/ undefined, ts.cast(parameter.name, ts.isIdentifier), parameter.type);
|
|
161371
|
-
var mappedIntersectionType = ts.factory.createMappedTypeNode(ts.hasEffectiveReadonlyModifier(indexSignature) ? ts.factory.createModifier(145 /* SyntaxKind.ReadonlyKeyword */) : undefined, mappedTypeParameter,
|
|
161372
|
-
/*nameType*/ undefined, indexSignature.questionToken, indexSignature.type,
|
|
161371
|
+
var mappedIntersectionType = ts.factory.createMappedTypeNode(ts.hasEffectiveReadonlyModifier(indexSignature) ? ts.factory.createModifier(145 /* SyntaxKind.ReadonlyKeyword */) : undefined, mappedTypeParameter,
|
|
161372
|
+
/*nameType*/ undefined, indexSignature.questionToken, indexSignature.type,
|
|
161373
161373
|
/*members*/ undefined);
|
|
161374
161374
|
var intersectionType = ts.factory.createIntersectionTypeNode(__spreadArray(__spreadArray(__spreadArray([], ts.getAllSuperTypeNodes(container), true), [
|
|
161375
161375
|
mappedIntersectionType
|
|
@@ -162465,7 +162465,7 @@ var ts;
|
|
|
162465
162465
|
}
|
|
162466
162466
|
return ts.factory.createNodeArray([
|
|
162467
162467
|
ts.factory.createParameterDeclaration(
|
|
162468
|
-
/*modifiers*/ undefined, ts.factory.createToken(25 /* SyntaxKind.DotDotDotToken */), "args",
|
|
162468
|
+
/*modifiers*/ undefined, ts.factory.createToken(25 /* SyntaxKind.DotDotDotToken */), "args",
|
|
162469
162469
|
/*questionToken*/ undefined, ts.factory.createUnionTypeNode(ts.map(signatureDeclarations, convertSignatureParametersToTuple)))
|
|
162470
162470
|
]);
|
|
162471
162471
|
}
|
|
@@ -163319,9 +163319,9 @@ var ts;
|
|
|
163319
163319
|
typeNode = ts.codefix.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, 1 /* NodeBuilderFlags.NoTruncation */);
|
|
163320
163320
|
}
|
|
163321
163321
|
var paramDecl = ts.factory.createParameterDeclaration(
|
|
163322
|
-
/*modifiers*/ undefined,
|
|
163323
|
-
/*dotDotDotToken*/ undefined,
|
|
163324
|
-
/*name*/ name,
|
|
163322
|
+
/*modifiers*/ undefined,
|
|
163323
|
+
/*dotDotDotToken*/ undefined,
|
|
163324
|
+
/*name*/ name,
|
|
163325
163325
|
/*questionToken*/ undefined, typeNode);
|
|
163326
163326
|
parameters.push(paramDecl);
|
|
163327
163327
|
if (usage.usage === 2 /* Usage.Write */) {
|
|
@@ -163358,16 +163358,16 @@ var ts;
|
|
|
163358
163358
|
if (range.facts & RangeFacts.IsAsyncFunction) {
|
|
163359
163359
|
modifiers.push(ts.factory.createModifier(131 /* SyntaxKind.AsyncKeyword */));
|
|
163360
163360
|
}
|
|
163361
|
-
newFunction = ts.factory.createMethodDeclaration(modifiers.length ? modifiers : undefined, range.facts & RangeFacts.IsGenerator ? ts.factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined, functionName,
|
|
163361
|
+
newFunction = ts.factory.createMethodDeclaration(modifiers.length ? modifiers : undefined, range.facts & RangeFacts.IsGenerator ? ts.factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined, functionName,
|
|
163362
163362
|
/*questionToken*/ undefined, typeParameters, parameters, returnType, body);
|
|
163363
163363
|
}
|
|
163364
163364
|
else {
|
|
163365
163365
|
if (callThis) {
|
|
163366
163366
|
parameters.unshift(ts.factory.createParameterDeclaration(
|
|
163367
|
-
/*modifiers*/ undefined,
|
|
163368
|
-
/*dotDotDotToken*/ undefined,
|
|
163369
|
-
/*name*/ "this",
|
|
163370
|
-
/*questionToken*/ undefined, checker.typeToTypeNode(checker.getTypeAtLocation(range.thisNode), scope, 1 /* NodeBuilderFlags.NoTruncation */),
|
|
163367
|
+
/*modifiers*/ undefined,
|
|
163368
|
+
/*dotDotDotToken*/ undefined,
|
|
163369
|
+
/*name*/ "this",
|
|
163370
|
+
/*questionToken*/ undefined, checker.typeToTypeNode(checker.getTypeAtLocation(range.thisNode), scope, 1 /* NodeBuilderFlags.NoTruncation */),
|
|
163371
163371
|
/*initializer*/ undefined));
|
|
163372
163372
|
}
|
|
163373
163373
|
newFunction = ts.factory.createFunctionDeclaration(range.facts & RangeFacts.IsAsyncFunction ? [ts.factory.createToken(131 /* SyntaxKind.AsyncKeyword */)] : undefined, range.facts & RangeFacts.IsGenerator ? ts.factory.createToken(41 /* SyntaxKind.AsteriskToken */) : undefined, functionName, typeParameters, parameters, returnType, body);
|
|
@@ -163421,15 +163421,15 @@ var ts;
|
|
|
163421
163421
|
for (var _i = 0, exposedVariableDeclarations_1 = exposedVariableDeclarations; _i < exposedVariableDeclarations_1.length; _i++) {
|
|
163422
163422
|
var variableDeclaration = exposedVariableDeclarations_1[_i];
|
|
163423
163423
|
bindingElements.push(ts.factory.createBindingElement(
|
|
163424
|
-
/*dotDotDotToken*/ undefined,
|
|
163425
|
-
/*propertyName*/ undefined,
|
|
163424
|
+
/*dotDotDotToken*/ undefined,
|
|
163425
|
+
/*propertyName*/ undefined,
|
|
163426
163426
|
/*name*/ ts.getSynthesizedDeepClone(variableDeclaration.name)));
|
|
163427
163427
|
// Being returned through an object literal will have widened the type.
|
|
163428
163428
|
var variableType = checker.typeToTypeNode(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(variableDeclaration)), scope, 1 /* NodeBuilderFlags.NoTruncation */);
|
|
163429
163429
|
typeElements.push(ts.factory.createPropertySignature(
|
|
163430
|
-
/*modifiers*/ undefined,
|
|
163431
|
-
/*name*/ variableDeclaration.symbol.name,
|
|
163432
|
-
/*questionToken*/ undefined,
|
|
163430
|
+
/*modifiers*/ undefined,
|
|
163431
|
+
/*name*/ variableDeclaration.symbol.name,
|
|
163432
|
+
/*questionToken*/ undefined,
|
|
163433
163433
|
/*type*/ variableType));
|
|
163434
163434
|
sawExplicitType = sawExplicitType || variableDeclaration.type !== undefined;
|
|
163435
163435
|
commonNodeFlags = commonNodeFlags & variableDeclaration.parent.flags;
|
|
@@ -163439,9 +163439,9 @@ var ts;
|
|
|
163439
163439
|
ts.setEmitFlags(typeLiteral, 1 /* EmitFlags.SingleLine */);
|
|
163440
163440
|
}
|
|
163441
163441
|
newNodes.push(ts.factory.createVariableStatement(
|
|
163442
|
-
/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([ts.factory.createVariableDeclaration(ts.factory.createObjectBindingPattern(bindingElements),
|
|
163443
|
-
/*exclamationToken*/ undefined,
|
|
163444
|
-
/*type*/ typeLiteral,
|
|
163442
|
+
/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([ts.factory.createVariableDeclaration(ts.factory.createObjectBindingPattern(bindingElements),
|
|
163443
|
+
/*exclamationToken*/ undefined,
|
|
163444
|
+
/*type*/ typeLiteral,
|
|
163445
163445
|
/*initializer*/ call)], commonNodeFlags)));
|
|
163446
163446
|
}
|
|
163447
163447
|
}
|
|
@@ -163552,7 +163552,7 @@ var ts;
|
|
|
163552
163552
|
modifiers.push(ts.factory.createModifier(124 /* SyntaxKind.StaticKeyword */));
|
|
163553
163553
|
}
|
|
163554
163554
|
modifiers.push(ts.factory.createModifier(145 /* SyntaxKind.ReadonlyKeyword */));
|
|
163555
|
-
var newVariable = ts.factory.createPropertyDeclaration(modifiers, localNameText,
|
|
163555
|
+
var newVariable = ts.factory.createPropertyDeclaration(modifiers, localNameText,
|
|
163556
163556
|
/*questionToken*/ undefined, variableType, initializer);
|
|
163557
163557
|
var localReference = ts.factory.createPropertyAccessExpression(rangeFacts & RangeFacts.InStaticRegion
|
|
163558
163558
|
? ts.factory.createIdentifier(scope.name.getText()) // TODO: GH#18217
|
|
@@ -163667,8 +163667,8 @@ var ts;
|
|
|
163667
163667
|
if ((!firstParameter || (ts.isIdentifier(firstParameter.name) && firstParameter.name.escapedText !== "this"))) {
|
|
163668
163668
|
var thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node);
|
|
163669
163669
|
parameters.splice(0, 0, ts.factory.createParameterDeclaration(
|
|
163670
|
-
/* modifiers */ undefined,
|
|
163671
|
-
/* dotDotDotToken */ undefined, "this",
|
|
163670
|
+
/* modifiers */ undefined,
|
|
163671
|
+
/* dotDotDotToken */ undefined, "this",
|
|
163672
163672
|
/* questionToken */ undefined, checker.typeToTypeNode(thisType, scope, 1 /* NodeBuilderFlags.NoTruncation */)));
|
|
163673
163673
|
}
|
|
163674
163674
|
}
|
|
@@ -164475,7 +164475,7 @@ var ts;
|
|
|
164475
164475
|
var _a;
|
|
164476
164476
|
var firstStatement = info.firstStatement, selection = info.selection, typeParameters = info.typeParameters, typeElements = info.typeElements;
|
|
164477
164477
|
var newTypeNode = ts.factory.createInterfaceDeclaration(
|
|
164478
|
-
/* modifiers */ undefined, name, typeParameters,
|
|
164478
|
+
/* modifiers */ undefined, name, typeParameters,
|
|
164479
164479
|
/* heritageClauses */ undefined, typeElements);
|
|
164480
164480
|
ts.setTextRange(newTypeNode, (_a = typeElements[0]) === null || _a === void 0 ? void 0 : _a.parent);
|
|
164481
164481
|
changes.insertNodeBefore(file, firstStatement, ts.ignoreSourceNewlines(newTypeNode), /* blankLineBetween */ true);
|
|
@@ -164805,7 +164805,7 @@ var ts;
|
|
|
164805
164805
|
switch (node.kind) {
|
|
164806
164806
|
case 266 /* SyntaxKind.ImportDeclaration */:
|
|
164807
164807
|
return ts.factory.createImportDeclaration(
|
|
164808
|
-
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, ts.factory.createNamespaceImport(newNamespaceId)), newModuleString,
|
|
164808
|
+
/*modifiers*/ undefined, ts.factory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, ts.factory.createNamespaceImport(newNamespaceId)), newModuleString,
|
|
164809
164809
|
/*assertClause*/ undefined);
|
|
164810
164810
|
case 265 /* SyntaxKind.ImportEqualsDeclaration */:
|
|
164811
164811
|
return ts.factory.createImportEqualsDeclaration(/*modifiers*/ undefined, /*isTypeOnly*/ false, newNamespaceId, ts.factory.createExternalModuleReference(newModuleString));
|
|
@@ -165835,14 +165835,14 @@ var ts;
|
|
|
165835
165835
|
objectInitializer = ts.factory.createObjectLiteralExpression();
|
|
165836
165836
|
}
|
|
165837
165837
|
var objectParameter = ts.factory.createParameterDeclaration(
|
|
165838
|
-
/*modifiers*/ undefined,
|
|
165839
|
-
/*dotDotDotToken*/ undefined, objectParameterName,
|
|
165838
|
+
/*modifiers*/ undefined,
|
|
165839
|
+
/*dotDotDotToken*/ undefined, objectParameterName,
|
|
165840
165840
|
/*questionToken*/ undefined, objectParameterType, objectInitializer);
|
|
165841
165841
|
if (hasThisParameter(functionDeclaration.parameters)) {
|
|
165842
165842
|
var thisParameter = functionDeclaration.parameters[0];
|
|
165843
165843
|
var newThisParameter = ts.factory.createParameterDeclaration(
|
|
165844
|
-
/*modifiers*/ undefined,
|
|
165845
|
-
/*dotDotDotToken*/ undefined, thisParameter.name,
|
|
165844
|
+
/*modifiers*/ undefined,
|
|
165845
|
+
/*dotDotDotToken*/ undefined, thisParameter.name,
|
|
165846
165846
|
/*questionToken*/ undefined, thisParameter.type);
|
|
165847
165847
|
ts.suppressLeadingAndTrailingTrivia(newThisParameter.name);
|
|
165848
165848
|
ts.copyComments(thisParameter.name, newThisParameter.name);
|
|
@@ -165855,7 +165855,7 @@ var ts;
|
|
|
165855
165855
|
return ts.factory.createNodeArray([objectParameter]);
|
|
165856
165856
|
function createBindingElementFromParameterDeclaration(parameterDeclaration) {
|
|
165857
165857
|
var element = ts.factory.createBindingElement(
|
|
165858
|
-
/*dotDotDotToken*/ undefined,
|
|
165858
|
+
/*dotDotDotToken*/ undefined,
|
|
165859
165859
|
/*propertyName*/ undefined, getParameterName(parameterDeclaration), ts.isRestParameter(parameterDeclaration) && isOptionalParameter(parameterDeclaration) ? ts.factory.createArrayLiteralExpression() : parameterDeclaration.initializer);
|
|
165860
165860
|
ts.suppressLeadingAndTrailingTrivia(element);
|
|
165861
165861
|
if (parameterDeclaration.initializer && element.initializer) {
|
|
@@ -167682,7 +167682,7 @@ var ts;
|
|
|
167682
167682
|
result.path = ts.toPath(configFileName, currentDirectory, getCanonicalFileName);
|
|
167683
167683
|
result.resolvedPath = result.path;
|
|
167684
167684
|
result.originalFileName = result.fileName;
|
|
167685
|
-
return ts.parseJsonSourceFileConfigFileContent(result, parseConfigHost, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory),
|
|
167685
|
+
return ts.parseJsonSourceFileConfigFileContent(result, parseConfigHost, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory),
|
|
167686
167686
|
/*optionsToExtend*/ undefined, ts.getNormalizedAbsolutePath(configFileName, currentDirectory));
|
|
167687
167687
|
}
|
|
167688
167688
|
function onReleaseParsedCommandLine(configFileName, oldResolvedRef, oldOptions) {
|
|
@@ -169889,14 +169889,14 @@ var ts;
|
|
|
169889
169889
|
};
|
|
169890
169890
|
LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
|
|
169891
169891
|
var _this = this;
|
|
169892
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
169892
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
169893
169893
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
169894
169894
|
// on the managed side versus a full JSON array.
|
|
169895
169895
|
function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
169896
169896
|
};
|
|
169897
169897
|
LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
|
|
169898
169898
|
var _this = this;
|
|
169899
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
169899
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
169900
169900
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
169901
169901
|
// on the managed side versus a full JSON array.
|
|
169902
169902
|
function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
@@ -170143,7 +170143,7 @@ var ts;
|
|
|
170143
170143
|
};
|
|
170144
170144
|
LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
|
|
170145
170145
|
var _this = this;
|
|
170146
|
-
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
170146
|
+
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
170147
170147
|
/*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
|
|
170148
170148
|
};
|
|
170149
170149
|
LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
|