typescript 4.8.1-rc → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +125 -145
- package/lib/tsserver.js +132 -150
- package/lib/tsserverlibrary.d.ts +61 -117
- package/lib/tsserverlibrary.js +132 -150
- package/lib/typescript.d.ts +61 -117
- package/lib/typescript.js +132 -150
- package/lib/typescriptServices.d.ts +61 -117
- package/lib/typescriptServices.js +132 -150
- package/lib/typingsInstaller.js +127 -145
- package/package.json +1 -1
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.8";
|
|
72
|
-
ts.version = "4.8.
|
|
72
|
+
ts.version = "4.8.2";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -2071,6 +2071,7 @@ var ts;
|
|
|
2071
2071
|
var currentAssertionLevel = 0;
|
|
2072
2072
|
Debug.currentLogLevel = LogLevel.Warning;
|
|
2073
2073
|
Debug.isDebugging = false;
|
|
2074
|
+
Debug.enableDeprecationWarnings = true;
|
|
2074
2075
|
function getTypeScriptVersion() {
|
|
2075
2076
|
return typeScriptVersion !== null && typeScriptVersion !== void 0 ? typeScriptVersion : (typeScriptVersion = new ts.Version(ts.version));
|
|
2076
2077
|
}
|
|
@@ -2655,7 +2656,7 @@ var ts;
|
|
|
2655
2656
|
function createWarningDeprecation(name, errorAfter, since, message) {
|
|
2656
2657
|
var hasWrittenDeprecation = false;
|
|
2657
2658
|
return function () {
|
|
2658
|
-
if (!hasWrittenDeprecation) {
|
|
2659
|
+
if (Debug.enableDeprecationWarnings && !hasWrittenDeprecation) {
|
|
2659
2660
|
log.warn(formatDeprecationMessage(name, false, errorAfter, since, message));
|
|
2660
2661
|
hasWrittenDeprecation = true;
|
|
2661
2662
|
}
|
|
@@ -4424,7 +4425,6 @@ var ts;
|
|
|
4424
4425
|
ts.sys = (function () {
|
|
4425
4426
|
var byteOrderMarkIndicator = "\uFEFF";
|
|
4426
4427
|
function getNodeSystem() {
|
|
4427
|
-
var _a;
|
|
4428
4428
|
var nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/;
|
|
4429
4429
|
var _fs = require("fs");
|
|
4430
4430
|
var _path = require("path");
|
|
@@ -4433,7 +4433,7 @@ var ts;
|
|
|
4433
4433
|
try {
|
|
4434
4434
|
_crypto = require("crypto");
|
|
4435
4435
|
}
|
|
4436
|
-
catch (
|
|
4436
|
+
catch (_a) {
|
|
4437
4437
|
_crypto = undefined;
|
|
4438
4438
|
}
|
|
4439
4439
|
var activeSession;
|
|
@@ -4444,10 +4444,10 @@ var ts;
|
|
|
4444
4444
|
var isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
4445
4445
|
var platform = _os.platform();
|
|
4446
4446
|
var useCaseSensitiveFileNames = isFileSystemCaseSensitive();
|
|
4447
|
-
var
|
|
4447
|
+
var fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
4448
4448
|
var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
|
|
4449
4449
|
var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
|
|
4450
|
-
var
|
|
4450
|
+
var _b = createSystemWatchFunctions({
|
|
4451
4451
|
pollingWatchFile: createSingleFileWatcherPerName(fsWatchFileWorker, useCaseSensitiveFileNames),
|
|
4452
4452
|
getModifiedTime: getModifiedTime,
|
|
4453
4453
|
setTimeout: setTimeout,
|
|
@@ -4465,7 +4465,7 @@ var ts;
|
|
|
4465
4465
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
4466
4466
|
inodeWatching: isLinuxOrMacOs,
|
|
4467
4467
|
sysLog: sysLog,
|
|
4468
|
-
}), watchFile =
|
|
4468
|
+
}), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
|
|
4469
4469
|
var nodeSystem = {
|
|
4470
4470
|
args: process.argv.slice(2),
|
|
4471
4471
|
newLine: _os.EOL,
|
|
@@ -4815,9 +4815,12 @@ var ts;
|
|
|
4815
4815
|
function getDirectories(path) {
|
|
4816
4816
|
return getAccessibleFileSystemEntries(path).directories.slice();
|
|
4817
4817
|
}
|
|
4818
|
+
function fsRealPathHandlingLongPath(path) {
|
|
4819
|
+
return path.length < 260 ? _fs.realpathSync.native(path) : _fs.realpathSync(path);
|
|
4820
|
+
}
|
|
4818
4821
|
function realpath(path) {
|
|
4819
4822
|
try {
|
|
4820
|
-
return
|
|
4823
|
+
return fsRealpath(path);
|
|
4821
4824
|
}
|
|
4822
4825
|
catch (_a) {
|
|
4823
4826
|
return path;
|
|
@@ -17025,7 +17028,7 @@ var ts;
|
|
|
17025
17028
|
case 165: {
|
|
17026
17029
|
var parent_2 = node.parent;
|
|
17027
17030
|
return ts.canHaveDecorators(parent_2) ? parent_2.modifiers :
|
|
17028
|
-
ts.canHaveIllegalDecorators(parent_2) ? parent_2.
|
|
17031
|
+
ts.canHaveIllegalDecorators(parent_2) ? parent_2.illegalDecorators :
|
|
17029
17032
|
undefined;
|
|
17030
17033
|
}
|
|
17031
17034
|
case 291:
|
|
@@ -18726,7 +18729,7 @@ var ts;
|
|
|
18726
18729
|
var node = createBaseGenericNamedDeclaration(170, undefined, undefined, undefined);
|
|
18727
18730
|
node.body = body;
|
|
18728
18731
|
node.transformFlags = propagateChildFlags(body) | 16777216;
|
|
18729
|
-
node.
|
|
18732
|
+
node.illegalDecorators = undefined;
|
|
18730
18733
|
node.modifiers = undefined;
|
|
18731
18734
|
return node;
|
|
18732
18735
|
}
|
|
@@ -18737,7 +18740,7 @@ var ts;
|
|
|
18737
18740
|
}
|
|
18738
18741
|
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
18739
18742
|
if (updated !== original) {
|
|
18740
|
-
updated.
|
|
18743
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
18741
18744
|
updated.modifiers = original.modifiers;
|
|
18742
18745
|
}
|
|
18743
18746
|
return update(updated, original);
|
|
@@ -18745,7 +18748,7 @@ var ts;
|
|
|
18745
18748
|
function createConstructorDeclaration(modifiers, parameters, body) {
|
|
18746
18749
|
var node = createBaseFunctionLikeDeclaration(171, modifiers, undefined, undefined, parameters, undefined, body);
|
|
18747
18750
|
node.transformFlags |= 1024;
|
|
18748
|
-
node.
|
|
18751
|
+
node.illegalDecorators = undefined;
|
|
18749
18752
|
node.typeParameters = undefined;
|
|
18750
18753
|
node.type = undefined;
|
|
18751
18754
|
return node;
|
|
@@ -18759,7 +18762,7 @@ var ts;
|
|
|
18759
18762
|
}
|
|
18760
18763
|
function finishUpdateConstructorDeclaration(updated, original) {
|
|
18761
18764
|
if (updated !== original) {
|
|
18762
|
-
updated.
|
|
18765
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
18763
18766
|
updated.typeParameters = original.typeParameters;
|
|
18764
18767
|
updated.type = original.type;
|
|
18765
18768
|
}
|
|
@@ -20274,7 +20277,7 @@ var ts;
|
|
|
20274
20277
|
node.transformFlags |= 2048;
|
|
20275
20278
|
}
|
|
20276
20279
|
}
|
|
20277
|
-
node.
|
|
20280
|
+
node.illegalDecorators = undefined;
|
|
20278
20281
|
return node;
|
|
20279
20282
|
}
|
|
20280
20283
|
function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
@@ -20290,7 +20293,7 @@ var ts;
|
|
|
20290
20293
|
}
|
|
20291
20294
|
function finishUpdateFunctionDeclaration(updated, original) {
|
|
20292
20295
|
if (updated !== original) {
|
|
20293
|
-
updated.
|
|
20296
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20294
20297
|
}
|
|
20295
20298
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
20296
20299
|
}
|
|
@@ -20320,7 +20323,7 @@ var ts;
|
|
|
20320
20323
|
var node = createBaseInterfaceOrClassLikeDeclaration(258, modifiers, name, typeParameters, heritageClauses);
|
|
20321
20324
|
node.members = createNodeArray(members);
|
|
20322
20325
|
node.transformFlags = 1;
|
|
20323
|
-
node.
|
|
20326
|
+
node.illegalDecorators = undefined;
|
|
20324
20327
|
return node;
|
|
20325
20328
|
}
|
|
20326
20329
|
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -20334,7 +20337,7 @@ var ts;
|
|
|
20334
20337
|
}
|
|
20335
20338
|
function finishUpdateInterfaceDeclaration(updated, original) {
|
|
20336
20339
|
if (updated !== original) {
|
|
20337
|
-
updated.
|
|
20340
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20338
20341
|
}
|
|
20339
20342
|
return update(updated, original);
|
|
20340
20343
|
}
|
|
@@ -20342,7 +20345,7 @@ var ts;
|
|
|
20342
20345
|
var node = createBaseGenericNamedDeclaration(259, modifiers, name, typeParameters);
|
|
20343
20346
|
node.type = type;
|
|
20344
20347
|
node.transformFlags = 1;
|
|
20345
|
-
node.
|
|
20348
|
+
node.illegalDecorators = undefined;
|
|
20346
20349
|
return node;
|
|
20347
20350
|
}
|
|
20348
20351
|
function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
|
|
@@ -20355,7 +20358,7 @@ var ts;
|
|
|
20355
20358
|
}
|
|
20356
20359
|
function finishUpdateTypeAliasDeclaration(updated, original) {
|
|
20357
20360
|
if (updated !== original) {
|
|
20358
|
-
updated.
|
|
20361
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20359
20362
|
}
|
|
20360
20363
|
return update(updated, original);
|
|
20361
20364
|
}
|
|
@@ -20366,7 +20369,7 @@ var ts;
|
|
|
20366
20369
|
propagateChildrenFlags(node.members) |
|
|
20367
20370
|
1;
|
|
20368
20371
|
node.transformFlags &= ~67108864;
|
|
20369
|
-
node.
|
|
20372
|
+
node.illegalDecorators = undefined;
|
|
20370
20373
|
return node;
|
|
20371
20374
|
}
|
|
20372
20375
|
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
@@ -20378,7 +20381,7 @@ var ts;
|
|
|
20378
20381
|
}
|
|
20379
20382
|
function finishUpdateEnumDeclaration(updated, original) {
|
|
20380
20383
|
if (updated !== original) {
|
|
20381
|
-
updated.
|
|
20384
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20382
20385
|
}
|
|
20383
20386
|
return update(updated, original);
|
|
20384
20387
|
}
|
|
@@ -20400,7 +20403,7 @@ var ts;
|
|
|
20400
20403
|
1;
|
|
20401
20404
|
}
|
|
20402
20405
|
node.transformFlags &= ~67108864;
|
|
20403
|
-
node.
|
|
20406
|
+
node.illegalDecorators = undefined;
|
|
20404
20407
|
return node;
|
|
20405
20408
|
}
|
|
20406
20409
|
function updateModuleDeclaration(node, modifiers, name, body) {
|
|
@@ -20412,7 +20415,7 @@ var ts;
|
|
|
20412
20415
|
}
|
|
20413
20416
|
function finishUpdateModuleDeclaration(updated, original) {
|
|
20414
20417
|
if (updated !== original) {
|
|
20415
|
-
updated.
|
|
20418
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20416
20419
|
}
|
|
20417
20420
|
return update(updated, original);
|
|
20418
20421
|
}
|
|
@@ -20441,7 +20444,7 @@ var ts;
|
|
|
20441
20444
|
function createNamespaceExportDeclaration(name) {
|
|
20442
20445
|
var node = createBaseNamedDeclaration(264, undefined, name);
|
|
20443
20446
|
node.transformFlags = 1;
|
|
20444
|
-
node.
|
|
20447
|
+
node.illegalDecorators = undefined;
|
|
20445
20448
|
node.modifiers = undefined;
|
|
20446
20449
|
return node;
|
|
20447
20450
|
}
|
|
@@ -20452,7 +20455,7 @@ var ts;
|
|
|
20452
20455
|
}
|
|
20453
20456
|
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
20454
20457
|
if (updated !== original) {
|
|
20455
|
-
updated.
|
|
20458
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20456
20459
|
updated.modifiers = original.modifiers;
|
|
20457
20460
|
}
|
|
20458
20461
|
return update(updated, original);
|
|
@@ -20465,7 +20468,7 @@ var ts;
|
|
|
20465
20468
|
if (!ts.isExternalModuleReference(node.moduleReference))
|
|
20466
20469
|
node.transformFlags |= 1;
|
|
20467
20470
|
node.transformFlags &= ~67108864;
|
|
20468
|
-
node.
|
|
20471
|
+
node.illegalDecorators = undefined;
|
|
20469
20472
|
return node;
|
|
20470
20473
|
}
|
|
20471
20474
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
@@ -20478,7 +20481,7 @@ var ts;
|
|
|
20478
20481
|
}
|
|
20479
20482
|
function finishUpdateImportEqualsDeclaration(updated, original) {
|
|
20480
20483
|
if (updated !== original) {
|
|
20481
|
-
updated.
|
|
20484
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20482
20485
|
}
|
|
20483
20486
|
return update(updated, original);
|
|
20484
20487
|
}
|
|
@@ -20492,7 +20495,7 @@ var ts;
|
|
|
20492
20495
|
propagateChildFlags(node.importClause) |
|
|
20493
20496
|
propagateChildFlags(node.moduleSpecifier);
|
|
20494
20497
|
node.transformFlags &= ~67108864;
|
|
20495
|
-
node.
|
|
20498
|
+
node.illegalDecorators = undefined;
|
|
20496
20499
|
return node;
|
|
20497
20500
|
}
|
|
20498
20501
|
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
@@ -20505,7 +20508,7 @@ var ts;
|
|
|
20505
20508
|
}
|
|
20506
20509
|
function finishUpdateImportDeclaration(updated, original) {
|
|
20507
20510
|
if (updated !== original) {
|
|
20508
|
-
updated.
|
|
20511
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20509
20512
|
}
|
|
20510
20513
|
return update(updated, original);
|
|
20511
20514
|
}
|
|
@@ -20633,7 +20636,7 @@ var ts;
|
|
|
20633
20636
|
: parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);
|
|
20634
20637
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
20635
20638
|
node.transformFlags &= ~67108864;
|
|
20636
|
-
node.
|
|
20639
|
+
node.illegalDecorators = undefined;
|
|
20637
20640
|
return node;
|
|
20638
20641
|
}
|
|
20639
20642
|
function updateExportAssignment(node, modifiers, expression) {
|
|
@@ -20644,7 +20647,7 @@ var ts;
|
|
|
20644
20647
|
}
|
|
20645
20648
|
function finishUpdateExportAssignment(updated, original) {
|
|
20646
20649
|
if (updated !== original) {
|
|
20647
|
-
updated.
|
|
20650
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20648
20651
|
}
|
|
20649
20652
|
return update(updated, original);
|
|
20650
20653
|
}
|
|
@@ -20660,7 +20663,7 @@ var ts;
|
|
|
20660
20663
|
propagateChildFlags(node.exportClause) |
|
|
20661
20664
|
propagateChildFlags(node.moduleSpecifier);
|
|
20662
20665
|
node.transformFlags &= ~67108864;
|
|
20663
|
-
node.
|
|
20666
|
+
node.illegalDecorators = undefined;
|
|
20664
20667
|
return node;
|
|
20665
20668
|
}
|
|
20666
20669
|
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
@@ -20674,7 +20677,7 @@ var ts;
|
|
|
20674
20677
|
}
|
|
20675
20678
|
function finishUpdateExportDeclaration(updated, original) {
|
|
20676
20679
|
if (updated !== original) {
|
|
20677
|
-
updated.
|
|
20680
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
20678
20681
|
}
|
|
20679
20682
|
return update(updated, original);
|
|
20680
20683
|
}
|
|
@@ -21293,7 +21296,7 @@ var ts;
|
|
|
21293
21296
|
node.transformFlags |=
|
|
21294
21297
|
propagateChildFlags(node.name) |
|
|
21295
21298
|
propagateChildFlags(node.initializer);
|
|
21296
|
-
node.
|
|
21299
|
+
node.illegalDecorators = undefined;
|
|
21297
21300
|
node.modifiers = undefined;
|
|
21298
21301
|
node.questionToken = undefined;
|
|
21299
21302
|
node.exclamationToken = undefined;
|
|
@@ -21307,7 +21310,7 @@ var ts;
|
|
|
21307
21310
|
}
|
|
21308
21311
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
21309
21312
|
if (updated !== original) {
|
|
21310
|
-
updated.
|
|
21313
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
21311
21314
|
updated.modifiers = original.modifiers;
|
|
21312
21315
|
updated.questionToken = original.questionToken;
|
|
21313
21316
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -21321,7 +21324,7 @@ var ts;
|
|
|
21321
21324
|
propagateChildFlags(node.objectAssignmentInitializer) |
|
|
21322
21325
|
1024;
|
|
21323
21326
|
node.equalsToken = undefined;
|
|
21324
|
-
node.
|
|
21327
|
+
node.illegalDecorators = undefined;
|
|
21325
21328
|
node.modifiers = undefined;
|
|
21326
21329
|
node.questionToken = undefined;
|
|
21327
21330
|
node.exclamationToken = undefined;
|
|
@@ -21336,7 +21339,7 @@ var ts;
|
|
|
21336
21339
|
function finishUpdateShorthandPropertyAssignment(updated, original) {
|
|
21337
21340
|
if (updated !== original) {
|
|
21338
21341
|
updated.equalsToken = original.equalsToken;
|
|
21339
|
-
updated.
|
|
21342
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
21340
21343
|
updated.modifiers = original.modifiers;
|
|
21341
21344
|
updated.questionToken = original.questionToken;
|
|
21342
21345
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -24529,17 +24532,6 @@ var ts;
|
|
|
24529
24532
|
|| kind === 173;
|
|
24530
24533
|
}
|
|
24531
24534
|
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
24532
|
-
function canHaveDecorators(node) {
|
|
24533
|
-
var kind = node.kind;
|
|
24534
|
-
return kind === 164
|
|
24535
|
-
|| kind === 167
|
|
24536
|
-
|| kind === 169
|
|
24537
|
-
|| kind === 172
|
|
24538
|
-
|| kind === 173
|
|
24539
|
-
|| kind === 226
|
|
24540
|
-
|| kind === 257;
|
|
24541
|
-
}
|
|
24542
|
-
ts.canHaveDecorators = canHaveDecorators;
|
|
24543
24535
|
function canHaveIllegalDecorators(node) {
|
|
24544
24536
|
var kind = node.kind;
|
|
24545
24537
|
return kind === 296
|
|
@@ -24561,35 +24553,6 @@ var ts;
|
|
|
24561
24553
|
|| kind === 271;
|
|
24562
24554
|
}
|
|
24563
24555
|
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
24564
|
-
function canHaveModifiers(node) {
|
|
24565
|
-
var kind = node.kind;
|
|
24566
|
-
return kind === 163
|
|
24567
|
-
|| kind === 164
|
|
24568
|
-
|| kind === 166
|
|
24569
|
-
|| kind === 167
|
|
24570
|
-
|| kind === 168
|
|
24571
|
-
|| kind === 169
|
|
24572
|
-
|| kind === 171
|
|
24573
|
-
|| kind === 172
|
|
24574
|
-
|| kind === 173
|
|
24575
|
-
|| kind === 176
|
|
24576
|
-
|| kind === 180
|
|
24577
|
-
|| kind === 213
|
|
24578
|
-
|| kind === 214
|
|
24579
|
-
|| kind === 226
|
|
24580
|
-
|| kind === 237
|
|
24581
|
-
|| kind === 256
|
|
24582
|
-
|| kind === 257
|
|
24583
|
-
|| kind === 258
|
|
24584
|
-
|| kind === 259
|
|
24585
|
-
|| kind === 260
|
|
24586
|
-
|| kind === 261
|
|
24587
|
-
|| kind === 265
|
|
24588
|
-
|| kind === 266
|
|
24589
|
-
|| kind === 271
|
|
24590
|
-
|| kind === 272;
|
|
24591
|
-
}
|
|
24592
|
-
ts.canHaveModifiers = canHaveModifiers;
|
|
24593
24556
|
function canHaveIllegalModifiers(node) {
|
|
24594
24557
|
var kind = node.kind;
|
|
24595
24558
|
return kind === 170
|
|
@@ -24837,6 +24800,46 @@ var ts;
|
|
|
24837
24800
|
return location ? ts.setTextRangePosEnd(range, location.pos, location.end) : range;
|
|
24838
24801
|
}
|
|
24839
24802
|
ts.setTextRange = setTextRange;
|
|
24803
|
+
function canHaveModifiers(node) {
|
|
24804
|
+
var kind = node.kind;
|
|
24805
|
+
return kind === 163
|
|
24806
|
+
|| kind === 164
|
|
24807
|
+
|| kind === 166
|
|
24808
|
+
|| kind === 167
|
|
24809
|
+
|| kind === 168
|
|
24810
|
+
|| kind === 169
|
|
24811
|
+
|| kind === 171
|
|
24812
|
+
|| kind === 172
|
|
24813
|
+
|| kind === 173
|
|
24814
|
+
|| kind === 176
|
|
24815
|
+
|| kind === 180
|
|
24816
|
+
|| kind === 213
|
|
24817
|
+
|| kind === 214
|
|
24818
|
+
|| kind === 226
|
|
24819
|
+
|| kind === 237
|
|
24820
|
+
|| kind === 256
|
|
24821
|
+
|| kind === 257
|
|
24822
|
+
|| kind === 258
|
|
24823
|
+
|| kind === 259
|
|
24824
|
+
|| kind === 260
|
|
24825
|
+
|| kind === 261
|
|
24826
|
+
|| kind === 265
|
|
24827
|
+
|| kind === 266
|
|
24828
|
+
|| kind === 271
|
|
24829
|
+
|| kind === 272;
|
|
24830
|
+
}
|
|
24831
|
+
ts.canHaveModifiers = canHaveModifiers;
|
|
24832
|
+
function canHaveDecorators(node) {
|
|
24833
|
+
var kind = node.kind;
|
|
24834
|
+
return kind === 164
|
|
24835
|
+
|| kind === 167
|
|
24836
|
+
|| kind === 169
|
|
24837
|
+
|| kind === 172
|
|
24838
|
+
|| kind === 173
|
|
24839
|
+
|| kind === 226
|
|
24840
|
+
|| kind === 257;
|
|
24841
|
+
}
|
|
24842
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
24840
24843
|
})(ts || (ts = {}));
|
|
24841
24844
|
var ts;
|
|
24842
24845
|
(function (ts) {
|
|
@@ -24917,7 +24920,7 @@ var ts;
|
|
|
24917
24920
|
visitNode(cbNode, node.default) ||
|
|
24918
24921
|
visitNode(cbNode, node.expression);
|
|
24919
24922
|
case 297:
|
|
24920
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24923
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
24921
24924
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24922
24925
|
visitNode(cbNode, node.name) ||
|
|
24923
24926
|
visitNode(cbNode, node.questionToken) ||
|
|
@@ -24947,7 +24950,7 @@ var ts;
|
|
|
24947
24950
|
visitNode(cbNode, node.type) ||
|
|
24948
24951
|
visitNode(cbNode, node.initializer);
|
|
24949
24952
|
case 296:
|
|
24950
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24953
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
24951
24954
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24952
24955
|
visitNode(cbNode, node.name) ||
|
|
24953
24956
|
visitNode(cbNode, node.questionToken) ||
|
|
@@ -24964,7 +24967,7 @@ var ts;
|
|
|
24964
24967
|
visitNode(cbNode, node.name) ||
|
|
24965
24968
|
visitNode(cbNode, node.initializer);
|
|
24966
24969
|
case 176:
|
|
24967
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24970
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
24968
24971
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24969
24972
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24970
24973
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
@@ -25002,7 +25005,7 @@ var ts;
|
|
|
25002
25005
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
25003
25006
|
visitNode(cbNode, node.type);
|
|
25004
25007
|
case 171:
|
|
25005
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25008
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25006
25009
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25007
25010
|
visitNode(cbNode, node.name) ||
|
|
25008
25011
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
@@ -25024,7 +25027,7 @@ var ts;
|
|
|
25024
25027
|
visitNode(cbNode, node.type) ||
|
|
25025
25028
|
visitNode(cbNode, node.body);
|
|
25026
25029
|
case 256:
|
|
25027
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25030
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25028
25031
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25029
25032
|
visitNode(cbNode, node.asteriskToken) ||
|
|
25030
25033
|
visitNode(cbNode, node.name) ||
|
|
@@ -25048,7 +25051,7 @@ var ts;
|
|
|
25048
25051
|
visitNode(cbNode, node.equalsGreaterThanToken) ||
|
|
25049
25052
|
visitNode(cbNode, node.body);
|
|
25050
25053
|
case 170:
|
|
25051
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25054
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25052
25055
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25053
25056
|
visitNode(cbNode, node.body);
|
|
25054
25057
|
case 178:
|
|
@@ -25176,7 +25179,7 @@ var ts;
|
|
|
25176
25179
|
return visitNodes(cbNode, cbNodes, node.statements) ||
|
|
25177
25180
|
visitNode(cbNode, node.endOfFileToken);
|
|
25178
25181
|
case 237:
|
|
25179
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25182
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25180
25183
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25181
25184
|
visitNode(cbNode, node.declarationList);
|
|
25182
25185
|
case 255:
|
|
@@ -25247,20 +25250,20 @@ var ts;
|
|
|
25247
25250
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
25248
25251
|
visitNodes(cbNode, cbNodes, node.members);
|
|
25249
25252
|
case 258:
|
|
25250
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25253
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25251
25254
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25252
25255
|
visitNode(cbNode, node.name) ||
|
|
25253
25256
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
25254
25257
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
25255
25258
|
visitNodes(cbNode, cbNodes, node.members);
|
|
25256
25259
|
case 259:
|
|
25257
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25260
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25258
25261
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25259
25262
|
visitNode(cbNode, node.name) ||
|
|
25260
25263
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
25261
25264
|
visitNode(cbNode, node.type);
|
|
25262
25265
|
case 260:
|
|
25263
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25266
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25264
25267
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25265
25268
|
visitNode(cbNode, node.name) ||
|
|
25266
25269
|
visitNodes(cbNode, cbNodes, node.members);
|
|
@@ -25268,17 +25271,17 @@ var ts;
|
|
|
25268
25271
|
return visitNode(cbNode, node.name) ||
|
|
25269
25272
|
visitNode(cbNode, node.initializer);
|
|
25270
25273
|
case 261:
|
|
25271
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25274
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25272
25275
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25273
25276
|
visitNode(cbNode, node.name) ||
|
|
25274
25277
|
visitNode(cbNode, node.body);
|
|
25275
25278
|
case 265:
|
|
25276
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25279
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25277
25280
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25278
25281
|
visitNode(cbNode, node.name) ||
|
|
25279
25282
|
visitNode(cbNode, node.moduleReference);
|
|
25280
25283
|
case 266:
|
|
25281
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25284
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25282
25285
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25283
25286
|
visitNode(cbNode, node.importClause) ||
|
|
25284
25287
|
visitNode(cbNode, node.moduleSpecifier) ||
|
|
@@ -25292,7 +25295,7 @@ var ts;
|
|
|
25292
25295
|
return visitNode(cbNode, node.name) ||
|
|
25293
25296
|
visitNode(cbNode, node.value);
|
|
25294
25297
|
case 264:
|
|
25295
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25298
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25296
25299
|
visitNode(cbNode, node.name);
|
|
25297
25300
|
case 268:
|
|
25298
25301
|
return visitNode(cbNode, node.name);
|
|
@@ -25302,7 +25305,7 @@ var ts;
|
|
|
25302
25305
|
case 273:
|
|
25303
25306
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
25304
25307
|
case 272:
|
|
25305
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25308
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25306
25309
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25307
25310
|
visitNode(cbNode, node.exportClause) ||
|
|
25308
25311
|
visitNode(cbNode, node.moduleSpecifier) ||
|
|
@@ -25312,7 +25315,7 @@ var ts;
|
|
|
25312
25315
|
return visitNode(cbNode, node.propertyName) ||
|
|
25313
25316
|
visitNode(cbNode, node.name);
|
|
25314
25317
|
case 271:
|
|
25315
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25318
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25316
25319
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25317
25320
|
visitNode(cbNode, node.expression);
|
|
25318
25321
|
case 223:
|
|
@@ -25337,7 +25340,7 @@ var ts;
|
|
|
25337
25340
|
case 277:
|
|
25338
25341
|
return visitNode(cbNode, node.expression);
|
|
25339
25342
|
case 276:
|
|
25340
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
25343
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
25341
25344
|
visitNodes(cbNode, cbNodes, node.modifiers);
|
|
25342
25345
|
case 351:
|
|
25343
25346
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
@@ -27361,7 +27364,7 @@ var ts;
|
|
|
27361
27364
|
var type = parseTypeAnnotation();
|
|
27362
27365
|
parseTypeMemberSemicolon();
|
|
27363
27366
|
var node = factory.createIndexSignature(modifiers, parameters, type);
|
|
27364
|
-
node.
|
|
27367
|
+
node.illegalDecorators = decorators;
|
|
27365
27368
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
27366
27369
|
}
|
|
27367
27370
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -29046,7 +29049,7 @@ var ts;
|
|
|
29046
29049
|
var initializer = allowInAnd(function () { return parseAssignmentExpressionOrHigher(true); });
|
|
29047
29050
|
node = factory.createPropertyAssignment(name, initializer);
|
|
29048
29051
|
}
|
|
29049
|
-
node.
|
|
29052
|
+
node.illegalDecorators = decorators;
|
|
29050
29053
|
node.modifiers = modifiers;
|
|
29051
29054
|
node.questionToken = questionToken;
|
|
29052
29055
|
node.exclamationToken = exclamationToken;
|
|
@@ -29629,7 +29632,7 @@ var ts;
|
|
|
29629
29632
|
if (decorators || modifiers) {
|
|
29630
29633
|
var missing = createMissingNode(276, true, ts.Diagnostics.Declaration_expected);
|
|
29631
29634
|
ts.setTextRangePos(missing, pos);
|
|
29632
|
-
missing.
|
|
29635
|
+
missing.illegalDecorators = decorators;
|
|
29633
29636
|
missing.modifiers = modifiers;
|
|
29634
29637
|
return missing;
|
|
29635
29638
|
}
|
|
@@ -29761,7 +29764,7 @@ var ts;
|
|
|
29761
29764
|
var declarationList = parseVariableDeclarationList(false);
|
|
29762
29765
|
parseSemicolon();
|
|
29763
29766
|
var node = factory.createVariableStatement(modifiers, declarationList);
|
|
29764
|
-
node.
|
|
29767
|
+
node.illegalDecorators = decorators;
|
|
29765
29768
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29766
29769
|
}
|
|
29767
29770
|
function parseFunctionDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29780,7 +29783,7 @@ var ts;
|
|
|
29780
29783
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, ts.Diagnostics.or_expected);
|
|
29781
29784
|
setAwaitContext(savedAwaitContext);
|
|
29782
29785
|
var node = factory.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
29783
|
-
node.
|
|
29786
|
+
node.illegalDecorators = decorators;
|
|
29784
29787
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29785
29788
|
}
|
|
29786
29789
|
function parseConstructorName() {
|
|
@@ -29802,7 +29805,7 @@ var ts;
|
|
|
29802
29805
|
var type = parseReturnType(58, false);
|
|
29803
29806
|
var body = parseFunctionBlockOrSemicolon(0, ts.Diagnostics.or_expected);
|
|
29804
29807
|
var node = factory.createConstructorDeclaration(modifiers, parameters, body);
|
|
29805
|
-
node.
|
|
29808
|
+
node.illegalDecorators = decorators;
|
|
29806
29809
|
node.typeParameters = typeParameters;
|
|
29807
29810
|
node.type = type;
|
|
29808
29811
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
@@ -29895,7 +29898,7 @@ var ts;
|
|
|
29895
29898
|
parseExpectedToken(124);
|
|
29896
29899
|
var body = parseClassStaticBlockBody();
|
|
29897
29900
|
var node = withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
29898
|
-
node.
|
|
29901
|
+
node.illegalDecorators = decorators;
|
|
29899
29902
|
node.modifiers = modifiers;
|
|
29900
29903
|
return node;
|
|
29901
29904
|
}
|
|
@@ -30111,7 +30114,7 @@ var ts;
|
|
|
30111
30114
|
var heritageClauses = parseHeritageClauses();
|
|
30112
30115
|
var members = parseObjectTypeMembers();
|
|
30113
30116
|
var node = factory.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
30114
|
-
node.
|
|
30117
|
+
node.illegalDecorators = decorators;
|
|
30115
30118
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30116
30119
|
}
|
|
30117
30120
|
function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -30122,7 +30125,7 @@ var ts;
|
|
|
30122
30125
|
var type = token() === 138 && tryParse(parseKeywordAndNoDot) || parseType();
|
|
30123
30126
|
parseSemicolon();
|
|
30124
30127
|
var node = factory.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
30125
|
-
node.
|
|
30128
|
+
node.illegalDecorators = decorators;
|
|
30126
30129
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30127
30130
|
}
|
|
30128
30131
|
function parseEnumMember() {
|
|
@@ -30144,7 +30147,7 @@ var ts;
|
|
|
30144
30147
|
members = createMissingList();
|
|
30145
30148
|
}
|
|
30146
30149
|
var node = factory.createEnumDeclaration(modifiers, name, members);
|
|
30147
|
-
node.
|
|
30150
|
+
node.illegalDecorators = decorators;
|
|
30148
30151
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30149
30152
|
}
|
|
30150
30153
|
function parseModuleBlock() {
|
|
@@ -30166,7 +30169,7 @@ var ts;
|
|
|
30166
30169
|
? parseModuleOrNamespaceDeclaration(getNodePos(), false, undefined, undefined, 4 | namespaceFlag)
|
|
30167
30170
|
: parseModuleBlock();
|
|
30168
30171
|
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
30169
|
-
node.
|
|
30172
|
+
node.illegalDecorators = decorators;
|
|
30170
30173
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30171
30174
|
}
|
|
30172
30175
|
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -30188,7 +30191,7 @@ var ts;
|
|
|
30188
30191
|
parseSemicolon();
|
|
30189
30192
|
}
|
|
30190
30193
|
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
30191
|
-
node.
|
|
30194
|
+
node.illegalDecorators = decorators;
|
|
30192
30195
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30193
30196
|
}
|
|
30194
30197
|
function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -30226,7 +30229,7 @@ var ts;
|
|
|
30226
30229
|
var name = parseIdentifier();
|
|
30227
30230
|
parseSemicolon();
|
|
30228
30231
|
var node = factory.createNamespaceExportDeclaration(name);
|
|
30229
|
-
node.
|
|
30232
|
+
node.illegalDecorators = decorators;
|
|
30230
30233
|
node.modifiers = modifiers;
|
|
30231
30234
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30232
30235
|
}
|
|
@@ -30261,7 +30264,7 @@ var ts;
|
|
|
30261
30264
|
}
|
|
30262
30265
|
parseSemicolon();
|
|
30263
30266
|
var node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
30264
|
-
node.
|
|
30267
|
+
node.illegalDecorators = decorators;
|
|
30265
30268
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30266
30269
|
}
|
|
30267
30270
|
function parseAssertEntry() {
|
|
@@ -30304,7 +30307,7 @@ var ts;
|
|
|
30304
30307
|
var moduleReference = parseModuleReference();
|
|
30305
30308
|
parseSemicolon();
|
|
30306
30309
|
var node = factory.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
30307
|
-
node.
|
|
30310
|
+
node.illegalDecorators = decorators;
|
|
30308
30311
|
var finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30309
30312
|
return finished;
|
|
30310
30313
|
}
|
|
@@ -30451,7 +30454,7 @@ var ts;
|
|
|
30451
30454
|
parseSemicolon();
|
|
30452
30455
|
setAwaitContext(savedAwaitContext);
|
|
30453
30456
|
var node = factory.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
30454
|
-
node.
|
|
30457
|
+
node.illegalDecorators = decorators;
|
|
30455
30458
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30456
30459
|
}
|
|
30457
30460
|
function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -30468,7 +30471,7 @@ var ts;
|
|
|
30468
30471
|
parseSemicolon();
|
|
30469
30472
|
setAwaitContext(savedAwaitContext);
|
|
30470
30473
|
var node = factory.createExportAssignment(modifiers, isExportEquals, expression);
|
|
30471
|
-
node.
|
|
30474
|
+
node.illegalDecorators = decorators;
|
|
30472
30475
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30473
30476
|
}
|
|
30474
30477
|
var JSDocParser;
|
|
@@ -35187,10 +35190,11 @@ var ts;
|
|
|
35187
35190
|
if (resolved) {
|
|
35188
35191
|
var fileName = resolved.fileName, packageId = resolved.packageId;
|
|
35189
35192
|
var resolvedFileName = options.preserveSymlinks ? fileName : realPath(fileName, host, traceEnabled);
|
|
35193
|
+
var pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host);
|
|
35190
35194
|
resolvedTypeReferenceDirective = {
|
|
35191
35195
|
primary: primary,
|
|
35192
|
-
resolvedFileName: resolvedFileName,
|
|
35193
|
-
originalPath:
|
|
35196
|
+
resolvedFileName: pathsAreEqual ? fileName : resolvedFileName,
|
|
35197
|
+
originalPath: pathsAreEqual ? undefined : fileName,
|
|
35194
35198
|
packageId: packageId,
|
|
35195
35199
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
35196
35200
|
};
|
|
@@ -35846,8 +35850,9 @@ var ts;
|
|
|
35846
35850
|
var resolvedValue = resolved_1.value;
|
|
35847
35851
|
if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) {
|
|
35848
35852
|
var path = realPath(resolvedValue.path, host, traceEnabled);
|
|
35849
|
-
var
|
|
35850
|
-
|
|
35853
|
+
var pathsAreEqual = arePathsEqual(path, resolvedValue.path, host);
|
|
35854
|
+
var originalPath = pathsAreEqual ? undefined : resolvedValue.path;
|
|
35855
|
+
resolvedValue = __assign(__assign({}, resolvedValue), { path: pathsAreEqual ? resolvedValue.path : path, originalPath: originalPath });
|
|
35851
35856
|
}
|
|
35852
35857
|
return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
|
|
35853
35858
|
}
|
|
@@ -61464,25 +61469,7 @@ var ts;
|
|
|
61464
61469
|
}
|
|
61465
61470
|
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
61466
61471
|
return mapType(type, function (t) {
|
|
61467
|
-
|
|
61468
|
-
var intersection = t;
|
|
61469
|
-
var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
|
|
61470
|
-
if (newTypes.length > 0) {
|
|
61471
|
-
return getIntersectionType(newTypes);
|
|
61472
|
-
}
|
|
61473
|
-
newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
|
|
61474
|
-
if (newTypes.length > 0) {
|
|
61475
|
-
return getIntersectionType(newTypes);
|
|
61476
|
-
}
|
|
61477
|
-
return undefined;
|
|
61478
|
-
}
|
|
61479
|
-
var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
|
|
61480
|
-
if (concretePropertyType) {
|
|
61481
|
-
return concretePropertyType;
|
|
61482
|
-
}
|
|
61483
|
-
return getTypeOfApplicableIndexInfoOfContextualType(t);
|
|
61484
|
-
}, true);
|
|
61485
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
61472
|
+
var _a;
|
|
61486
61473
|
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
61487
61474
|
var constraint = getConstraintTypeFromMappedType(t);
|
|
61488
61475
|
var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
@@ -61490,9 +61477,8 @@ var ts;
|
|
|
61490
61477
|
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
61491
61478
|
return substituteIndexedMappedType(t, propertyNameType);
|
|
61492
61479
|
}
|
|
61493
|
-
return undefined;
|
|
61494
61480
|
}
|
|
61495
|
-
if (t.flags & 3670016) {
|
|
61481
|
+
else if (t.flags & 3670016) {
|
|
61496
61482
|
var prop = getPropertyOfType(t, name);
|
|
61497
61483
|
if (prop) {
|
|
61498
61484
|
return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
|
|
@@ -61503,16 +61489,10 @@ var ts;
|
|
|
61503
61489
|
return restType;
|
|
61504
61490
|
}
|
|
61505
61491
|
}
|
|
61492
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
61506
61493
|
}
|
|
61507
61494
|
return undefined;
|
|
61508
|
-
}
|
|
61509
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
61510
|
-
var _a;
|
|
61511
|
-
if (!(t.flags & 3670016)) {
|
|
61512
|
-
return undefined;
|
|
61513
|
-
}
|
|
61514
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
61515
|
-
}
|
|
61495
|
+
}, true);
|
|
61516
61496
|
}
|
|
61517
61497
|
function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
|
|
61518
61498
|
ts.Debug.assert(ts.isObjectLiteralMethod(node));
|
|
@@ -74568,7 +74548,7 @@ var ts;
|
|
|
74568
74548
|
return checkGrammarDecorators(node) || checkGrammarModifiers(node);
|
|
74569
74549
|
}
|
|
74570
74550
|
function checkGrammarDecorators(node) {
|
|
74571
|
-
if (ts.canHaveIllegalDecorators(node) && ts.some(node.
|
|
74551
|
+
if (ts.canHaveIllegalDecorators(node) && ts.some(node.illegalDecorators)) {
|
|
74572
74552
|
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
|
|
74573
74553
|
}
|
|
74574
74554
|
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node)) {
|