@typescript-deploys/pr-build 4.9.0-pr-50366-2 → 4.9.0-pr-50241-4
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/.eslintcache +1 -1
- package/lib/tsc.js +203 -152
- package/lib/tsserver.js +243 -160
- package/lib/tsserverlibrary.d.ts +59 -117
- package/lib/tsserverlibrary.js +229 -160
- package/lib/typescript.d.ts +59 -117
- package/lib/typescript.js +229 -160
- package/lib/typescriptServices.d.ts +59 -117
- package/lib/typescriptServices.js +229 -160
- package/lib/typingsInstaller.js +224 -155
- package/package.json +12 -18
package/lib/tsserverlibrary.js
CHANGED
|
@@ -2497,6 +2497,7 @@ var ts;
|
|
|
2497
2497
|
var currentAssertionLevel = 0 /* None */;
|
|
2498
2498
|
Debug.currentLogLevel = LogLevel.Warning;
|
|
2499
2499
|
Debug.isDebugging = false;
|
|
2500
|
+
Debug.enableDeprecationWarnings = true;
|
|
2500
2501
|
function getTypeScriptVersion() {
|
|
2501
2502
|
return typeScriptVersion !== null && typeScriptVersion !== void 0 ? typeScriptVersion : (typeScriptVersion = new ts.Version(ts.version));
|
|
2502
2503
|
}
|
|
@@ -3120,7 +3121,7 @@ var ts;
|
|
|
3120
3121
|
function createWarningDeprecation(name, errorAfter, since, message) {
|
|
3121
3122
|
var hasWrittenDeprecation = false;
|
|
3122
3123
|
return function () {
|
|
3123
|
-
if (!hasWrittenDeprecation) {
|
|
3124
|
+
if (Debug.enableDeprecationWarnings && !hasWrittenDeprecation) {
|
|
3124
3125
|
log.warn(formatDeprecationMessage(name, /*error*/ false, errorAfter, since, message));
|
|
3125
3126
|
hasWrittenDeprecation = true;
|
|
3126
3127
|
}
|
|
@@ -6140,6 +6141,7 @@ var ts;
|
|
|
6140
6141
|
var pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);
|
|
6141
6142
|
/* @internal */
|
|
6142
6143
|
ts.unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);
|
|
6144
|
+
/* @internal */
|
|
6143
6145
|
function setCustomPollingValues(system) {
|
|
6144
6146
|
if (!system.getEnvironmentVariable) {
|
|
6145
6147
|
return;
|
|
@@ -6182,6 +6184,7 @@ var ts;
|
|
|
6182
6184
|
createPollingIntervalBasedLevels(customLevels ? __assign(__assign({}, defaultLevels), customLevels) : defaultLevels);
|
|
6183
6185
|
}
|
|
6184
6186
|
}
|
|
6187
|
+
ts.setCustomPollingValues = setCustomPollingValues;
|
|
6185
6188
|
function pollWatchedFileQueue(host, queue, pollIndex, chunkSize, callbackOnWatchFileStat) {
|
|
6186
6189
|
var definedValueCopyToIndex = pollIndex;
|
|
6187
6190
|
// Max visit would be all elements of the queue
|
|
@@ -6227,6 +6230,7 @@ var ts;
|
|
|
6227
6230
|
}
|
|
6228
6231
|
}
|
|
6229
6232
|
}
|
|
6233
|
+
/* @internal */
|
|
6230
6234
|
function createDynamicPriorityPollingWatchFile(host) {
|
|
6231
6235
|
var watchedFiles = [];
|
|
6232
6236
|
var changedFilesInLastPoll = [];
|
|
@@ -6335,6 +6339,7 @@ var ts;
|
|
|
6335
6339
|
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === PollingInterval.Low ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingIntervalQueue(pollingInterval));
|
|
6336
6340
|
}
|
|
6337
6341
|
}
|
|
6342
|
+
ts.createDynamicPriorityPollingWatchFile = createDynamicPriorityPollingWatchFile;
|
|
6338
6343
|
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) {
|
|
6339
6344
|
// One file can have multiple watchers
|
|
6340
6345
|
var fileWatcherCallbacks = ts.createMultiMap();
|
|
@@ -6413,36 +6418,42 @@ var ts;
|
|
|
6413
6418
|
pollScheduled = host.setTimeout(pollQueue, PollingInterval.High);
|
|
6414
6419
|
}
|
|
6415
6420
|
}
|
|
6416
|
-
|
|
6421
|
+
/* @internal */
|
|
6422
|
+
function createSingleFileWatcherPerName(watchFile, useCaseSensitiveFileNames) {
|
|
6423
|
+
var cache = new ts.Map();
|
|
6424
|
+
var callbacksCache = ts.createMultiMap();
|
|
6417
6425
|
var toCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
existing
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
});
|
|
6430
|
-
}
|
|
6431
|
-
return {
|
|
6432
|
-
close: function () {
|
|
6433
|
-
var watcher = cache.get(path);
|
|
6434
|
-
if (!watcher)
|
|
6435
|
-
return;
|
|
6436
|
-
if (!ts.orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length)
|
|
6437
|
-
return;
|
|
6438
|
-
cache.delete(path);
|
|
6439
|
-
ts.closeFileWatcherOf(watcher);
|
|
6426
|
+
return function (fileName, callback, pollingInterval, options) {
|
|
6427
|
+
var path = toCanonicalFileName(fileName);
|
|
6428
|
+
var existing = cache.get(path);
|
|
6429
|
+
if (existing) {
|
|
6430
|
+
existing.refCount++;
|
|
6431
|
+
}
|
|
6432
|
+
else {
|
|
6433
|
+
cache.set(path, {
|
|
6434
|
+
watcher: watchFile(fileName, function (fileName, eventKind, modifiedTime) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind, modifiedTime); }); }, pollingInterval, options),
|
|
6435
|
+
refCount: 1
|
|
6436
|
+
});
|
|
6440
6437
|
}
|
|
6438
|
+
callbacksCache.add(path, callback);
|
|
6439
|
+
return {
|
|
6440
|
+
close: function () {
|
|
6441
|
+
var watcher = ts.Debug.checkDefined(cache.get(path));
|
|
6442
|
+
callbacksCache.remove(path, callback);
|
|
6443
|
+
watcher.refCount--;
|
|
6444
|
+
if (watcher.refCount)
|
|
6445
|
+
return;
|
|
6446
|
+
cache.delete(path);
|
|
6447
|
+
ts.closeFileWatcherOf(watcher);
|
|
6448
|
+
}
|
|
6449
|
+
};
|
|
6441
6450
|
};
|
|
6442
6451
|
}
|
|
6452
|
+
ts.createSingleFileWatcherPerName = createSingleFileWatcherPerName;
|
|
6443
6453
|
/**
|
|
6444
6454
|
* Returns true if file status changed
|
|
6445
6455
|
*/
|
|
6456
|
+
/*@internal*/
|
|
6446
6457
|
function onWatchedFileStat(watchedFile, modifiedTime) {
|
|
6447
6458
|
var oldTime = watchedFile.mtime.getTime();
|
|
6448
6459
|
var newTime = modifiedTime.getTime();
|
|
@@ -6454,6 +6465,7 @@ var ts;
|
|
|
6454
6465
|
}
|
|
6455
6466
|
return false;
|
|
6456
6467
|
}
|
|
6468
|
+
ts.onWatchedFileStat = onWatchedFileStat;
|
|
6457
6469
|
/*@internal*/
|
|
6458
6470
|
function getFileWatcherEventKind(oldTime, newTime) {
|
|
6459
6471
|
return oldTime === 0
|
|
@@ -6481,6 +6493,7 @@ var ts;
|
|
|
6481
6493
|
* that means if this is recursive watcher, watch the children directories as well
|
|
6482
6494
|
* (eg on OS that dont support recursive watch using fs.watch use fs.watchFile)
|
|
6483
6495
|
*/
|
|
6496
|
+
/*@internal*/
|
|
6484
6497
|
function createDirectoryWatcherSupportingRecursive(_a) {
|
|
6485
6498
|
var watchDirectory = _a.watchDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, fileSystemEntryExists = _a.fileSystemEntryExists, realpath = _a.realpath, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout;
|
|
6486
6499
|
var cache = new ts.Map();
|
|
@@ -6689,15 +6702,18 @@ var ts;
|
|
|
6689
6702
|
return ts.stringContains(toCanonicalFilePath(path), searchPath);
|
|
6690
6703
|
}
|
|
6691
6704
|
}
|
|
6705
|
+
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
6692
6706
|
/*@internal*/
|
|
6693
6707
|
var FileSystemEntryKind;
|
|
6694
6708
|
(function (FileSystemEntryKind) {
|
|
6695
6709
|
FileSystemEntryKind[FileSystemEntryKind["File"] = 0] = "File";
|
|
6696
6710
|
FileSystemEntryKind[FileSystemEntryKind["Directory"] = 1] = "Directory";
|
|
6697
6711
|
})(FileSystemEntryKind = ts.FileSystemEntryKind || (ts.FileSystemEntryKind = {}));
|
|
6712
|
+
/*@internal*/
|
|
6698
6713
|
function createFileWatcherCallback(callback) {
|
|
6699
6714
|
return function (_fileName, eventKind, modifiedTime) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "", modifiedTime); };
|
|
6700
6715
|
}
|
|
6716
|
+
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
6701
6717
|
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime) {
|
|
6702
6718
|
return function (eventName, _relativeFileName, modifiedTime) {
|
|
6703
6719
|
if (eventName === "rename") {
|
|
@@ -6731,10 +6747,7 @@ var ts;
|
|
|
6731
6747
|
}
|
|
6732
6748
|
/*@internal*/
|
|
6733
6749
|
function createSystemWatchFunctions(_a) {
|
|
6734
|
-
var
|
|
6735
|
-
var pollingWatches = new ts.Map();
|
|
6736
|
-
var fsWatches = new ts.Map();
|
|
6737
|
-
var fsWatchesRecursive = new ts.Map();
|
|
6750
|
+
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
|
|
6738
6751
|
var dynamicPollingWatchFile;
|
|
6739
6752
|
var fixedChunkSizePollingWatchFile;
|
|
6740
6753
|
var nonPollingWatchFile;
|
|
@@ -6798,7 +6811,7 @@ var ts;
|
|
|
6798
6811
|
// Use notifications from FS to watch with falling back to fs.watchFile
|
|
6799
6812
|
generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
|
|
6800
6813
|
// Default to do not use fixed polling interval
|
|
6801
|
-
{ watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.
|
|
6814
|
+
{ watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.FixedPollingInterval };
|
|
6802
6815
|
}
|
|
6803
6816
|
}
|
|
6804
6817
|
function generateWatchFileOptions(watchFile, fallbackPolling, options) {
|
|
@@ -6869,13 +6882,7 @@ var ts;
|
|
|
6869
6882
|
};
|
|
6870
6883
|
}
|
|
6871
6884
|
}
|
|
6872
|
-
function pollingWatchFile(fileName, callback, pollingInterval, options) {
|
|
6873
|
-
return createSingleWatcherPerName(pollingWatches, useCaseSensitiveFileNames, fileName, callback, function (cb) { return pollingWatchFileWorker(fileName, cb, pollingInterval, options); });
|
|
6874
|
-
}
|
|
6875
6885
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
6876
|
-
return createSingleWatcherPerName(recursive ? fsWatchesRecursive : fsWatches, useCaseSensitiveFileNames, fileOrDirectory, callback, function (cb) { return fsWatchHandlingPresence(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions); });
|
|
6877
|
-
}
|
|
6878
|
-
function fsWatchHandlingPresence(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
6879
6886
|
var lastDirectoryPartWithDirectorySeparator;
|
|
6880
6887
|
var lastDirectoryPart;
|
|
6881
6888
|
if (inodeWatching) {
|
|
@@ -7054,7 +7061,7 @@ var ts;
|
|
|
7054
7061
|
var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
|
|
7055
7062
|
var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
|
|
7056
7063
|
var _b = createSystemWatchFunctions({
|
|
7057
|
-
|
|
7064
|
+
pollingWatchFile: createSingleFileWatcherPerName(fsWatchFileWorker, useCaseSensitiveFileNames),
|
|
7058
7065
|
getModifiedTime: getModifiedTime,
|
|
7059
7066
|
setTimeout: setTimeout,
|
|
7060
7067
|
clearTimeout: clearTimeout,
|
|
@@ -21393,7 +21400,7 @@ var ts;
|
|
|
21393
21400
|
case 165 /* Decorator */: {
|
|
21394
21401
|
var parent_2 = node.parent;
|
|
21395
21402
|
return ts.canHaveDecorators(parent_2) ? parent_2.modifiers :
|
|
21396
|
-
ts.canHaveIllegalDecorators(parent_2) ? parent_2.
|
|
21403
|
+
ts.canHaveIllegalDecorators(parent_2) ? parent_2.illegalDecorators :
|
|
21397
21404
|
undefined;
|
|
21398
21405
|
}
|
|
21399
21406
|
case 291 /* HeritageClause */:
|
|
@@ -23470,7 +23477,7 @@ var ts;
|
|
|
23470
23477
|
node.body = body;
|
|
23471
23478
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */;
|
|
23472
23479
|
// The following properties are used only to report grammar errors
|
|
23473
|
-
node.
|
|
23480
|
+
node.illegalDecorators = undefined;
|
|
23474
23481
|
node.modifiers = undefined;
|
|
23475
23482
|
return node;
|
|
23476
23483
|
}
|
|
@@ -23482,7 +23489,7 @@ var ts;
|
|
|
23482
23489
|
}
|
|
23483
23490
|
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
23484
23491
|
if (updated !== original) {
|
|
23485
|
-
updated.
|
|
23492
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
23486
23493
|
updated.modifiers = original.modifiers;
|
|
23487
23494
|
}
|
|
23488
23495
|
return update(updated, original);
|
|
@@ -23495,7 +23502,7 @@ var ts;
|
|
|
23495
23502
|
/*type*/ undefined, body);
|
|
23496
23503
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
23497
23504
|
// The following properties are used only to report grammar errors
|
|
23498
|
-
node.
|
|
23505
|
+
node.illegalDecorators = undefined;
|
|
23499
23506
|
node.typeParameters = undefined;
|
|
23500
23507
|
node.type = undefined;
|
|
23501
23508
|
return node;
|
|
@@ -23510,7 +23517,7 @@ var ts;
|
|
|
23510
23517
|
}
|
|
23511
23518
|
function finishUpdateConstructorDeclaration(updated, original) {
|
|
23512
23519
|
if (updated !== original) {
|
|
23513
|
-
updated.
|
|
23520
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
23514
23521
|
updated.typeParameters = original.typeParameters;
|
|
23515
23522
|
updated.type = original.type;
|
|
23516
23523
|
}
|
|
@@ -25258,7 +25265,7 @@ var ts;
|
|
|
25258
25265
|
}
|
|
25259
25266
|
}
|
|
25260
25267
|
// The following properties are used only to report grammar errors
|
|
25261
|
-
node.
|
|
25268
|
+
node.illegalDecorators = undefined;
|
|
25262
25269
|
return node;
|
|
25263
25270
|
}
|
|
25264
25271
|
// @api
|
|
@@ -25276,7 +25283,7 @@ var ts;
|
|
|
25276
25283
|
function finishUpdateFunctionDeclaration(updated, original) {
|
|
25277
25284
|
if (updated !== original) {
|
|
25278
25285
|
// copy children used only for error reporting
|
|
25279
|
-
updated.
|
|
25286
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25280
25287
|
}
|
|
25281
25288
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
25282
25289
|
}
|
|
@@ -25310,7 +25317,7 @@ var ts;
|
|
|
25310
25317
|
node.members = createNodeArray(members);
|
|
25311
25318
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
25312
25319
|
// The following properties are used only to report grammar errors
|
|
25313
|
-
node.
|
|
25320
|
+
node.illegalDecorators = undefined;
|
|
25314
25321
|
return node;
|
|
25315
25322
|
}
|
|
25316
25323
|
// @api
|
|
@@ -25325,7 +25332,7 @@ var ts;
|
|
|
25325
25332
|
}
|
|
25326
25333
|
function finishUpdateInterfaceDeclaration(updated, original) {
|
|
25327
25334
|
if (updated !== original) {
|
|
25328
|
-
updated.
|
|
25335
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25329
25336
|
}
|
|
25330
25337
|
return update(updated, original);
|
|
25331
25338
|
}
|
|
@@ -25335,7 +25342,7 @@ var ts;
|
|
|
25335
25342
|
node.type = type;
|
|
25336
25343
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
25337
25344
|
// The following properties are used only to report grammar errors
|
|
25338
|
-
node.
|
|
25345
|
+
node.illegalDecorators = undefined;
|
|
25339
25346
|
return node;
|
|
25340
25347
|
}
|
|
25341
25348
|
// @api
|
|
@@ -25349,7 +25356,7 @@ var ts;
|
|
|
25349
25356
|
}
|
|
25350
25357
|
function finishUpdateTypeAliasDeclaration(updated, original) {
|
|
25351
25358
|
if (updated !== original) {
|
|
25352
|
-
updated.
|
|
25359
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25353
25360
|
}
|
|
25354
25361
|
return update(updated, original);
|
|
25355
25362
|
}
|
|
@@ -25362,7 +25369,7 @@ var ts;
|
|
|
25362
25369
|
1 /* ContainsTypeScript */;
|
|
25363
25370
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; // Enum declarations cannot contain `await`
|
|
25364
25371
|
// The following properties are used only to report grammar errors
|
|
25365
|
-
node.
|
|
25372
|
+
node.illegalDecorators = undefined;
|
|
25366
25373
|
return node;
|
|
25367
25374
|
}
|
|
25368
25375
|
// @api
|
|
@@ -25375,7 +25382,7 @@ var ts;
|
|
|
25375
25382
|
}
|
|
25376
25383
|
function finishUpdateEnumDeclaration(updated, original) {
|
|
25377
25384
|
if (updated !== original) {
|
|
25378
|
-
updated.
|
|
25385
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25379
25386
|
}
|
|
25380
25387
|
return update(updated, original);
|
|
25381
25388
|
}
|
|
@@ -25399,7 +25406,7 @@ var ts;
|
|
|
25399
25406
|
}
|
|
25400
25407
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; // Module declarations cannot contain `await`.
|
|
25401
25408
|
// The following properties are used only to report grammar errors
|
|
25402
|
-
node.
|
|
25409
|
+
node.illegalDecorators = undefined;
|
|
25403
25410
|
return node;
|
|
25404
25411
|
}
|
|
25405
25412
|
// @api
|
|
@@ -25412,7 +25419,7 @@ var ts;
|
|
|
25412
25419
|
}
|
|
25413
25420
|
function finishUpdateModuleDeclaration(updated, original) {
|
|
25414
25421
|
if (updated !== original) {
|
|
25415
|
-
updated.
|
|
25422
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25416
25423
|
}
|
|
25417
25424
|
return update(updated, original);
|
|
25418
25425
|
}
|
|
@@ -25448,7 +25455,7 @@ var ts;
|
|
|
25448
25455
|
/*modifiers*/ undefined, name);
|
|
25449
25456
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
25450
25457
|
// The following properties are used only to report grammar errors
|
|
25451
|
-
node.
|
|
25458
|
+
node.illegalDecorators = undefined;
|
|
25452
25459
|
node.modifiers = undefined;
|
|
25453
25460
|
return node;
|
|
25454
25461
|
}
|
|
@@ -25460,7 +25467,7 @@ var ts;
|
|
|
25460
25467
|
}
|
|
25461
25468
|
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
25462
25469
|
if (updated !== original) {
|
|
25463
|
-
updated.
|
|
25470
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25464
25471
|
updated.modifiers = original.modifiers;
|
|
25465
25472
|
}
|
|
25466
25473
|
return update(updated, original);
|
|
@@ -25475,7 +25482,7 @@ var ts;
|
|
|
25475
25482
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
25476
25483
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; // Import= declaration is always parsed in an Await context
|
|
25477
25484
|
// The following properties are used only to report grammar errors
|
|
25478
|
-
node.
|
|
25485
|
+
node.illegalDecorators = undefined;
|
|
25479
25486
|
return node;
|
|
25480
25487
|
}
|
|
25481
25488
|
// @api
|
|
@@ -25489,7 +25496,7 @@ var ts;
|
|
|
25489
25496
|
}
|
|
25490
25497
|
function finishUpdateImportEqualsDeclaration(updated, original) {
|
|
25491
25498
|
if (updated !== original) {
|
|
25492
|
-
updated.
|
|
25499
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25493
25500
|
}
|
|
25494
25501
|
return update(updated, original);
|
|
25495
25502
|
}
|
|
@@ -25505,7 +25512,7 @@ var ts;
|
|
|
25505
25512
|
propagateChildFlags(node.moduleSpecifier);
|
|
25506
25513
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; // always parsed in an Await context
|
|
25507
25514
|
// The following properties are used only to report grammar errors
|
|
25508
|
-
node.
|
|
25515
|
+
node.illegalDecorators = undefined;
|
|
25509
25516
|
return node;
|
|
25510
25517
|
}
|
|
25511
25518
|
// @api
|
|
@@ -25519,7 +25526,7 @@ var ts;
|
|
|
25519
25526
|
}
|
|
25520
25527
|
function finishUpdateImportDeclaration(updated, original) {
|
|
25521
25528
|
if (updated !== original) {
|
|
25522
|
-
updated.
|
|
25529
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25523
25530
|
}
|
|
25524
25531
|
return update(updated, original);
|
|
25525
25532
|
}
|
|
@@ -25665,7 +25672,7 @@ var ts;
|
|
|
25665
25672
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
25666
25673
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; // always parsed in an Await context
|
|
25667
25674
|
// The following properties are used only to report grammar errors
|
|
25668
|
-
node.
|
|
25675
|
+
node.illegalDecorators = undefined;
|
|
25669
25676
|
return node;
|
|
25670
25677
|
}
|
|
25671
25678
|
// @api
|
|
@@ -25677,7 +25684,7 @@ var ts;
|
|
|
25677
25684
|
}
|
|
25678
25685
|
function finishUpdateExportAssignment(updated, original) {
|
|
25679
25686
|
if (updated !== original) {
|
|
25680
|
-
updated.
|
|
25687
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25681
25688
|
}
|
|
25682
25689
|
return update(updated, original);
|
|
25683
25690
|
}
|
|
@@ -25695,7 +25702,7 @@ var ts;
|
|
|
25695
25702
|
propagateChildFlags(node.moduleSpecifier);
|
|
25696
25703
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; // always parsed in an Await context
|
|
25697
25704
|
// The following properties are used only to report grammar errors
|
|
25698
|
-
node.
|
|
25705
|
+
node.illegalDecorators = undefined;
|
|
25699
25706
|
return node;
|
|
25700
25707
|
}
|
|
25701
25708
|
// @api
|
|
@@ -25710,7 +25717,7 @@ var ts;
|
|
|
25710
25717
|
}
|
|
25711
25718
|
function finishUpdateExportDeclaration(updated, original) {
|
|
25712
25719
|
if (updated !== original) {
|
|
25713
|
-
updated.
|
|
25720
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25714
25721
|
}
|
|
25715
25722
|
return update(updated, original);
|
|
25716
25723
|
}
|
|
@@ -26474,7 +26481,7 @@ var ts;
|
|
|
26474
26481
|
propagateChildFlags(node.name) |
|
|
26475
26482
|
propagateChildFlags(node.initializer);
|
|
26476
26483
|
// The following properties are used only to report grammar errors
|
|
26477
|
-
node.
|
|
26484
|
+
node.illegalDecorators = undefined;
|
|
26478
26485
|
node.modifiers = undefined;
|
|
26479
26486
|
node.questionToken = undefined;
|
|
26480
26487
|
node.exclamationToken = undefined;
|
|
@@ -26490,7 +26497,7 @@ var ts;
|
|
|
26490
26497
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
26491
26498
|
// copy children used only for error reporting
|
|
26492
26499
|
if (updated !== original) {
|
|
26493
|
-
updated.
|
|
26500
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
26494
26501
|
updated.modifiers = original.modifiers;
|
|
26495
26502
|
updated.questionToken = original.questionToken;
|
|
26496
26503
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -26507,7 +26514,7 @@ var ts;
|
|
|
26507
26514
|
1024 /* ContainsES2015 */;
|
|
26508
26515
|
// The following properties are used only to report grammar errors
|
|
26509
26516
|
node.equalsToken = undefined;
|
|
26510
|
-
node.
|
|
26517
|
+
node.illegalDecorators = undefined;
|
|
26511
26518
|
node.modifiers = undefined;
|
|
26512
26519
|
node.questionToken = undefined;
|
|
26513
26520
|
node.exclamationToken = undefined;
|
|
@@ -26524,7 +26531,7 @@ var ts;
|
|
|
26524
26531
|
if (updated !== original) {
|
|
26525
26532
|
// copy children used only for error reporting
|
|
26526
26533
|
updated.equalsToken = original.equalsToken;
|
|
26527
|
-
updated.
|
|
26534
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
26528
26535
|
updated.modifiers = original.modifiers;
|
|
26529
26536
|
updated.questionToken = original.questionToken;
|
|
26530
26537
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -31003,7 +31010,7 @@ var ts;
|
|
|
31003
31010
|
visitNode(cbNode, node.default) ||
|
|
31004
31011
|
visitNode(cbNode, node.expression);
|
|
31005
31012
|
case 297 /* ShorthandPropertyAssignment */:
|
|
31006
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31013
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31007
31014
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31008
31015
|
visitNode(cbNode, node.name) ||
|
|
31009
31016
|
visitNode(cbNode, node.questionToken) ||
|
|
@@ -31033,7 +31040,7 @@ var ts;
|
|
|
31033
31040
|
visitNode(cbNode, node.type) ||
|
|
31034
31041
|
visitNode(cbNode, node.initializer);
|
|
31035
31042
|
case 296 /* PropertyAssignment */:
|
|
31036
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31043
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31037
31044
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31038
31045
|
visitNode(cbNode, node.name) ||
|
|
31039
31046
|
visitNode(cbNode, node.questionToken) ||
|
|
@@ -31050,7 +31057,7 @@ var ts;
|
|
|
31050
31057
|
visitNode(cbNode, node.name) ||
|
|
31051
31058
|
visitNode(cbNode, node.initializer);
|
|
31052
31059
|
case 176 /* IndexSignature */:
|
|
31053
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31060
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31054
31061
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31055
31062
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
31056
31063
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
@@ -31088,7 +31095,7 @@ var ts;
|
|
|
31088
31095
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
31089
31096
|
visitNode(cbNode, node.type);
|
|
31090
31097
|
case 171 /* Constructor */:
|
|
31091
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31098
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31092
31099
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31093
31100
|
visitNode(cbNode, node.name) ||
|
|
31094
31101
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
@@ -31110,7 +31117,7 @@ var ts;
|
|
|
31110
31117
|
visitNode(cbNode, node.type) ||
|
|
31111
31118
|
visitNode(cbNode, node.body);
|
|
31112
31119
|
case 256 /* FunctionDeclaration */:
|
|
31113
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31120
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31114
31121
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31115
31122
|
visitNode(cbNode, node.asteriskToken) ||
|
|
31116
31123
|
visitNode(cbNode, node.name) ||
|
|
@@ -31134,7 +31141,7 @@ var ts;
|
|
|
31134
31141
|
visitNode(cbNode, node.equalsGreaterThanToken) ||
|
|
31135
31142
|
visitNode(cbNode, node.body);
|
|
31136
31143
|
case 170 /* ClassStaticBlockDeclaration */:
|
|
31137
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31144
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31138
31145
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31139
31146
|
visitNode(cbNode, node.body);
|
|
31140
31147
|
case 178 /* TypeReference */:
|
|
@@ -31262,7 +31269,7 @@ var ts;
|
|
|
31262
31269
|
return visitNodes(cbNode, cbNodes, node.statements) ||
|
|
31263
31270
|
visitNode(cbNode, node.endOfFileToken);
|
|
31264
31271
|
case 237 /* VariableStatement */:
|
|
31265
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31272
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31266
31273
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31267
31274
|
visitNode(cbNode, node.declarationList);
|
|
31268
31275
|
case 255 /* VariableDeclarationList */:
|
|
@@ -31333,20 +31340,20 @@ var ts;
|
|
|
31333
31340
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
31334
31341
|
visitNodes(cbNode, cbNodes, node.members);
|
|
31335
31342
|
case 258 /* InterfaceDeclaration */:
|
|
31336
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31343
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31337
31344
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31338
31345
|
visitNode(cbNode, node.name) ||
|
|
31339
31346
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
31340
31347
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
31341
31348
|
visitNodes(cbNode, cbNodes, node.members);
|
|
31342
31349
|
case 259 /* TypeAliasDeclaration */:
|
|
31343
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31350
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31344
31351
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31345
31352
|
visitNode(cbNode, node.name) ||
|
|
31346
31353
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
31347
31354
|
visitNode(cbNode, node.type);
|
|
31348
31355
|
case 260 /* EnumDeclaration */:
|
|
31349
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31356
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31350
31357
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31351
31358
|
visitNode(cbNode, node.name) ||
|
|
31352
31359
|
visitNodes(cbNode, cbNodes, node.members);
|
|
@@ -31354,17 +31361,17 @@ var ts;
|
|
|
31354
31361
|
return visitNode(cbNode, node.name) ||
|
|
31355
31362
|
visitNode(cbNode, node.initializer);
|
|
31356
31363
|
case 261 /* ModuleDeclaration */:
|
|
31357
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31364
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31358
31365
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31359
31366
|
visitNode(cbNode, node.name) ||
|
|
31360
31367
|
visitNode(cbNode, node.body);
|
|
31361
31368
|
case 265 /* ImportEqualsDeclaration */:
|
|
31362
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31369
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31363
31370
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31364
31371
|
visitNode(cbNode, node.name) ||
|
|
31365
31372
|
visitNode(cbNode, node.moduleReference);
|
|
31366
31373
|
case 266 /* ImportDeclaration */:
|
|
31367
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31374
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31368
31375
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31369
31376
|
visitNode(cbNode, node.importClause) ||
|
|
31370
31377
|
visitNode(cbNode, node.moduleSpecifier) ||
|
|
@@ -31378,7 +31385,7 @@ var ts;
|
|
|
31378
31385
|
return visitNode(cbNode, node.name) ||
|
|
31379
31386
|
visitNode(cbNode, node.value);
|
|
31380
31387
|
case 264 /* NamespaceExportDeclaration */:
|
|
31381
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31388
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31382
31389
|
visitNode(cbNode, node.name);
|
|
31383
31390
|
case 268 /* NamespaceImport */:
|
|
31384
31391
|
return visitNode(cbNode, node.name);
|
|
@@ -31388,7 +31395,7 @@ var ts;
|
|
|
31388
31395
|
case 273 /* NamedExports */:
|
|
31389
31396
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
31390
31397
|
case 272 /* ExportDeclaration */:
|
|
31391
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31398
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31392
31399
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31393
31400
|
visitNode(cbNode, node.exportClause) ||
|
|
31394
31401
|
visitNode(cbNode, node.moduleSpecifier) ||
|
|
@@ -31398,7 +31405,7 @@ var ts;
|
|
|
31398
31405
|
return visitNode(cbNode, node.propertyName) ||
|
|
31399
31406
|
visitNode(cbNode, node.name);
|
|
31400
31407
|
case 271 /* ExportAssignment */:
|
|
31401
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31408
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31402
31409
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31403
31410
|
visitNode(cbNode, node.expression);
|
|
31404
31411
|
case 223 /* TemplateExpression */:
|
|
@@ -31423,7 +31430,7 @@ var ts;
|
|
|
31423
31430
|
case 277 /* ExternalModuleReference */:
|
|
31424
31431
|
return visitNode(cbNode, node.expression);
|
|
31425
31432
|
case 276 /* MissingDeclaration */:
|
|
31426
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31433
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31427
31434
|
visitNodes(cbNode, cbNodes, node.modifiers);
|
|
31428
31435
|
case 351 /* CommaListExpression */:
|
|
31429
31436
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
@@ -33974,7 +33981,7 @@ var ts;
|
|
|
33974
33981
|
var type = parseTypeAnnotation();
|
|
33975
33982
|
parseTypeMemberSemicolon();
|
|
33976
33983
|
var node = factory.createIndexSignature(modifiers, parameters, type);
|
|
33977
|
-
node.
|
|
33984
|
+
node.illegalDecorators = decorators;
|
|
33978
33985
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
33979
33986
|
}
|
|
33980
33987
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -36134,7 +36141,7 @@ var ts;
|
|
|
36134
36141
|
node = factory.createPropertyAssignment(name, initializer);
|
|
36135
36142
|
}
|
|
36136
36143
|
// Decorators, Modifiers, questionToken, and exclamationToken are not supported by property assignments and are reported in the grammar checker
|
|
36137
|
-
node.
|
|
36144
|
+
node.illegalDecorators = decorators;
|
|
36138
36145
|
node.modifiers = modifiers;
|
|
36139
36146
|
node.questionToken = questionToken;
|
|
36140
36147
|
node.exclamationToken = exclamationToken;
|
|
@@ -36782,7 +36789,7 @@ var ts;
|
|
|
36782
36789
|
// would follow. For recovery and error reporting purposes, return an incomplete declaration.
|
|
36783
36790
|
var missing = createMissingNode(276 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
|
|
36784
36791
|
ts.setTextRangePos(missing, pos);
|
|
36785
|
-
missing.
|
|
36792
|
+
missing.illegalDecorators = decorators;
|
|
36786
36793
|
missing.modifiers = modifiers;
|
|
36787
36794
|
return missing;
|
|
36788
36795
|
}
|
|
@@ -36925,7 +36932,7 @@ var ts;
|
|
|
36925
36932
|
parseSemicolon();
|
|
36926
36933
|
var node = factory.createVariableStatement(modifiers, declarationList);
|
|
36927
36934
|
// Decorators are not allowed on a variable statement, so we keep track of them to report them in the grammar checker.
|
|
36928
|
-
node.
|
|
36935
|
+
node.illegalDecorators = decorators;
|
|
36929
36936
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
36930
36937
|
}
|
|
36931
36938
|
function parseFunctionDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -36945,7 +36952,7 @@ var ts;
|
|
|
36945
36952
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, ts.Diagnostics.or_expected);
|
|
36946
36953
|
setAwaitContext(savedAwaitContext);
|
|
36947
36954
|
var node = factory.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
36948
|
-
node.
|
|
36955
|
+
node.illegalDecorators = decorators;
|
|
36949
36956
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
36950
36957
|
}
|
|
36951
36958
|
function parseConstructorName() {
|
|
@@ -36968,7 +36975,7 @@ var ts;
|
|
|
36968
36975
|
var body = parseFunctionBlockOrSemicolon(0 /* None */, ts.Diagnostics.or_expected);
|
|
36969
36976
|
var node = factory.createConstructorDeclaration(modifiers, parameters, body);
|
|
36970
36977
|
// Attach invalid nodes if they exist so that we can report them in the grammar checker.
|
|
36971
|
-
node.
|
|
36978
|
+
node.illegalDecorators = decorators;
|
|
36972
36979
|
node.typeParameters = typeParameters;
|
|
36973
36980
|
node.type = type;
|
|
36974
36981
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
@@ -37084,7 +37091,7 @@ var ts;
|
|
|
37084
37091
|
parseExpectedToken(124 /* StaticKeyword */);
|
|
37085
37092
|
var body = parseClassStaticBlockBody();
|
|
37086
37093
|
var node = withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
37087
|
-
node.
|
|
37094
|
+
node.illegalDecorators = decorators;
|
|
37088
37095
|
node.modifiers = modifiers;
|
|
37089
37096
|
return node;
|
|
37090
37097
|
}
|
|
@@ -37325,7 +37332,7 @@ var ts;
|
|
|
37325
37332
|
var heritageClauses = parseHeritageClauses();
|
|
37326
37333
|
var members = parseObjectTypeMembers();
|
|
37327
37334
|
var node = factory.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
37328
|
-
node.
|
|
37335
|
+
node.illegalDecorators = decorators;
|
|
37329
37336
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37330
37337
|
}
|
|
37331
37338
|
function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37336,7 +37343,7 @@ var ts;
|
|
|
37336
37343
|
var type = token() === 138 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType();
|
|
37337
37344
|
parseSemicolon();
|
|
37338
37345
|
var node = factory.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
37339
|
-
node.
|
|
37346
|
+
node.illegalDecorators = decorators;
|
|
37340
37347
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37341
37348
|
}
|
|
37342
37349
|
// In an ambient declaration, the grammar only allows integer literals as initializers.
|
|
@@ -37362,7 +37369,7 @@ var ts;
|
|
|
37362
37369
|
members = createMissingList();
|
|
37363
37370
|
}
|
|
37364
37371
|
var node = factory.createEnumDeclaration(modifiers, name, members);
|
|
37365
|
-
node.
|
|
37372
|
+
node.illegalDecorators = decorators;
|
|
37366
37373
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37367
37374
|
}
|
|
37368
37375
|
function parseModuleBlock() {
|
|
@@ -37386,7 +37393,7 @@ var ts;
|
|
|
37386
37393
|
? parseModuleOrNamespaceDeclaration(getNodePos(), /*hasJSDoc*/ false, /*decorators*/ undefined, /*modifiers*/ undefined, 4 /* NestedNamespace */ | namespaceFlag)
|
|
37387
37394
|
: parseModuleBlock();
|
|
37388
37395
|
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
37389
|
-
node.
|
|
37396
|
+
node.illegalDecorators = decorators;
|
|
37390
37397
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37391
37398
|
}
|
|
37392
37399
|
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37409,7 +37416,7 @@ var ts;
|
|
|
37409
37416
|
parseSemicolon();
|
|
37410
37417
|
}
|
|
37411
37418
|
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
37412
|
-
node.
|
|
37419
|
+
node.illegalDecorators = decorators;
|
|
37413
37420
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37414
37421
|
}
|
|
37415
37422
|
function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37449,7 +37456,7 @@ var ts;
|
|
|
37449
37456
|
parseSemicolon();
|
|
37450
37457
|
var node = factory.createNamespaceExportDeclaration(name);
|
|
37451
37458
|
// NamespaceExportDeclaration nodes cannot have decorators or modifiers, so we attach them here so we can report them in the grammar checker
|
|
37452
|
-
node.
|
|
37459
|
+
node.illegalDecorators = decorators;
|
|
37453
37460
|
node.modifiers = modifiers;
|
|
37454
37461
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37455
37462
|
}
|
|
@@ -37489,7 +37496,7 @@ var ts;
|
|
|
37489
37496
|
}
|
|
37490
37497
|
parseSemicolon();
|
|
37491
37498
|
var node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
37492
|
-
node.
|
|
37499
|
+
node.illegalDecorators = decorators;
|
|
37493
37500
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37494
37501
|
}
|
|
37495
37502
|
function parseAssertEntry() {
|
|
@@ -37534,7 +37541,7 @@ var ts;
|
|
|
37534
37541
|
var moduleReference = parseModuleReference();
|
|
37535
37542
|
parseSemicolon();
|
|
37536
37543
|
var node = factory.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
37537
|
-
node.
|
|
37544
|
+
node.illegalDecorators = decorators;
|
|
37538
37545
|
var finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37539
37546
|
return finished;
|
|
37540
37547
|
}
|
|
@@ -37724,7 +37731,7 @@ var ts;
|
|
|
37724
37731
|
parseSemicolon();
|
|
37725
37732
|
setAwaitContext(savedAwaitContext);
|
|
37726
37733
|
var node = factory.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
37727
|
-
node.
|
|
37734
|
+
node.illegalDecorators = decorators;
|
|
37728
37735
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37729
37736
|
}
|
|
37730
37737
|
function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37741,7 +37748,7 @@ var ts;
|
|
|
37741
37748
|
parseSemicolon();
|
|
37742
37749
|
setAwaitContext(savedAwaitContext);
|
|
37743
37750
|
var node = factory.createExportAssignment(modifiers, isExportEquals, expression);
|
|
37744
|
-
node.
|
|
37751
|
+
node.illegalDecorators = decorators;
|
|
37745
37752
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37746
37753
|
}
|
|
37747
37754
|
var ParsingContext;
|
|
@@ -51039,41 +51046,61 @@ var ts;
|
|
|
51039
51046
|
return typeof file.externalModuleIndicator !== "object" && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), /*sourceNode*/ undefined, dontResolveAlias);
|
|
51040
51047
|
}
|
|
51041
51048
|
function getTargetOfImportClause(node, dontResolveAlias) {
|
|
51042
|
-
var _a;
|
|
51043
51049
|
var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
|
|
51044
51050
|
if (moduleSymbol) {
|
|
51045
|
-
|
|
51046
|
-
|
|
51047
|
-
|
|
51048
|
-
|
|
51049
|
-
|
|
51050
|
-
|
|
51051
|
-
|
|
51052
|
-
|
|
51053
|
-
|
|
51054
|
-
|
|
51055
|
-
|
|
51056
|
-
|
|
51057
|
-
|
|
51058
|
-
|
|
51059
|
-
|
|
51060
|
-
|
|
51061
|
-
|
|
51062
|
-
|
|
51063
|
-
|
|
51064
|
-
|
|
51065
|
-
|
|
51066
|
-
|
|
51051
|
+
return getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias);
|
|
51052
|
+
}
|
|
51053
|
+
}
|
|
51054
|
+
function getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias) {
|
|
51055
|
+
var _a;
|
|
51056
|
+
var exportDefaultSymbol;
|
|
51057
|
+
if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
|
|
51058
|
+
exportDefaultSymbol = moduleSymbol;
|
|
51059
|
+
}
|
|
51060
|
+
else {
|
|
51061
|
+
exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias);
|
|
51062
|
+
}
|
|
51063
|
+
var file = (_a = moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
|
|
51064
|
+
var specifier = getModuleSpecifierForImportOrExport(node);
|
|
51065
|
+
if (!specifier) {
|
|
51066
|
+
return exportDefaultSymbol;
|
|
51067
|
+
}
|
|
51068
|
+
var hasDefaultOnly = isOnlyImportedAsDefault(specifier);
|
|
51069
|
+
var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier);
|
|
51070
|
+
if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) {
|
|
51071
|
+
if (hasExportAssignmentSymbol(moduleSymbol)) {
|
|
51072
|
+
var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015 ? "allowSyntheticDefaultImports" : "esModuleInterop";
|
|
51073
|
+
var exportEqualsSymbol = moduleSymbol.exports.get("export=" /* ExportEquals */);
|
|
51074
|
+
var exportAssignment = exportEqualsSymbol.valueDeclaration;
|
|
51075
|
+
var err = error(node.name, ts.Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName);
|
|
51076
|
+
if (exportAssignment) {
|
|
51077
|
+
ts.addRelatedInfo(err, ts.createDiagnosticForNode(exportAssignment, ts.Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, compilerOptionName));
|
|
51067
51078
|
}
|
|
51068
51079
|
}
|
|
51069
|
-
else if (
|
|
51070
|
-
|
|
51071
|
-
var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
|
|
51072
|
-
markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false);
|
|
51073
|
-
return resolved;
|
|
51080
|
+
else if (ts.isImportClause(node)) {
|
|
51081
|
+
reportNonDefaultExport(moduleSymbol, node);
|
|
51074
51082
|
}
|
|
51075
|
-
|
|
51076
|
-
|
|
51083
|
+
else {
|
|
51084
|
+
errorNoModuleMemberSymbol(moduleSymbol, moduleSymbol, node, ts.isImportOrExportSpecifier(node) && node.propertyName || node.name);
|
|
51085
|
+
}
|
|
51086
|
+
}
|
|
51087
|
+
else if (hasSyntheticDefault || hasDefaultOnly) {
|
|
51088
|
+
// per emit behavior, a synthetic default overrides a "real" .default member if `__esModule` is not present
|
|
51089
|
+
var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
|
|
51090
|
+
markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, /*overwriteTypeOnly*/ false);
|
|
51091
|
+
return resolved;
|
|
51092
|
+
}
|
|
51093
|
+
markSymbolOfAliasDeclarationIfTypeOnly(node, exportDefaultSymbol, /*finalTarget*/ undefined, /*overwriteTypeOnly*/ false);
|
|
51094
|
+
return exportDefaultSymbol;
|
|
51095
|
+
}
|
|
51096
|
+
function getModuleSpecifierForImportOrExport(node) {
|
|
51097
|
+
switch (node.kind) {
|
|
51098
|
+
case 267 /* ImportClause */: return node.parent.moduleSpecifier;
|
|
51099
|
+
case 265 /* ImportEqualsDeclaration */: return ts.isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : undefined;
|
|
51100
|
+
case 268 /* NamespaceImport */: return node.parent.parent.moduleSpecifier;
|
|
51101
|
+
case 270 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier;
|
|
51102
|
+
case 275 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier;
|
|
51103
|
+
default: return ts.Debug.assertNever(node);
|
|
51077
51104
|
}
|
|
51078
51105
|
}
|
|
51079
51106
|
function reportNonDefaultExport(moduleSymbol, node) {
|
|
@@ -51163,7 +51190,7 @@ var ts;
|
|
|
51163
51190
|
}
|
|
51164
51191
|
}
|
|
51165
51192
|
function getExternalModuleMember(node, specifier, dontResolveAlias) {
|
|
51166
|
-
var _a
|
|
51193
|
+
var _a;
|
|
51167
51194
|
if (dontResolveAlias === void 0) { dontResolveAlias = false; }
|
|
51168
51195
|
var moduleSpecifier = ts.getExternalModuleRequireArgument(node) || node.moduleSpecifier;
|
|
51169
51196
|
var moduleSymbol = resolveExternalModuleName(node, moduleSpecifier); // TODO: GH#18217
|
|
@@ -51199,29 +51226,33 @@ var ts;
|
|
|
51199
51226
|
combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
|
|
51200
51227
|
symbolFromModule || symbolFromVariable;
|
|
51201
51228
|
if (!symbol) {
|
|
51202
|
-
|
|
51203
|
-
var declarationName = ts.declarationNameToString(name);
|
|
51204
|
-
var suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol);
|
|
51205
|
-
if (suggestion !== undefined) {
|
|
51206
|
-
var suggestionName = symbolToString(suggestion);
|
|
51207
|
-
var diagnostic = error(name, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName);
|
|
51208
|
-
if (suggestion.valueDeclaration) {
|
|
51209
|
-
ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestionName));
|
|
51210
|
-
}
|
|
51211
|
-
}
|
|
51212
|
-
else {
|
|
51213
|
-
if ((_b = moduleSymbol.exports) === null || _b === void 0 ? void 0 : _b.has("default" /* Default */)) {
|
|
51214
|
-
error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName);
|
|
51215
|
-
}
|
|
51216
|
-
else {
|
|
51217
|
-
reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName);
|
|
51218
|
-
}
|
|
51219
|
-
}
|
|
51229
|
+
errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name);
|
|
51220
51230
|
}
|
|
51221
51231
|
return symbol;
|
|
51222
51232
|
}
|
|
51223
51233
|
}
|
|
51224
51234
|
}
|
|
51235
|
+
function errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name) {
|
|
51236
|
+
var _a;
|
|
51237
|
+
var moduleName = getFullyQualifiedName(moduleSymbol, node);
|
|
51238
|
+
var declarationName = ts.declarationNameToString(name);
|
|
51239
|
+
var suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol);
|
|
51240
|
+
if (suggestion !== undefined) {
|
|
51241
|
+
var suggestionName = symbolToString(suggestion);
|
|
51242
|
+
var diagnostic = error(name, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName);
|
|
51243
|
+
if (suggestion.valueDeclaration) {
|
|
51244
|
+
ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestionName));
|
|
51245
|
+
}
|
|
51246
|
+
}
|
|
51247
|
+
else {
|
|
51248
|
+
if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default" /* Default */)) {
|
|
51249
|
+
error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName);
|
|
51250
|
+
}
|
|
51251
|
+
else {
|
|
51252
|
+
reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName);
|
|
51253
|
+
}
|
|
51254
|
+
}
|
|
51255
|
+
}
|
|
51225
51256
|
function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) {
|
|
51226
51257
|
var _a, _b;
|
|
51227
51258
|
var localSymbol = (_b = (_a = moduleSymbol.valueDeclaration) === null || _a === void 0 ? void 0 : _a.locals) === null || _b === void 0 ? void 0 : _b.get(name.escapedText);
|
|
@@ -51267,6 +51298,13 @@ var ts;
|
|
|
51267
51298
|
}
|
|
51268
51299
|
}
|
|
51269
51300
|
function getTargetOfImportSpecifier(node, dontResolveAlias) {
|
|
51301
|
+
if (ts.isImportSpecifier(node) && ts.idText(node.propertyName || node.name) === "default" /* Default */) {
|
|
51302
|
+
var specifier = getModuleSpecifierForImportOrExport(node);
|
|
51303
|
+
var moduleSymbol = specifier && resolveExternalModuleName(node, specifier);
|
|
51304
|
+
if (moduleSymbol) {
|
|
51305
|
+
return getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias);
|
|
51306
|
+
}
|
|
51307
|
+
}
|
|
51270
51308
|
var root = ts.isBindingElement(node) ? ts.getRootDeclaration(node) : node.parent.parent.parent;
|
|
51271
51309
|
var commonJSPropertyAccess = getCommonJSPropertyAccess(root);
|
|
51272
51310
|
var resolved = getExternalModuleMember(root, commonJSPropertyAccess || node, dontResolveAlias);
|
|
@@ -51288,6 +51326,13 @@ var ts;
|
|
|
51288
51326
|
return resolved;
|
|
51289
51327
|
}
|
|
51290
51328
|
function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {
|
|
51329
|
+
if (ts.idText(node.propertyName || node.name) === "default" /* Default */) {
|
|
51330
|
+
var specifier = getModuleSpecifierForImportOrExport(node);
|
|
51331
|
+
var moduleSymbol = specifier && resolveExternalModuleName(node, specifier);
|
|
51332
|
+
if (moduleSymbol) {
|
|
51333
|
+
return getTargetofModuleDefault(moduleSymbol, node, !!dontResolveAlias);
|
|
51334
|
+
}
|
|
51335
|
+
}
|
|
51291
51336
|
var resolved = node.parent.parent.moduleSpecifier ?
|
|
51292
51337
|
getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
|
|
51293
51338
|
resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias);
|
|
@@ -55736,7 +55781,7 @@ var ts;
|
|
|
55736
55781
|
// This is an else/if as accessors and properties can't merge in TS, but might in JS
|
|
55737
55782
|
// If this happens, we assume the accessor takes priority, as it imposes more constraints
|
|
55738
55783
|
else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) {
|
|
55739
|
-
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), name, p.flags & 16777216 /* Optional */ ? ts.factory.createToken(57 /* QuestionToken */) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context,
|
|
55784
|
+
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), name, p.flags & 16777216 /* Optional */ ? ts.factory.createToken(57 /* QuestionToken */) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled),
|
|
55740
55785
|
// TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357
|
|
55741
55786
|
// interface members can't have initializers, however class members _can_
|
|
55742
55787
|
/*initializer*/ undefined), ((_d = p.declarations) === null || _d === void 0 ? void 0 : _d.find(ts.or(ts.isPropertyDeclaration, ts.isVariableDeclaration))) || firstPropertyLikeDecl);
|
|
@@ -56988,8 +57033,32 @@ var ts;
|
|
|
56988
57033
|
// The type implied by a binding pattern is independent of context, so we check the initializer with no
|
|
56989
57034
|
// contextual type or, if the element itself is a binding pattern, with the type implied by that binding
|
|
56990
57035
|
// pattern.
|
|
56991
|
-
|
|
56992
|
-
|
|
57036
|
+
if (ts.isBindingPattern(element.name)) {
|
|
57037
|
+
var contextualType = getTypeFromBindingPattern(element.name, /*includePatternInType*/ true, /*reportErrors*/ false);
|
|
57038
|
+
return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));
|
|
57039
|
+
}
|
|
57040
|
+
// (#49989)
|
|
57041
|
+
// In cases where the intitializer is an identifier referencing a sibling symbol (i.e., one that is
|
|
57042
|
+
// defined in the same declaration) a false circular relationship will be concluded. For example, take
|
|
57043
|
+
// the declarations below:
|
|
57044
|
+
//
|
|
57045
|
+
// const [a, b = a] = [1];
|
|
57046
|
+
// const {a, b = a} = {a: 1};
|
|
57047
|
+
//
|
|
57048
|
+
// Here, when the `element` is the second binding element (i.e., `b = a`) the initializer is `a` which
|
|
57049
|
+
// itself is defined within the same binding pattern.
|
|
57050
|
+
//
|
|
57051
|
+
// So, we check the initializer expression for any references to sibling symbols and if any, then we'd
|
|
57052
|
+
// conclude the binding element type as `unknownType` and thus skip further circulations in type
|
|
57053
|
+
// checking.
|
|
57054
|
+
var siblings_1 = ts.mapDefined(element.parent.elements, function (x) { return x !== element && ts.isBindingElement(x) && ts.isIdentifier(x.name) ? x : undefined; });
|
|
57055
|
+
var checkIsSiblingInvolved = function (node) {
|
|
57056
|
+
var declaration = ts.isIdentifier(node) && getReferencedValueDeclaration(node);
|
|
57057
|
+
return declaration && ts.isBindingElement(declaration) && siblings_1.includes(declaration);
|
|
57058
|
+
};
|
|
57059
|
+
var isSiblingElementInvolded = checkIsSiblingInvolved(element.initializer) || ts.forEachChildRecursively(element.initializer, checkIsSiblingInvolved);
|
|
57060
|
+
return isSiblingElementInvolded ? anyType
|
|
57061
|
+
: addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, unknownType)));
|
|
56993
57062
|
}
|
|
56994
57063
|
if (ts.isBindingPattern(element.name)) {
|
|
56995
57064
|
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
|
|
@@ -68435,19 +68504,19 @@ var ts;
|
|
|
68435
68504
|
}
|
|
68436
68505
|
function getSiblingsOfContext(context) {
|
|
68437
68506
|
if (!context.siblings) {
|
|
68438
|
-
var
|
|
68507
|
+
var siblings_2 = [];
|
|
68439
68508
|
for (var _i = 0, _a = getSiblingsOfContext(context.parent); _i < _a.length; _i++) {
|
|
68440
68509
|
var type = _a[_i];
|
|
68441
68510
|
if (isObjectLiteralType(type)) {
|
|
68442
68511
|
var prop = getPropertyOfObjectType(type, context.propertyName);
|
|
68443
68512
|
if (prop) {
|
|
68444
68513
|
forEachType(getTypeOfSymbol(prop), function (t) {
|
|
68445
|
-
|
|
68514
|
+
siblings_2.push(t);
|
|
68446
68515
|
});
|
|
68447
68516
|
}
|
|
68448
68517
|
}
|
|
68449
68518
|
}
|
|
68450
|
-
context.siblings =
|
|
68519
|
+
context.siblings = siblings_2;
|
|
68451
68520
|
}
|
|
68452
68521
|
return context.siblings;
|
|
68453
68522
|
}
|
|
@@ -88760,7 +88829,7 @@ var ts;
|
|
|
88760
88829
|
return checkGrammarDecorators(node) || checkGrammarModifiers(node);
|
|
88761
88830
|
}
|
|
88762
88831
|
function checkGrammarDecorators(node) {
|
|
88763
|
-
if (ts.canHaveIllegalDecorators(node) && ts.some(node.
|
|
88832
|
+
if (ts.canHaveIllegalDecorators(node) && ts.some(node.illegalDecorators)) {
|
|
88764
88833
|
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
|
|
88765
88834
|
}
|
|
88766
88835
|
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node)) {
|
|
@@ -182438,9 +182507,9 @@ var ts;
|
|
|
182438
182507
|
// - error: 5.0
|
|
182439
182508
|
var ts;
|
|
182440
182509
|
(function (ts) {
|
|
182441
|
-
var MUST_MERGE = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators have been combined with modifiers. Callers should switch to an overload
|
|
182442
|
-
var DISALLOW_DECORATORS = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators are no longer supported for this function. Callers should switch to an overload
|
|
182443
|
-
var DISALLOW_DECORATORS_AND_MODIFIERS = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators and modifiers are no longer supported for this function. Callers should switch to an overload
|
|
182510
|
+
var MUST_MERGE = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter." };
|
|
182511
|
+
var DISALLOW_DECORATORS = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter." };
|
|
182512
|
+
var DISALLOW_DECORATORS_AND_MODIFIERS = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators and modifiers are no longer supported for this function. Callers should switch to an overload that does not accept the 'decorators' and 'modifiers' parameters." };
|
|
182444
182513
|
function patchNodeFactory(factory) {
|
|
182445
182514
|
var createParameterDeclaration = factory.createParameterDeclaration, updateParameterDeclaration = factory.updateParameterDeclaration, createPropertyDeclaration = factory.createPropertyDeclaration, updatePropertyDeclaration = factory.updatePropertyDeclaration, createMethodDeclaration = factory.createMethodDeclaration, updateMethodDeclaration = factory.updateMethodDeclaration, createConstructorDeclaration = factory.createConstructorDeclaration, updateConstructorDeclaration = factory.updateConstructorDeclaration, createGetAccessorDeclaration = factory.createGetAccessorDeclaration, updateGetAccessorDeclaration = factory.updateGetAccessorDeclaration, createSetAccessorDeclaration = factory.createSetAccessorDeclaration, updateSetAccessorDeclaration = factory.updateSetAccessorDeclaration, createIndexSignature = factory.createIndexSignature, updateIndexSignature = factory.updateIndexSignature, createClassStaticBlockDeclaration = factory.createClassStaticBlockDeclaration, updateClassStaticBlockDeclaration = factory.updateClassStaticBlockDeclaration, createClassExpression = factory.createClassExpression, updateClassExpression = factory.updateClassExpression, createFunctionDeclaration = factory.createFunctionDeclaration, updateFunctionDeclaration = factory.updateFunctionDeclaration, createClassDeclaration = factory.createClassDeclaration, updateClassDeclaration = factory.updateClassDeclaration, createInterfaceDeclaration = factory.createInterfaceDeclaration, updateInterfaceDeclaration = factory.updateInterfaceDeclaration, createTypeAliasDeclaration = factory.createTypeAliasDeclaration, updateTypeAliasDeclaration = factory.updateTypeAliasDeclaration, createEnumDeclaration = factory.createEnumDeclaration, updateEnumDeclaration = factory.updateEnumDeclaration, createModuleDeclaration = factory.createModuleDeclaration, updateModuleDeclaration = factory.updateModuleDeclaration, createImportEqualsDeclaration = factory.createImportEqualsDeclaration, updateImportEqualsDeclaration = factory.updateImportEqualsDeclaration, createImportDeclaration = factory.createImportDeclaration, updateImportDeclaration = factory.updateImportDeclaration, createExportAssignment = factory.createExportAssignment, updateExportAssignment = factory.updateExportAssignment, createExportDeclaration = factory.createExportDeclaration, updateExportDeclaration = factory.updateExportDeclaration;
|
|
182446
182515
|
factory.createParameterDeclaration = ts.buildOverload("createParameterDeclaration")
|
|
@@ -182667,7 +182736,7 @@ var ts;
|
|
|
182667
182736
|
return (decorators === undefined || !ts.some(decorators, ts.isModifier)) &&
|
|
182668
182737
|
(modifiers === undefined || !ts.some(modifiers, ts.isParameter)) &&
|
|
182669
182738
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
182670
|
-
(body === undefined ||
|
|
182739
|
+
(body === undefined || ts.isBlock(body));
|
|
182671
182740
|
},
|
|
182672
182741
|
})
|
|
182673
182742
|
.deprecate({
|
|
@@ -182696,7 +182765,7 @@ var ts;
|
|
|
182696
182765
|
return (decorators === undefined || !ts.some(decorators, ts.isModifier)) &&
|
|
182697
182766
|
(modifiers === undefined || !ts.some(modifiers, ts.isParameter)) &&
|
|
182698
182767
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
182699
|
-
(body === undefined ||
|
|
182768
|
+
(body === undefined || ts.isBlock(body));
|
|
182700
182769
|
},
|
|
182701
182770
|
})
|
|
182702
182771
|
.deprecate({
|