@typescript-deploys/pr-build 4.6.0-pr-46792-6 → 4.6.0-pr-46951-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es5.d.ts +1 -1
- package/lib/tsc.js +110 -62
- package/lib/tsserver.js +233 -168
- package/lib/tsserverlibrary.d.ts +3 -3
- package/lib/tsserverlibrary.js +233 -168
- package/lib/typescript.d.ts +3 -3
- package/lib/typescript.js +229 -164
- package/lib/typescriptServices.d.ts +3 -3
- package/lib/typescriptServices.js +229 -164
- package/lib/typingsInstaller.js +130 -87
- package/package.json +1 -1
package/lib/lib.es5.d.ts
CHANGED
|
@@ -1515,7 +1515,7 @@ interface Promise<T> {
|
|
|
1515
1515
|
type Awaited<T> =
|
|
1516
1516
|
T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
|
1517
1517
|
T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
|
1518
|
-
F extends ((value: infer V) => any) ? // if the argument to `then` is callable, extracts the argument
|
|
1518
|
+
F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument
|
|
1519
1519
|
Awaited<V> : // recursively unwrap the value
|
|
1520
1520
|
never : // the argument to `then` was not callable
|
|
1521
1521
|
T; // non-object or non-thenable
|
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20211130";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -108,20 +108,6 @@ var ts;
|
|
|
108
108
|
ts.emptyArray = [];
|
|
109
109
|
ts.emptyMap = new ts.Map();
|
|
110
110
|
ts.emptySet = new ts.Set();
|
|
111
|
-
function createMap() {
|
|
112
|
-
return new ts.Map();
|
|
113
|
-
}
|
|
114
|
-
ts.createMap = createMap;
|
|
115
|
-
function createMapFromTemplate(template) {
|
|
116
|
-
var map = new ts.Map();
|
|
117
|
-
for (var key in template) {
|
|
118
|
-
if (hasOwnProperty.call(template, key)) {
|
|
119
|
-
map.set(key, template[key]);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return map;
|
|
123
|
-
}
|
|
124
|
-
ts.createMapFromTemplate = createMapFromTemplate;
|
|
125
111
|
function length(array) {
|
|
126
112
|
return array ? array.length : 0;
|
|
127
113
|
}
|
|
@@ -2005,7 +1991,6 @@ var ts;
|
|
|
2005
1991
|
return value;
|
|
2006
1992
|
}
|
|
2007
1993
|
Debug.checkDefined = checkDefined;
|
|
2008
|
-
Debug.assertDefined = checkDefined;
|
|
2009
1994
|
function assertEachIsDefined(value, message, stackCrawlMark) {
|
|
2010
1995
|
for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {
|
|
2011
1996
|
var v = value_1[_i];
|
|
@@ -2018,7 +2003,6 @@ var ts;
|
|
|
2018
2003
|
return value;
|
|
2019
2004
|
}
|
|
2020
2005
|
Debug.checkEachDefined = checkEachDefined;
|
|
2021
|
-
Debug.assertEachDefined = checkEachDefined;
|
|
2022
2006
|
function assertNever(member, message, stackCrawlMark) {
|
|
2023
2007
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2024
2008
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
@@ -10501,14 +10485,6 @@ var ts;
|
|
|
10501
10485
|
return undefined;
|
|
10502
10486
|
}
|
|
10503
10487
|
ts.getDeclarationOfKind = getDeclarationOfKind;
|
|
10504
|
-
function createUnderscoreEscapedMap() {
|
|
10505
|
-
return new ts.Map();
|
|
10506
|
-
}
|
|
10507
|
-
ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap;
|
|
10508
|
-
function hasEntries(map) {
|
|
10509
|
-
return !!map && !!map.size;
|
|
10510
|
-
}
|
|
10511
|
-
ts.hasEntries = hasEntries;
|
|
10512
10488
|
function createSymbolTable(symbols) {
|
|
10513
10489
|
var result = new ts.Map();
|
|
10514
10490
|
if (symbols) {
|
|
@@ -21313,7 +21289,7 @@ var ts;
|
|
|
21313
21289
|
sourceMapText = mapTextOrStripInternal;
|
|
21314
21290
|
}
|
|
21315
21291
|
var node = oldFileOfCurrentEmit ?
|
|
21316
|
-
parseOldFileOfCurrentEmit(ts.Debug.
|
|
21292
|
+
parseOldFileOfCurrentEmit(ts.Debug.checkDefined(bundleFileInfo)) :
|
|
21317
21293
|
parseUnparsedSourceFile(bundleFileInfo, stripInternal, length);
|
|
21318
21294
|
node.fileName = fileName;
|
|
21319
21295
|
node.sourceMapPath = sourceMapPath;
|
|
@@ -21458,13 +21434,13 @@ var ts;
|
|
|
21458
21434
|
};
|
|
21459
21435
|
node.javascriptPath = declarationTextOrJavascriptPath;
|
|
21460
21436
|
node.javascriptMapPath = javascriptMapPath;
|
|
21461
|
-
node.declarationPath = ts.Debug.
|
|
21437
|
+
node.declarationPath = ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath);
|
|
21462
21438
|
node.declarationMapPath = declarationMapPath;
|
|
21463
21439
|
node.buildInfoPath = declarationMapTextOrBuildInfoPath;
|
|
21464
21440
|
Object.defineProperties(node, {
|
|
21465
21441
|
javascriptText: { get: function () { return definedTextGetter_1(declarationTextOrJavascriptPath); } },
|
|
21466
21442
|
javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } },
|
|
21467
|
-
declarationText: { get: function () { return definedTextGetter_1(ts.Debug.
|
|
21443
|
+
declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } },
|
|
21468
21444
|
declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } },
|
|
21469
21445
|
buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } }
|
|
21470
21446
|
});
|
|
@@ -42581,8 +42557,8 @@ var ts;
|
|
|
42581
42557
|
}
|
|
42582
42558
|
var expandedParams = getExpandedParameters(signature, true)[0];
|
|
42583
42559
|
var parameters = (ts.some(expandedParams, function (p) { return p !== expandedParams[expandedParams.length - 1] && !!(ts.getCheckFlags(p) & 32768); }) ? signature.parameters : expandedParams).map(function (parameter) { return symbolToParameterDeclaration(parameter, context, kind === 170, options === null || options === void 0 ? void 0 : options.privateSymbolVisitor, options === null || options === void 0 ? void 0 : options.bundledImports); });
|
|
42584
|
-
|
|
42585
|
-
|
|
42560
|
+
var thisParameter = tryGetThisParameterDeclaration(signature, context);
|
|
42561
|
+
if (thisParameter) {
|
|
42586
42562
|
parameters.unshift(thisParameter);
|
|
42587
42563
|
}
|
|
42588
42564
|
var returnTypeNode;
|
|
@@ -42631,6 +42607,17 @@ var ts;
|
|
|
42631
42607
|
}
|
|
42632
42608
|
return node;
|
|
42633
42609
|
}
|
|
42610
|
+
function tryGetThisParameterDeclaration(signature, context) {
|
|
42611
|
+
if (signature.thisParameter) {
|
|
42612
|
+
return symbolToParameterDeclaration(signature.thisParameter, context);
|
|
42613
|
+
}
|
|
42614
|
+
if (signature.declaration) {
|
|
42615
|
+
var thisTag = ts.getJSDocThisTag(signature.declaration);
|
|
42616
|
+
if (thisTag && thisTag.typeExpression) {
|
|
42617
|
+
return ts.factory.createParameterDeclaration(undefined, undefined, undefined, "this", undefined, typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context));
|
|
42618
|
+
}
|
|
42619
|
+
}
|
|
42620
|
+
}
|
|
42634
42621
|
function typeParameterToDeclarationWithConstraint(type, context, constraintNode) {
|
|
42635
42622
|
var savedContextFlags = context.flags;
|
|
42636
42623
|
context.flags &= ~512;
|
|
@@ -43041,10 +43028,8 @@ var ts;
|
|
|
43041
43028
|
firstChar = symbolName.charCodeAt(0);
|
|
43042
43029
|
}
|
|
43043
43030
|
var expression = void 0;
|
|
43044
|
-
if (ts.isSingleOrDoubleQuote(firstChar)) {
|
|
43045
|
-
expression = ts.factory.createStringLiteral(symbolName
|
|
43046
|
-
.substring(1, symbolName.length - 1)
|
|
43047
|
-
.replace(/\\./g, function (s) { return s.substring(1); }), firstChar === 39);
|
|
43031
|
+
if (ts.isSingleOrDoubleQuote(firstChar) && !(symbol.flags & 8)) {
|
|
43032
|
+
expression = ts.factory.createStringLiteral(ts.stripQuotes(symbolName).replace(/\\./g, function (s) { return s.substring(1); }), firstChar === 39);
|
|
43048
43033
|
}
|
|
43049
43034
|
else if (("" + +symbolName) === symbolName) {
|
|
43050
43035
|
expression = ts.factory.createNumericLiteral(+symbolName);
|
|
@@ -62119,7 +62104,7 @@ var ts;
|
|
|
62119
62104
|
typeArguments.pop();
|
|
62120
62105
|
}
|
|
62121
62106
|
while (typeArguments.length < typeParameters.length) {
|
|
62122
|
-
typeArguments.push(
|
|
62107
|
+
typeArguments.push(getConstraintOfTypeParameter(typeParameters[typeArguments.length]) || getDefaultTypeArgumentType(isJs));
|
|
62123
62108
|
}
|
|
62124
62109
|
return typeArguments;
|
|
62125
62110
|
}
|
|
@@ -69981,9 +69966,8 @@ var ts;
|
|
|
69981
69966
|
var enclosingFile = ts.getSourceFileOfNode(node);
|
|
69982
69967
|
var links = getNodeLinks(enclosingFile);
|
|
69983
69968
|
if (!(links.flags & 1)) {
|
|
69984
|
-
links.deferredNodes
|
|
69985
|
-
|
|
69986
|
-
links.deferredNodes.set(id, node);
|
|
69969
|
+
links.deferredNodes || (links.deferredNodes = new ts.Set());
|
|
69970
|
+
links.deferredNodes.add(node);
|
|
69987
69971
|
}
|
|
69988
69972
|
}
|
|
69989
69973
|
function checkDeferredNodes(context) {
|
|
@@ -76115,9 +76099,6 @@ var ts;
|
|
|
76115
76099
|
var innerExpression = ts.skipOuterExpressions(node.expression, ~6);
|
|
76116
76100
|
if (ts.isAssertionExpression(innerExpression)) {
|
|
76117
76101
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
76118
|
-
if (ts.length(ts.getLeadingCommentRangesOfNode(expression, currentSourceFile))) {
|
|
76119
|
-
return factory.updateParenthesizedExpression(node, expression);
|
|
76120
|
-
}
|
|
76121
76102
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
76122
76103
|
}
|
|
76123
76104
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -78595,7 +78576,7 @@ var ts;
|
|
|
78595
78576
|
function visitYieldExpression(node) {
|
|
78596
78577
|
if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
|
|
78597
78578
|
if (node.asteriskToken) {
|
|
78598
|
-
var expression = ts.visitNode(ts.Debug.
|
|
78579
|
+
var expression = ts.visitNode(ts.Debug.checkDefined(node.expression), visitor, ts.isExpression);
|
|
78599
78580
|
return ts.setOriginalNode(ts.setTextRange(factory.createYieldExpression(undefined, emitHelpers().createAwaitHelper(factory.updateYieldExpression(node, node.asteriskToken, ts.setTextRange(emitHelpers().createAsyncDelegatorHelper(ts.setTextRange(emitHelpers().createAsyncValuesHelper(expression), expression)), expression)))), node), node);
|
|
78600
78581
|
}
|
|
78601
78582
|
return ts.setOriginalNode(ts.setTextRange(factory.createYieldExpression(undefined, createDownlevelAwait(node.expression
|
|
@@ -79217,11 +79198,11 @@ var ts;
|
|
|
79217
79198
|
}
|
|
79218
79199
|
function visitOptionalExpression(node, captureThisArg, isDelete) {
|
|
79219
79200
|
var _a = flattenChain(node), expression = _a.expression, chain = _a.chain;
|
|
79220
|
-
var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0]), false);
|
|
79201
|
+
var left = visitNonOptionalExpression(ts.skipPartiallyEmittedExpressions(expression), ts.isCallChain(chain[0]), false);
|
|
79221
79202
|
var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined;
|
|
79222
|
-
var
|
|
79223
|
-
var
|
|
79224
|
-
if (!ts.isSimpleCopiableExpression(
|
|
79203
|
+
var capturedLeft = ts.isSyntheticReference(left) ? left.expression : left;
|
|
79204
|
+
var leftExpression = factory.restoreOuterExpressions(expression, capturedLeft, 8);
|
|
79205
|
+
if (!ts.isSimpleCopiableExpression(capturedLeft)) {
|
|
79225
79206
|
capturedLeft = factory.createTempVariable(hoistVariableDeclaration);
|
|
79226
79207
|
leftExpression = factory.createAssignment(capturedLeft, leftExpression);
|
|
79227
79208
|
}
|
|
@@ -79247,6 +79228,10 @@ var ts;
|
|
|
79247
79228
|
break;
|
|
79248
79229
|
case 207:
|
|
79249
79230
|
if (i === 0 && leftThisArg) {
|
|
79231
|
+
if (!ts.isGeneratedIdentifier(leftThisArg)) {
|
|
79232
|
+
leftThisArg = factory.cloneNode(leftThisArg);
|
|
79233
|
+
ts.addEmitFlags(leftThisArg, 1536);
|
|
79234
|
+
}
|
|
79250
79235
|
rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 106 ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
|
|
79251
79236
|
}
|
|
79252
79237
|
else {
|
|
@@ -79393,11 +79378,11 @@ var ts;
|
|
|
79393
79378
|
return existing.name;
|
|
79394
79379
|
}
|
|
79395
79380
|
if (!currentFileState.utilizedImplicitRuntimeImports) {
|
|
79396
|
-
currentFileState.utilizedImplicitRuntimeImports = ts.
|
|
79381
|
+
currentFileState.utilizedImplicitRuntimeImports = new ts.Map();
|
|
79397
79382
|
}
|
|
79398
79383
|
var specifierSourceImports = currentFileState.utilizedImplicitRuntimeImports.get(importSource);
|
|
79399
79384
|
if (!specifierSourceImports) {
|
|
79400
|
-
specifierSourceImports = ts.
|
|
79385
|
+
specifierSourceImports = new ts.Map();
|
|
79401
79386
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
79402
79387
|
}
|
|
79403
79388
|
var generatedName = factory.createUniqueName("_" + name, 16 | 32 | 64);
|
|
@@ -90172,7 +90157,7 @@ var ts;
|
|
|
90172
90157
|
function emitYieldExpression(node) {
|
|
90173
90158
|
emitTokenWithComment(125, node.pos, writeKeyword, node);
|
|
90174
90159
|
emit(node.asteriskToken);
|
|
90175
|
-
emitExpressionWithLeadingSpace(node.expression
|
|
90160
|
+
emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma);
|
|
90176
90161
|
}
|
|
90177
90162
|
function emitSpreadElement(node) {
|
|
90178
90163
|
emitTokenWithComment(25, node.pos, writePunctuation, node);
|
|
@@ -90359,9 +90344,44 @@ var ts;
|
|
|
90359
90344
|
}
|
|
90360
90345
|
return pos;
|
|
90361
90346
|
}
|
|
90347
|
+
function commentWillEmitNewLine(node) {
|
|
90348
|
+
return node.kind === 2 || !!node.hasTrailingNewLine;
|
|
90349
|
+
}
|
|
90350
|
+
function willEmitLeadingNewLine(node) {
|
|
90351
|
+
if (!currentSourceFile)
|
|
90352
|
+
return false;
|
|
90353
|
+
if (ts.some(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), commentWillEmitNewLine))
|
|
90354
|
+
return true;
|
|
90355
|
+
if (ts.some(ts.getSyntheticLeadingComments(node), commentWillEmitNewLine))
|
|
90356
|
+
return true;
|
|
90357
|
+
if (ts.isPartiallyEmittedExpression(node)) {
|
|
90358
|
+
if (node.pos !== node.expression.pos) {
|
|
90359
|
+
if (ts.some(ts.getTrailingCommentRanges(currentSourceFile.text, node.expression.pos), commentWillEmitNewLine))
|
|
90360
|
+
return true;
|
|
90361
|
+
}
|
|
90362
|
+
return willEmitLeadingNewLine(node.expression);
|
|
90363
|
+
}
|
|
90364
|
+
return false;
|
|
90365
|
+
}
|
|
90366
|
+
function parenthesizeExpressionForNoAsi(node) {
|
|
90367
|
+
if (!commentsDisabled && ts.isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) {
|
|
90368
|
+
var parseNode = ts.getParseTreeNode(node);
|
|
90369
|
+
if (parseNode && ts.isParenthesizedExpression(parseNode)) {
|
|
90370
|
+
var parens = ts.factory.createParenthesizedExpression(node.expression);
|
|
90371
|
+
ts.setOriginalNode(parens, node);
|
|
90372
|
+
ts.setTextRange(parens, parseNode);
|
|
90373
|
+
return parens;
|
|
90374
|
+
}
|
|
90375
|
+
return ts.factory.createParenthesizedExpression(node);
|
|
90376
|
+
}
|
|
90377
|
+
return node;
|
|
90378
|
+
}
|
|
90379
|
+
function parenthesizeExpressionForNoAsiAndDisallowedComma(node) {
|
|
90380
|
+
return parenthesizeExpressionForNoAsi(parenthesizer.parenthesizeExpressionForDisallowedComma(node));
|
|
90381
|
+
}
|
|
90362
90382
|
function emitReturnStatement(node) {
|
|
90363
90383
|
emitTokenWithComment(105, node.pos, writeKeyword, node);
|
|
90364
|
-
emitExpressionWithLeadingSpace(node.expression);
|
|
90384
|
+
emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
|
|
90365
90385
|
writeTrailingSemicolon();
|
|
90366
90386
|
}
|
|
90367
90387
|
function emitWithStatement(node) {
|
|
@@ -90389,7 +90409,7 @@ var ts;
|
|
|
90389
90409
|
}
|
|
90390
90410
|
function emitThrowStatement(node) {
|
|
90391
90411
|
emitTokenWithComment(109, node.pos, writeKeyword, node);
|
|
90392
|
-
emitExpressionWithLeadingSpace(node.expression);
|
|
90412
|
+
emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
|
|
90393
90413
|
writeTrailingSemicolon();
|
|
90394
90414
|
}
|
|
90395
90415
|
function emitTryStatement(node) {
|
|
@@ -91189,7 +91209,14 @@ var ts;
|
|
|
91189
91209
|
popNameGenerationScope(node);
|
|
91190
91210
|
}
|
|
91191
91211
|
function emitPartiallyEmittedExpression(node) {
|
|
91212
|
+
var emitFlags = ts.getEmitFlags(node);
|
|
91213
|
+
if (!(emitFlags & 512) && node.pos !== node.expression.pos) {
|
|
91214
|
+
emitTrailingCommentsOfPosition(node.expression.pos);
|
|
91215
|
+
}
|
|
91192
91216
|
emitExpression(node.expression);
|
|
91217
|
+
if (!(emitFlags & 1024) && node.end !== node.expression.end) {
|
|
91218
|
+
emitLeadingCommentsOfPosition(node.expression.end);
|
|
91219
|
+
}
|
|
91193
91220
|
}
|
|
91194
91221
|
function emitCommaList(node) {
|
|
91195
91222
|
emitExpressionList(node, node.elements, 528, undefined);
|
|
@@ -91528,10 +91555,8 @@ var ts;
|
|
|
91528
91555
|
}
|
|
91529
91556
|
previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
|
|
91530
91557
|
if (shouldEmitInterveningComments) {
|
|
91531
|
-
|
|
91532
|
-
|
|
91533
|
-
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
91534
|
-
}
|
|
91558
|
+
var commentRange = ts.getCommentRange(child);
|
|
91559
|
+
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
91535
91560
|
}
|
|
91536
91561
|
else {
|
|
91537
91562
|
shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
@@ -93675,6 +93700,23 @@ var ts;
|
|
|
93675
93700
|
}
|
|
93676
93701
|
}
|
|
93677
93702
|
ts.getImpliedNodeFormatForFile = getImpliedNodeFormatForFile;
|
|
93703
|
+
ts.plainJSErrors = new ts.Set([
|
|
93704
|
+
ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
|
|
93705
|
+
ts.Diagnostics.A_module_cannot_have_multiple_default_exports.code,
|
|
93706
|
+
ts.Diagnostics.Another_export_default_is_here.code,
|
|
93707
|
+
ts.Diagnostics.The_first_export_default_is_here.code,
|
|
93708
|
+
ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,
|
|
93709
|
+
ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,
|
|
93710
|
+
ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,
|
|
93711
|
+
ts.Diagnostics.constructor_is_a_reserved_word.code,
|
|
93712
|
+
ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,
|
|
93713
|
+
ts.Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,
|
|
93714
|
+
ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,
|
|
93715
|
+
ts.Diagnostics.Invalid_use_of_0_in_strict_mode.code,
|
|
93716
|
+
ts.Diagnostics.A_label_is_not_allowed_here.code,
|
|
93717
|
+
ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode.code,
|
|
93718
|
+
ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode.code,
|
|
93719
|
+
]);
|
|
93678
93720
|
function shouldProgramCreateNewSourceFiles(program, newOptions) {
|
|
93679
93721
|
if (!program)
|
|
93680
93722
|
return false;
|
|
@@ -94217,6 +94259,7 @@ var ts;
|
|
|
94217
94259
|
newSourceFile.originalFileName = oldSourceFile.originalFileName;
|
|
94218
94260
|
newSourceFile.resolvedPath = oldSourceFile.resolvedPath;
|
|
94219
94261
|
newSourceFile.fileName = oldSourceFile.fileName;
|
|
94262
|
+
newSourceFile.impliedNodeFormat = oldSourceFile.impliedNodeFormat;
|
|
94220
94263
|
var packageName = oldProgram.sourceFileToPackageName.get(oldSourceFile.path);
|
|
94221
94264
|
if (packageName !== undefined) {
|
|
94222
94265
|
var prevKind = seenPackageNames.get(packageName);
|
|
@@ -94521,13 +94564,18 @@ var ts;
|
|
|
94521
94564
|
}
|
|
94522
94565
|
var typeChecker = getDiagnosticsProducingTypeChecker();
|
|
94523
94566
|
ts.Debug.assert(!!sourceFile.bindDiagnostics);
|
|
94524
|
-
var
|
|
94567
|
+
var isJs = sourceFile.scriptKind === 1 || sourceFile.scriptKind === 2;
|
|
94568
|
+
var isCheckJs = isJs && ts.isCheckJsEnabledForFile(sourceFile, options);
|
|
94569
|
+
var isPlainJs = isJs && !sourceFile.checkJsDirective && options.checkJs === undefined;
|
|
94525
94570
|
var isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false;
|
|
94526
94571
|
var includeBindAndCheckDiagnostics = !isTsNoCheck && (sourceFile.scriptKind === 3 || sourceFile.scriptKind === 4
|
|
94527
|
-
|| sourceFile.scriptKind === 5 || isCheckJs || sourceFile.scriptKind === 7);
|
|
94572
|
+
|| sourceFile.scriptKind === 5 || isPlainJs || isCheckJs || sourceFile.scriptKind === 7);
|
|
94528
94573
|
var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : ts.emptyArray;
|
|
94529
|
-
var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : ts.emptyArray;
|
|
94530
|
-
|
|
94574
|
+
var checkDiagnostics = includeBindAndCheckDiagnostics && !isPlainJs ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : ts.emptyArray;
|
|
94575
|
+
if (isPlainJs) {
|
|
94576
|
+
bindDiagnostics = ts.filter(bindDiagnostics, function (d) { return ts.plainJSErrors.has(d.code); });
|
|
94577
|
+
}
|
|
94578
|
+
return getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics && !isPlainJs, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : undefined);
|
|
94531
94579
|
});
|
|
94532
94580
|
}
|
|
94533
94581
|
function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics) {
|
|
@@ -97910,7 +97958,7 @@ var ts;
|
|
|
97910
97958
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
97911
97959
|
if (resolution.refCount) {
|
|
97912
97960
|
resolution.refCount++;
|
|
97913
|
-
ts.Debug.
|
|
97961
|
+
ts.Debug.assertIsDefined(resolution.files);
|
|
97914
97962
|
}
|
|
97915
97963
|
else {
|
|
97916
97964
|
resolution.refCount = 1;
|
|
@@ -97975,7 +98023,7 @@ var ts;
|
|
|
97975
98023
|
}
|
|
97976
98024
|
}
|
|
97977
98025
|
function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) {
|
|
97978
|
-
ts.unorderedRemoveItem(ts.Debug.
|
|
98026
|
+
ts.unorderedRemoveItem(ts.Debug.checkDefined(resolution.files), filePath);
|
|
97979
98027
|
resolution.refCount--;
|
|
97980
98028
|
if (resolution.refCount) {
|
|
97981
98029
|
return;
|
|
@@ -98061,7 +98109,7 @@ var ts;
|
|
|
98061
98109
|
if (resolution.isInvalidated || !canInvalidate(resolution))
|
|
98062
98110
|
continue;
|
|
98063
98111
|
resolution.isInvalidated = invalidated = true;
|
|
98064
|
-
for (var _a = 0, _b = ts.Debug.
|
|
98112
|
+
for (var _a = 0, _b = ts.Debug.checkDefined(resolution.files); _a < _b.length; _a++) {
|
|
98065
98113
|
var containingFilePath = _b[_a];
|
|
98066
98114
|
(filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = new ts.Set())).add(containingFilePath);
|
|
98067
98115
|
hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || ts.endsWith(containingFilePath, ts.inferredTypesContainingFile);
|