@schematics/angular 14.2.0 → 15.0.0-next.0
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/app-shell/schema.d.ts +0 -4
- package/app-shell/schema.json +0 -5
- package/class/schema.d.ts +1 -1
- package/class/schema.json +1 -1
- package/component/index.js +8 -69
- package/component/schema.d.ts +1 -1
- package/component/schema.json +1 -1
- package/directive/index.js +8 -65
- package/directive/schema.d.ts +1 -1
- package/directive/schema.json +1 -1
- package/enum/schema.d.ts +1 -1
- package/enum/schema.json +1 -1
- package/guard/schema.d.ts +1 -1
- package/guard/schema.json +1 -1
- package/interceptor/schema.d.ts +1 -1
- package/interceptor/schema.json +1 -1
- package/interface/schema.d.ts +1 -1
- package/interface/schema.json +1 -1
- package/module/index.js +2 -2
- package/module/schema.d.ts +1 -1
- package/module/schema.json +1 -1
- package/package.json +4 -4
- package/pipe/index.js +8 -63
- package/pipe/schema.d.ts +1 -1
- package/pipe/schema.json +1 -1
- package/resolver/schema.d.ts +1 -1
- package/resolver/schema.json +1 -1
- package/service/schema.d.ts +1 -1
- package/service/schema.json +1 -1
- package/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +4 -4
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +61 -117
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +133 -151
- package/universal/schema.d.ts +0 -5
- package/universal/schema.json +0 -7
- package/utility/add-declaration-to-ng-module.d.ts +19 -0
- package/utility/add-declaration-to-ng-module.js +68 -0
- package/utility/generate-from-files.d.ts +1 -1
- package/utility/latest-versions/package.json +3 -3
- package/utility/latest-versions.js +1 -1
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "4.8.
|
|
297
|
+
ts.version = "4.8.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -2674,6 +2674,7 @@ var ts;
|
|
|
2674
2674
|
var currentAssertionLevel = 0 /* AssertionLevel.None */;
|
|
2675
2675
|
Debug.currentLogLevel = LogLevel.Warning;
|
|
2676
2676
|
Debug.isDebugging = false;
|
|
2677
|
+
Debug.enableDeprecationWarnings = true;
|
|
2677
2678
|
function getTypeScriptVersion() {
|
|
2678
2679
|
return typeScriptVersion !== null && typeScriptVersion !== void 0 ? typeScriptVersion : (typeScriptVersion = new ts.Version(ts.version));
|
|
2679
2680
|
}
|
|
@@ -3297,7 +3298,7 @@ var ts;
|
|
|
3297
3298
|
function createWarningDeprecation(name, errorAfter, since, message) {
|
|
3298
3299
|
var hasWrittenDeprecation = false;
|
|
3299
3300
|
return function () {
|
|
3300
|
-
if (!hasWrittenDeprecation) {
|
|
3301
|
+
if (Debug.enableDeprecationWarnings && !hasWrittenDeprecation) {
|
|
3301
3302
|
log.warn(formatDeprecationMessage(name, /*error*/ false, errorAfter, since, message));
|
|
3302
3303
|
hasWrittenDeprecation = true;
|
|
3303
3304
|
}
|
|
@@ -7185,7 +7186,6 @@ var ts;
|
|
|
7185
7186
|
// not actually work.
|
|
7186
7187
|
var byteOrderMarkIndicator = "\uFEFF";
|
|
7187
7188
|
function getNodeSystem() {
|
|
7188
|
-
var _a;
|
|
7189
7189
|
var nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/;
|
|
7190
7190
|
var _fs = require("fs");
|
|
7191
7191
|
var _path = require("path");
|
|
@@ -7195,7 +7195,7 @@ var ts;
|
|
|
7195
7195
|
try {
|
|
7196
7196
|
_crypto = require("crypto");
|
|
7197
7197
|
}
|
|
7198
|
-
catch (
|
|
7198
|
+
catch (_a) {
|
|
7199
7199
|
_crypto = undefined;
|
|
7200
7200
|
}
|
|
7201
7201
|
var activeSession;
|
|
@@ -7206,10 +7206,10 @@ var ts;
|
|
|
7206
7206
|
var isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
7207
7207
|
var platform = _os.platform();
|
|
7208
7208
|
var useCaseSensitiveFileNames = isFileSystemCaseSensitive();
|
|
7209
|
-
var
|
|
7209
|
+
var fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
7210
7210
|
var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
|
|
7211
7211
|
var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
|
|
7212
|
-
var
|
|
7212
|
+
var _b = createSystemWatchFunctions({
|
|
7213
7213
|
pollingWatchFile: createSingleFileWatcherPerName(fsWatchFileWorker, useCaseSensitiveFileNames),
|
|
7214
7214
|
getModifiedTime: getModifiedTime,
|
|
7215
7215
|
setTimeout: setTimeout,
|
|
@@ -7229,7 +7229,7 @@ var ts;
|
|
|
7229
7229
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
7230
7230
|
inodeWatching: isLinuxOrMacOs,
|
|
7231
7231
|
sysLog: sysLog,
|
|
7232
|
-
}), watchFile =
|
|
7232
|
+
}), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
|
|
7233
7233
|
var nodeSystem = {
|
|
7234
7234
|
args: process.argv.slice(2),
|
|
7235
7235
|
newLine: _os.EOL,
|
|
@@ -7622,9 +7622,12 @@ var ts;
|
|
|
7622
7622
|
function getDirectories(path) {
|
|
7623
7623
|
return getAccessibleFileSystemEntries(path).directories.slice();
|
|
7624
7624
|
}
|
|
7625
|
+
function fsRealPathHandlingLongPath(path) {
|
|
7626
|
+
return path.length < 260 ? _fs.realpathSync.native(path) : _fs.realpathSync(path);
|
|
7627
|
+
}
|
|
7625
7628
|
function realpath(path) {
|
|
7626
7629
|
try {
|
|
7627
|
-
return
|
|
7630
|
+
return fsRealpath(path);
|
|
7628
7631
|
}
|
|
7629
7632
|
catch (_a) {
|
|
7630
7633
|
return path;
|
|
@@ -21552,7 +21555,7 @@ var ts;
|
|
|
21552
21555
|
case 165 /* SyntaxKind.Decorator */: {
|
|
21553
21556
|
var parent_2 = node.parent;
|
|
21554
21557
|
return ts.canHaveDecorators(parent_2) ? parent_2.modifiers :
|
|
21555
|
-
ts.canHaveIllegalDecorators(parent_2) ? parent_2.
|
|
21558
|
+
ts.canHaveIllegalDecorators(parent_2) ? parent_2.illegalDecorators :
|
|
21556
21559
|
undefined;
|
|
21557
21560
|
}
|
|
21558
21561
|
case 291 /* SyntaxKind.HeritageClause */:
|
|
@@ -23629,7 +23632,7 @@ var ts;
|
|
|
23629
23632
|
node.body = body;
|
|
23630
23633
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* TransformFlags.ContainsClassFields */;
|
|
23631
23634
|
// The following properties are used only to report grammar errors
|
|
23632
|
-
node.
|
|
23635
|
+
node.illegalDecorators = undefined;
|
|
23633
23636
|
node.modifiers = undefined;
|
|
23634
23637
|
return node;
|
|
23635
23638
|
}
|
|
@@ -23641,7 +23644,7 @@ var ts;
|
|
|
23641
23644
|
}
|
|
23642
23645
|
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
23643
23646
|
if (updated !== original) {
|
|
23644
|
-
updated.
|
|
23647
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
23645
23648
|
updated.modifiers = original.modifiers;
|
|
23646
23649
|
}
|
|
23647
23650
|
return update(updated, original);
|
|
@@ -23654,7 +23657,7 @@ var ts;
|
|
|
23654
23657
|
/*type*/ undefined, body);
|
|
23655
23658
|
node.transformFlags |= 1024 /* TransformFlags.ContainsES2015 */;
|
|
23656
23659
|
// The following properties are used only to report grammar errors
|
|
23657
|
-
node.
|
|
23660
|
+
node.illegalDecorators = undefined;
|
|
23658
23661
|
node.typeParameters = undefined;
|
|
23659
23662
|
node.type = undefined;
|
|
23660
23663
|
return node;
|
|
@@ -23669,7 +23672,7 @@ var ts;
|
|
|
23669
23672
|
}
|
|
23670
23673
|
function finishUpdateConstructorDeclaration(updated, original) {
|
|
23671
23674
|
if (updated !== original) {
|
|
23672
|
-
updated.
|
|
23675
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
23673
23676
|
updated.typeParameters = original.typeParameters;
|
|
23674
23677
|
updated.type = original.type;
|
|
23675
23678
|
}
|
|
@@ -25417,7 +25420,7 @@ var ts;
|
|
|
25417
25420
|
}
|
|
25418
25421
|
}
|
|
25419
25422
|
// The following properties are used only to report grammar errors
|
|
25420
|
-
node.
|
|
25423
|
+
node.illegalDecorators = undefined;
|
|
25421
25424
|
return node;
|
|
25422
25425
|
}
|
|
25423
25426
|
// @api
|
|
@@ -25435,7 +25438,7 @@ var ts;
|
|
|
25435
25438
|
function finishUpdateFunctionDeclaration(updated, original) {
|
|
25436
25439
|
if (updated !== original) {
|
|
25437
25440
|
// copy children used only for error reporting
|
|
25438
|
-
updated.
|
|
25441
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25439
25442
|
}
|
|
25440
25443
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
25441
25444
|
}
|
|
@@ -25469,7 +25472,7 @@ var ts;
|
|
|
25469
25472
|
node.members = createNodeArray(members);
|
|
25470
25473
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
25471
25474
|
// The following properties are used only to report grammar errors
|
|
25472
|
-
node.
|
|
25475
|
+
node.illegalDecorators = undefined;
|
|
25473
25476
|
return node;
|
|
25474
25477
|
}
|
|
25475
25478
|
// @api
|
|
@@ -25484,7 +25487,7 @@ var ts;
|
|
|
25484
25487
|
}
|
|
25485
25488
|
function finishUpdateInterfaceDeclaration(updated, original) {
|
|
25486
25489
|
if (updated !== original) {
|
|
25487
|
-
updated.
|
|
25490
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25488
25491
|
}
|
|
25489
25492
|
return update(updated, original);
|
|
25490
25493
|
}
|
|
@@ -25494,7 +25497,7 @@ var ts;
|
|
|
25494
25497
|
node.type = type;
|
|
25495
25498
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
25496
25499
|
// The following properties are used only to report grammar errors
|
|
25497
|
-
node.
|
|
25500
|
+
node.illegalDecorators = undefined;
|
|
25498
25501
|
return node;
|
|
25499
25502
|
}
|
|
25500
25503
|
// @api
|
|
@@ -25508,7 +25511,7 @@ var ts;
|
|
|
25508
25511
|
}
|
|
25509
25512
|
function finishUpdateTypeAliasDeclaration(updated, original) {
|
|
25510
25513
|
if (updated !== original) {
|
|
25511
|
-
updated.
|
|
25514
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25512
25515
|
}
|
|
25513
25516
|
return update(updated, original);
|
|
25514
25517
|
}
|
|
@@ -25521,7 +25524,7 @@ var ts;
|
|
|
25521
25524
|
1 /* TransformFlags.ContainsTypeScript */;
|
|
25522
25525
|
node.transformFlags &= ~67108864 /* TransformFlags.ContainsPossibleTopLevelAwait */; // Enum declarations cannot contain `await`
|
|
25523
25526
|
// The following properties are used only to report grammar errors
|
|
25524
|
-
node.
|
|
25527
|
+
node.illegalDecorators = undefined;
|
|
25525
25528
|
return node;
|
|
25526
25529
|
}
|
|
25527
25530
|
// @api
|
|
@@ -25534,7 +25537,7 @@ var ts;
|
|
|
25534
25537
|
}
|
|
25535
25538
|
function finishUpdateEnumDeclaration(updated, original) {
|
|
25536
25539
|
if (updated !== original) {
|
|
25537
|
-
updated.
|
|
25540
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25538
25541
|
}
|
|
25539
25542
|
return update(updated, original);
|
|
25540
25543
|
}
|
|
@@ -25558,7 +25561,7 @@ var ts;
|
|
|
25558
25561
|
}
|
|
25559
25562
|
node.transformFlags &= ~67108864 /* TransformFlags.ContainsPossibleTopLevelAwait */; // Module declarations cannot contain `await`.
|
|
25560
25563
|
// The following properties are used only to report grammar errors
|
|
25561
|
-
node.
|
|
25564
|
+
node.illegalDecorators = undefined;
|
|
25562
25565
|
return node;
|
|
25563
25566
|
}
|
|
25564
25567
|
// @api
|
|
@@ -25571,7 +25574,7 @@ var ts;
|
|
|
25571
25574
|
}
|
|
25572
25575
|
function finishUpdateModuleDeclaration(updated, original) {
|
|
25573
25576
|
if (updated !== original) {
|
|
25574
|
-
updated.
|
|
25577
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25575
25578
|
}
|
|
25576
25579
|
return update(updated, original);
|
|
25577
25580
|
}
|
|
@@ -25607,7 +25610,7 @@ var ts;
|
|
|
25607
25610
|
/*modifiers*/ undefined, name);
|
|
25608
25611
|
node.transformFlags = 1 /* TransformFlags.ContainsTypeScript */;
|
|
25609
25612
|
// The following properties are used only to report grammar errors
|
|
25610
|
-
node.
|
|
25613
|
+
node.illegalDecorators = undefined;
|
|
25611
25614
|
node.modifiers = undefined;
|
|
25612
25615
|
return node;
|
|
25613
25616
|
}
|
|
@@ -25619,7 +25622,7 @@ var ts;
|
|
|
25619
25622
|
}
|
|
25620
25623
|
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
25621
25624
|
if (updated !== original) {
|
|
25622
|
-
updated.
|
|
25625
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25623
25626
|
updated.modifiers = original.modifiers;
|
|
25624
25627
|
}
|
|
25625
25628
|
return update(updated, original);
|
|
@@ -25634,7 +25637,7 @@ var ts;
|
|
|
25634
25637
|
node.transformFlags |= 1 /* TransformFlags.ContainsTypeScript */;
|
|
25635
25638
|
node.transformFlags &= ~67108864 /* TransformFlags.ContainsPossibleTopLevelAwait */; // Import= declaration is always parsed in an Await context
|
|
25636
25639
|
// The following properties are used only to report grammar errors
|
|
25637
|
-
node.
|
|
25640
|
+
node.illegalDecorators = undefined;
|
|
25638
25641
|
return node;
|
|
25639
25642
|
}
|
|
25640
25643
|
// @api
|
|
@@ -25648,7 +25651,7 @@ var ts;
|
|
|
25648
25651
|
}
|
|
25649
25652
|
function finishUpdateImportEqualsDeclaration(updated, original) {
|
|
25650
25653
|
if (updated !== original) {
|
|
25651
|
-
updated.
|
|
25654
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25652
25655
|
}
|
|
25653
25656
|
return update(updated, original);
|
|
25654
25657
|
}
|
|
@@ -25664,7 +25667,7 @@ var ts;
|
|
|
25664
25667
|
propagateChildFlags(node.moduleSpecifier);
|
|
25665
25668
|
node.transformFlags &= ~67108864 /* TransformFlags.ContainsPossibleTopLevelAwait */; // always parsed in an Await context
|
|
25666
25669
|
// The following properties are used only to report grammar errors
|
|
25667
|
-
node.
|
|
25670
|
+
node.illegalDecorators = undefined;
|
|
25668
25671
|
return node;
|
|
25669
25672
|
}
|
|
25670
25673
|
// @api
|
|
@@ -25678,7 +25681,7 @@ var ts;
|
|
|
25678
25681
|
}
|
|
25679
25682
|
function finishUpdateImportDeclaration(updated, original) {
|
|
25680
25683
|
if (updated !== original) {
|
|
25681
|
-
updated.
|
|
25684
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25682
25685
|
}
|
|
25683
25686
|
return update(updated, original);
|
|
25684
25687
|
}
|
|
@@ -25824,7 +25827,7 @@ var ts;
|
|
|
25824
25827
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
25825
25828
|
node.transformFlags &= ~67108864 /* TransformFlags.ContainsPossibleTopLevelAwait */; // always parsed in an Await context
|
|
25826
25829
|
// The following properties are used only to report grammar errors
|
|
25827
|
-
node.
|
|
25830
|
+
node.illegalDecorators = undefined;
|
|
25828
25831
|
return node;
|
|
25829
25832
|
}
|
|
25830
25833
|
// @api
|
|
@@ -25836,7 +25839,7 @@ var ts;
|
|
|
25836
25839
|
}
|
|
25837
25840
|
function finishUpdateExportAssignment(updated, original) {
|
|
25838
25841
|
if (updated !== original) {
|
|
25839
|
-
updated.
|
|
25842
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25840
25843
|
}
|
|
25841
25844
|
return update(updated, original);
|
|
25842
25845
|
}
|
|
@@ -25854,7 +25857,7 @@ var ts;
|
|
|
25854
25857
|
propagateChildFlags(node.moduleSpecifier);
|
|
25855
25858
|
node.transformFlags &= ~67108864 /* TransformFlags.ContainsPossibleTopLevelAwait */; // always parsed in an Await context
|
|
25856
25859
|
// The following properties are used only to report grammar errors
|
|
25857
|
-
node.
|
|
25860
|
+
node.illegalDecorators = undefined;
|
|
25858
25861
|
return node;
|
|
25859
25862
|
}
|
|
25860
25863
|
// @api
|
|
@@ -25869,7 +25872,7 @@ var ts;
|
|
|
25869
25872
|
}
|
|
25870
25873
|
function finishUpdateExportDeclaration(updated, original) {
|
|
25871
25874
|
if (updated !== original) {
|
|
25872
|
-
updated.
|
|
25875
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
25873
25876
|
}
|
|
25874
25877
|
return update(updated, original);
|
|
25875
25878
|
}
|
|
@@ -26633,7 +26636,7 @@ var ts;
|
|
|
26633
26636
|
propagateChildFlags(node.name) |
|
|
26634
26637
|
propagateChildFlags(node.initializer);
|
|
26635
26638
|
// The following properties are used only to report grammar errors
|
|
26636
|
-
node.
|
|
26639
|
+
node.illegalDecorators = undefined;
|
|
26637
26640
|
node.modifiers = undefined;
|
|
26638
26641
|
node.questionToken = undefined;
|
|
26639
26642
|
node.exclamationToken = undefined;
|
|
@@ -26649,7 +26652,7 @@ var ts;
|
|
|
26649
26652
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
26650
26653
|
// copy children used only for error reporting
|
|
26651
26654
|
if (updated !== original) {
|
|
26652
|
-
updated.
|
|
26655
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
26653
26656
|
updated.modifiers = original.modifiers;
|
|
26654
26657
|
updated.questionToken = original.questionToken;
|
|
26655
26658
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -26666,7 +26669,7 @@ var ts;
|
|
|
26666
26669
|
1024 /* TransformFlags.ContainsES2015 */;
|
|
26667
26670
|
// The following properties are used only to report grammar errors
|
|
26668
26671
|
node.equalsToken = undefined;
|
|
26669
|
-
node.
|
|
26672
|
+
node.illegalDecorators = undefined;
|
|
26670
26673
|
node.modifiers = undefined;
|
|
26671
26674
|
node.questionToken = undefined;
|
|
26672
26675
|
node.exclamationToken = undefined;
|
|
@@ -26683,7 +26686,7 @@ var ts;
|
|
|
26683
26686
|
if (updated !== original) {
|
|
26684
26687
|
// copy children used only for error reporting
|
|
26685
26688
|
updated.equalsToken = original.equalsToken;
|
|
26686
|
-
updated.
|
|
26689
|
+
updated.illegalDecorators = original.illegalDecorators;
|
|
26687
26690
|
updated.modifiers = original.modifiers;
|
|
26688
26691
|
updated.questionToken = original.questionToken;
|
|
26689
26692
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -30694,17 +30697,6 @@ var ts;
|
|
|
30694
30697
|
|| kind === 173 /* SyntaxKind.SetAccessor */;
|
|
30695
30698
|
}
|
|
30696
30699
|
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
30697
|
-
function canHaveDecorators(node) {
|
|
30698
|
-
var kind = node.kind;
|
|
30699
|
-
return kind === 164 /* SyntaxKind.Parameter */
|
|
30700
|
-
|| kind === 167 /* SyntaxKind.PropertyDeclaration */
|
|
30701
|
-
|| kind === 169 /* SyntaxKind.MethodDeclaration */
|
|
30702
|
-
|| kind === 172 /* SyntaxKind.GetAccessor */
|
|
30703
|
-
|| kind === 173 /* SyntaxKind.SetAccessor */
|
|
30704
|
-
|| kind === 226 /* SyntaxKind.ClassExpression */
|
|
30705
|
-
|| kind === 257 /* SyntaxKind.ClassDeclaration */;
|
|
30706
|
-
}
|
|
30707
|
-
ts.canHaveDecorators = canHaveDecorators;
|
|
30708
30700
|
function canHaveIllegalDecorators(node) {
|
|
30709
30701
|
var kind = node.kind;
|
|
30710
30702
|
return kind === 296 /* SyntaxKind.PropertyAssignment */
|
|
@@ -30726,35 +30718,6 @@ var ts;
|
|
|
30726
30718
|
|| kind === 271 /* SyntaxKind.ExportAssignment */;
|
|
30727
30719
|
}
|
|
30728
30720
|
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
30729
|
-
function canHaveModifiers(node) {
|
|
30730
|
-
var kind = node.kind;
|
|
30731
|
-
return kind === 163 /* SyntaxKind.TypeParameter */
|
|
30732
|
-
|| kind === 164 /* SyntaxKind.Parameter */
|
|
30733
|
-
|| kind === 166 /* SyntaxKind.PropertySignature */
|
|
30734
|
-
|| kind === 167 /* SyntaxKind.PropertyDeclaration */
|
|
30735
|
-
|| kind === 168 /* SyntaxKind.MethodSignature */
|
|
30736
|
-
|| kind === 169 /* SyntaxKind.MethodDeclaration */
|
|
30737
|
-
|| kind === 171 /* SyntaxKind.Constructor */
|
|
30738
|
-
|| kind === 172 /* SyntaxKind.GetAccessor */
|
|
30739
|
-
|| kind === 173 /* SyntaxKind.SetAccessor */
|
|
30740
|
-
|| kind === 176 /* SyntaxKind.IndexSignature */
|
|
30741
|
-
|| kind === 180 /* SyntaxKind.ConstructorType */
|
|
30742
|
-
|| kind === 213 /* SyntaxKind.FunctionExpression */
|
|
30743
|
-
|| kind === 214 /* SyntaxKind.ArrowFunction */
|
|
30744
|
-
|| kind === 226 /* SyntaxKind.ClassExpression */
|
|
30745
|
-
|| kind === 237 /* SyntaxKind.VariableStatement */
|
|
30746
|
-
|| kind === 256 /* SyntaxKind.FunctionDeclaration */
|
|
30747
|
-
|| kind === 257 /* SyntaxKind.ClassDeclaration */
|
|
30748
|
-
|| kind === 258 /* SyntaxKind.InterfaceDeclaration */
|
|
30749
|
-
|| kind === 259 /* SyntaxKind.TypeAliasDeclaration */
|
|
30750
|
-
|| kind === 260 /* SyntaxKind.EnumDeclaration */
|
|
30751
|
-
|| kind === 261 /* SyntaxKind.ModuleDeclaration */
|
|
30752
|
-
|| kind === 265 /* SyntaxKind.ImportEqualsDeclaration */
|
|
30753
|
-
|| kind === 266 /* SyntaxKind.ImportDeclaration */
|
|
30754
|
-
|| kind === 271 /* SyntaxKind.ExportAssignment */
|
|
30755
|
-
|| kind === 272 /* SyntaxKind.ExportDeclaration */;
|
|
30756
|
-
}
|
|
30757
|
-
ts.canHaveModifiers = canHaveModifiers;
|
|
30758
30721
|
function canHaveIllegalModifiers(node) {
|
|
30759
30722
|
var kind = node.kind;
|
|
30760
30723
|
return kind === 170 /* SyntaxKind.ClassStaticBlockDeclaration */
|
|
@@ -31043,6 +31006,46 @@ var ts;
|
|
|
31043
31006
|
return location ? ts.setTextRangePosEnd(range, location.pos, location.end) : range;
|
|
31044
31007
|
}
|
|
31045
31008
|
ts.setTextRange = setTextRange;
|
|
31009
|
+
function canHaveModifiers(node) {
|
|
31010
|
+
var kind = node.kind;
|
|
31011
|
+
return kind === 163 /* SyntaxKind.TypeParameter */
|
|
31012
|
+
|| kind === 164 /* SyntaxKind.Parameter */
|
|
31013
|
+
|| kind === 166 /* SyntaxKind.PropertySignature */
|
|
31014
|
+
|| kind === 167 /* SyntaxKind.PropertyDeclaration */
|
|
31015
|
+
|| kind === 168 /* SyntaxKind.MethodSignature */
|
|
31016
|
+
|| kind === 169 /* SyntaxKind.MethodDeclaration */
|
|
31017
|
+
|| kind === 171 /* SyntaxKind.Constructor */
|
|
31018
|
+
|| kind === 172 /* SyntaxKind.GetAccessor */
|
|
31019
|
+
|| kind === 173 /* SyntaxKind.SetAccessor */
|
|
31020
|
+
|| kind === 176 /* SyntaxKind.IndexSignature */
|
|
31021
|
+
|| kind === 180 /* SyntaxKind.ConstructorType */
|
|
31022
|
+
|| kind === 213 /* SyntaxKind.FunctionExpression */
|
|
31023
|
+
|| kind === 214 /* SyntaxKind.ArrowFunction */
|
|
31024
|
+
|| kind === 226 /* SyntaxKind.ClassExpression */
|
|
31025
|
+
|| kind === 237 /* SyntaxKind.VariableStatement */
|
|
31026
|
+
|| kind === 256 /* SyntaxKind.FunctionDeclaration */
|
|
31027
|
+
|| kind === 257 /* SyntaxKind.ClassDeclaration */
|
|
31028
|
+
|| kind === 258 /* SyntaxKind.InterfaceDeclaration */
|
|
31029
|
+
|| kind === 259 /* SyntaxKind.TypeAliasDeclaration */
|
|
31030
|
+
|| kind === 260 /* SyntaxKind.EnumDeclaration */
|
|
31031
|
+
|| kind === 261 /* SyntaxKind.ModuleDeclaration */
|
|
31032
|
+
|| kind === 265 /* SyntaxKind.ImportEqualsDeclaration */
|
|
31033
|
+
|| kind === 266 /* SyntaxKind.ImportDeclaration */
|
|
31034
|
+
|| kind === 271 /* SyntaxKind.ExportAssignment */
|
|
31035
|
+
|| kind === 272 /* SyntaxKind.ExportDeclaration */;
|
|
31036
|
+
}
|
|
31037
|
+
ts.canHaveModifiers = canHaveModifiers;
|
|
31038
|
+
function canHaveDecorators(node) {
|
|
31039
|
+
var kind = node.kind;
|
|
31040
|
+
return kind === 164 /* SyntaxKind.Parameter */
|
|
31041
|
+
|| kind === 167 /* SyntaxKind.PropertyDeclaration */
|
|
31042
|
+
|| kind === 169 /* SyntaxKind.MethodDeclaration */
|
|
31043
|
+
|| kind === 172 /* SyntaxKind.GetAccessor */
|
|
31044
|
+
|| kind === 173 /* SyntaxKind.SetAccessor */
|
|
31045
|
+
|| kind === 226 /* SyntaxKind.ClassExpression */
|
|
31046
|
+
|| kind === 257 /* SyntaxKind.ClassDeclaration */;
|
|
31047
|
+
}
|
|
31048
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
31046
31049
|
})(ts || (ts = {}));
|
|
31047
31050
|
var ts;
|
|
31048
31051
|
(function (ts) {
|
|
@@ -31161,7 +31164,7 @@ var ts;
|
|
|
31161
31164
|
visitNode(cbNode, node.default) ||
|
|
31162
31165
|
visitNode(cbNode, node.expression);
|
|
31163
31166
|
case 297 /* SyntaxKind.ShorthandPropertyAssignment */:
|
|
31164
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31167
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31165
31168
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31166
31169
|
visitNode(cbNode, node.name) ||
|
|
31167
31170
|
visitNode(cbNode, node.questionToken) ||
|
|
@@ -31191,7 +31194,7 @@ var ts;
|
|
|
31191
31194
|
visitNode(cbNode, node.type) ||
|
|
31192
31195
|
visitNode(cbNode, node.initializer);
|
|
31193
31196
|
case 296 /* SyntaxKind.PropertyAssignment */:
|
|
31194
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31197
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31195
31198
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31196
31199
|
visitNode(cbNode, node.name) ||
|
|
31197
31200
|
visitNode(cbNode, node.questionToken) ||
|
|
@@ -31208,7 +31211,7 @@ var ts;
|
|
|
31208
31211
|
visitNode(cbNode, node.name) ||
|
|
31209
31212
|
visitNode(cbNode, node.initializer);
|
|
31210
31213
|
case 176 /* SyntaxKind.IndexSignature */:
|
|
31211
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31214
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31212
31215
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31213
31216
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
31214
31217
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
@@ -31246,7 +31249,7 @@ var ts;
|
|
|
31246
31249
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
31247
31250
|
visitNode(cbNode, node.type);
|
|
31248
31251
|
case 171 /* SyntaxKind.Constructor */:
|
|
31249
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31252
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31250
31253
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31251
31254
|
visitNode(cbNode, node.name) ||
|
|
31252
31255
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
@@ -31268,7 +31271,7 @@ var ts;
|
|
|
31268
31271
|
visitNode(cbNode, node.type) ||
|
|
31269
31272
|
visitNode(cbNode, node.body);
|
|
31270
31273
|
case 256 /* SyntaxKind.FunctionDeclaration */:
|
|
31271
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31274
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31272
31275
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31273
31276
|
visitNode(cbNode, node.asteriskToken) ||
|
|
31274
31277
|
visitNode(cbNode, node.name) ||
|
|
@@ -31292,7 +31295,7 @@ var ts;
|
|
|
31292
31295
|
visitNode(cbNode, node.equalsGreaterThanToken) ||
|
|
31293
31296
|
visitNode(cbNode, node.body);
|
|
31294
31297
|
case 170 /* SyntaxKind.ClassStaticBlockDeclaration */:
|
|
31295
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31298
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31296
31299
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31297
31300
|
visitNode(cbNode, node.body);
|
|
31298
31301
|
case 178 /* SyntaxKind.TypeReference */:
|
|
@@ -31420,7 +31423,7 @@ var ts;
|
|
|
31420
31423
|
return visitNodes(cbNode, cbNodes, node.statements) ||
|
|
31421
31424
|
visitNode(cbNode, node.endOfFileToken);
|
|
31422
31425
|
case 237 /* SyntaxKind.VariableStatement */:
|
|
31423
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31426
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31424
31427
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31425
31428
|
visitNode(cbNode, node.declarationList);
|
|
31426
31429
|
case 255 /* SyntaxKind.VariableDeclarationList */:
|
|
@@ -31491,20 +31494,20 @@ var ts;
|
|
|
31491
31494
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
31492
31495
|
visitNodes(cbNode, cbNodes, node.members);
|
|
31493
31496
|
case 258 /* SyntaxKind.InterfaceDeclaration */:
|
|
31494
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31497
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31495
31498
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31496
31499
|
visitNode(cbNode, node.name) ||
|
|
31497
31500
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
31498
31501
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
31499
31502
|
visitNodes(cbNode, cbNodes, node.members);
|
|
31500
31503
|
case 259 /* SyntaxKind.TypeAliasDeclaration */:
|
|
31501
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31504
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31502
31505
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31503
31506
|
visitNode(cbNode, node.name) ||
|
|
31504
31507
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
31505
31508
|
visitNode(cbNode, node.type);
|
|
31506
31509
|
case 260 /* SyntaxKind.EnumDeclaration */:
|
|
31507
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31510
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31508
31511
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31509
31512
|
visitNode(cbNode, node.name) ||
|
|
31510
31513
|
visitNodes(cbNode, cbNodes, node.members);
|
|
@@ -31512,17 +31515,17 @@ var ts;
|
|
|
31512
31515
|
return visitNode(cbNode, node.name) ||
|
|
31513
31516
|
visitNode(cbNode, node.initializer);
|
|
31514
31517
|
case 261 /* SyntaxKind.ModuleDeclaration */:
|
|
31515
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31518
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31516
31519
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31517
31520
|
visitNode(cbNode, node.name) ||
|
|
31518
31521
|
visitNode(cbNode, node.body);
|
|
31519
31522
|
case 265 /* SyntaxKind.ImportEqualsDeclaration */:
|
|
31520
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31523
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31521
31524
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31522
31525
|
visitNode(cbNode, node.name) ||
|
|
31523
31526
|
visitNode(cbNode, node.moduleReference);
|
|
31524
31527
|
case 266 /* SyntaxKind.ImportDeclaration */:
|
|
31525
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31528
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31526
31529
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31527
31530
|
visitNode(cbNode, node.importClause) ||
|
|
31528
31531
|
visitNode(cbNode, node.moduleSpecifier) ||
|
|
@@ -31536,7 +31539,7 @@ var ts;
|
|
|
31536
31539
|
return visitNode(cbNode, node.name) ||
|
|
31537
31540
|
visitNode(cbNode, node.value);
|
|
31538
31541
|
case 264 /* SyntaxKind.NamespaceExportDeclaration */:
|
|
31539
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31542
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31540
31543
|
visitNode(cbNode, node.name);
|
|
31541
31544
|
case 268 /* SyntaxKind.NamespaceImport */:
|
|
31542
31545
|
return visitNode(cbNode, node.name);
|
|
@@ -31546,7 +31549,7 @@ var ts;
|
|
|
31546
31549
|
case 273 /* SyntaxKind.NamedExports */:
|
|
31547
31550
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
31548
31551
|
case 272 /* SyntaxKind.ExportDeclaration */:
|
|
31549
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31552
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31550
31553
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31551
31554
|
visitNode(cbNode, node.exportClause) ||
|
|
31552
31555
|
visitNode(cbNode, node.moduleSpecifier) ||
|
|
@@ -31556,7 +31559,7 @@ var ts;
|
|
|
31556
31559
|
return visitNode(cbNode, node.propertyName) ||
|
|
31557
31560
|
visitNode(cbNode, node.name);
|
|
31558
31561
|
case 271 /* SyntaxKind.ExportAssignment */:
|
|
31559
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31562
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31560
31563
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
31561
31564
|
visitNode(cbNode, node.expression);
|
|
31562
31565
|
case 223 /* SyntaxKind.TemplateExpression */:
|
|
@@ -31581,7 +31584,7 @@ var ts;
|
|
|
31581
31584
|
case 277 /* SyntaxKind.ExternalModuleReference */:
|
|
31582
31585
|
return visitNode(cbNode, node.expression);
|
|
31583
31586
|
case 276 /* SyntaxKind.MissingDeclaration */:
|
|
31584
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
31587
|
+
return visitNodes(cbNode, cbNodes, node.illegalDecorators) ||
|
|
31585
31588
|
visitNodes(cbNode, cbNodes, node.modifiers);
|
|
31586
31589
|
case 351 /* SyntaxKind.CommaListExpression */:
|
|
31587
31590
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
@@ -34132,7 +34135,7 @@ var ts;
|
|
|
34132
34135
|
var type = parseTypeAnnotation();
|
|
34133
34136
|
parseTypeMemberSemicolon();
|
|
34134
34137
|
var node = factory.createIndexSignature(modifiers, parameters, type);
|
|
34135
|
-
node.
|
|
34138
|
+
node.illegalDecorators = decorators;
|
|
34136
34139
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
34137
34140
|
}
|
|
34138
34141
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -36292,7 +36295,7 @@ var ts;
|
|
|
36292
36295
|
node = factory.createPropertyAssignment(name, initializer);
|
|
36293
36296
|
}
|
|
36294
36297
|
// Decorators, Modifiers, questionToken, and exclamationToken are not supported by property assignments and are reported in the grammar checker
|
|
36295
|
-
node.
|
|
36298
|
+
node.illegalDecorators = decorators;
|
|
36296
36299
|
node.modifiers = modifiers;
|
|
36297
36300
|
node.questionToken = questionToken;
|
|
36298
36301
|
node.exclamationToken = exclamationToken;
|
|
@@ -36940,7 +36943,7 @@ var ts;
|
|
|
36940
36943
|
// would follow. For recovery and error reporting purposes, return an incomplete declaration.
|
|
36941
36944
|
var missing = createMissingNode(276 /* SyntaxKind.MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected);
|
|
36942
36945
|
ts.setTextRangePos(missing, pos);
|
|
36943
|
-
missing.
|
|
36946
|
+
missing.illegalDecorators = decorators;
|
|
36944
36947
|
missing.modifiers = modifiers;
|
|
36945
36948
|
return missing;
|
|
36946
36949
|
}
|
|
@@ -37083,7 +37086,7 @@ var ts;
|
|
|
37083
37086
|
parseSemicolon();
|
|
37084
37087
|
var node = factory.createVariableStatement(modifiers, declarationList);
|
|
37085
37088
|
// Decorators are not allowed on a variable statement, so we keep track of them to report them in the grammar checker.
|
|
37086
|
-
node.
|
|
37089
|
+
node.illegalDecorators = decorators;
|
|
37087
37090
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37088
37091
|
}
|
|
37089
37092
|
function parseFunctionDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37103,7 +37106,7 @@ var ts;
|
|
|
37103
37106
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, ts.Diagnostics.or_expected);
|
|
37104
37107
|
setAwaitContext(savedAwaitContext);
|
|
37105
37108
|
var node = factory.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
37106
|
-
node.
|
|
37109
|
+
node.illegalDecorators = decorators;
|
|
37107
37110
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37108
37111
|
}
|
|
37109
37112
|
function parseConstructorName() {
|
|
@@ -37126,7 +37129,7 @@ var ts;
|
|
|
37126
37129
|
var body = parseFunctionBlockOrSemicolon(0 /* SignatureFlags.None */, ts.Diagnostics.or_expected);
|
|
37127
37130
|
var node = factory.createConstructorDeclaration(modifiers, parameters, body);
|
|
37128
37131
|
// Attach invalid nodes if they exist so that we can report them in the grammar checker.
|
|
37129
|
-
node.
|
|
37132
|
+
node.illegalDecorators = decorators;
|
|
37130
37133
|
node.typeParameters = typeParameters;
|
|
37131
37134
|
node.type = type;
|
|
37132
37135
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
@@ -37242,7 +37245,7 @@ var ts;
|
|
|
37242
37245
|
parseExpectedToken(124 /* SyntaxKind.StaticKeyword */);
|
|
37243
37246
|
var body = parseClassStaticBlockBody();
|
|
37244
37247
|
var node = withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
37245
|
-
node.
|
|
37248
|
+
node.illegalDecorators = decorators;
|
|
37246
37249
|
node.modifiers = modifiers;
|
|
37247
37250
|
return node;
|
|
37248
37251
|
}
|
|
@@ -37483,7 +37486,7 @@ var ts;
|
|
|
37483
37486
|
var heritageClauses = parseHeritageClauses();
|
|
37484
37487
|
var members = parseObjectTypeMembers();
|
|
37485
37488
|
var node = factory.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
37486
|
-
node.
|
|
37489
|
+
node.illegalDecorators = decorators;
|
|
37487
37490
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37488
37491
|
}
|
|
37489
37492
|
function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37494,7 +37497,7 @@ var ts;
|
|
|
37494
37497
|
var type = token() === 138 /* SyntaxKind.IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType();
|
|
37495
37498
|
parseSemicolon();
|
|
37496
37499
|
var node = factory.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
37497
|
-
node.
|
|
37500
|
+
node.illegalDecorators = decorators;
|
|
37498
37501
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37499
37502
|
}
|
|
37500
37503
|
// In an ambient declaration, the grammar only allows integer literals as initializers.
|
|
@@ -37520,7 +37523,7 @@ var ts;
|
|
|
37520
37523
|
members = createMissingList();
|
|
37521
37524
|
}
|
|
37522
37525
|
var node = factory.createEnumDeclaration(modifiers, name, members);
|
|
37523
|
-
node.
|
|
37526
|
+
node.illegalDecorators = decorators;
|
|
37524
37527
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37525
37528
|
}
|
|
37526
37529
|
function parseModuleBlock() {
|
|
@@ -37544,7 +37547,7 @@ var ts;
|
|
|
37544
37547
|
? parseModuleOrNamespaceDeclaration(getNodePos(), /*hasJSDoc*/ false, /*decorators*/ undefined, /*modifiers*/ undefined, 4 /* NodeFlags.NestedNamespace */ | namespaceFlag)
|
|
37545
37548
|
: parseModuleBlock();
|
|
37546
37549
|
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
37547
|
-
node.
|
|
37550
|
+
node.illegalDecorators = decorators;
|
|
37548
37551
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37549
37552
|
}
|
|
37550
37553
|
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37567,7 +37570,7 @@ var ts;
|
|
|
37567
37570
|
parseSemicolon();
|
|
37568
37571
|
}
|
|
37569
37572
|
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
37570
|
-
node.
|
|
37573
|
+
node.illegalDecorators = decorators;
|
|
37571
37574
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37572
37575
|
}
|
|
37573
37576
|
function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37607,7 +37610,7 @@ var ts;
|
|
|
37607
37610
|
parseSemicolon();
|
|
37608
37611
|
var node = factory.createNamespaceExportDeclaration(name);
|
|
37609
37612
|
// NamespaceExportDeclaration nodes cannot have decorators or modifiers, so we attach them here so we can report them in the grammar checker
|
|
37610
|
-
node.
|
|
37613
|
+
node.illegalDecorators = decorators;
|
|
37611
37614
|
node.modifiers = modifiers;
|
|
37612
37615
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37613
37616
|
}
|
|
@@ -37647,7 +37650,7 @@ var ts;
|
|
|
37647
37650
|
}
|
|
37648
37651
|
parseSemicolon();
|
|
37649
37652
|
var node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
37650
|
-
node.
|
|
37653
|
+
node.illegalDecorators = decorators;
|
|
37651
37654
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37652
37655
|
}
|
|
37653
37656
|
function parseAssertEntry() {
|
|
@@ -37692,7 +37695,7 @@ var ts;
|
|
|
37692
37695
|
var moduleReference = parseModuleReference();
|
|
37693
37696
|
parseSemicolon();
|
|
37694
37697
|
var node = factory.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
37695
|
-
node.
|
|
37698
|
+
node.illegalDecorators = decorators;
|
|
37696
37699
|
var finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37697
37700
|
return finished;
|
|
37698
37701
|
}
|
|
@@ -37882,7 +37885,7 @@ var ts;
|
|
|
37882
37885
|
parseSemicolon();
|
|
37883
37886
|
setAwaitContext(savedAwaitContext);
|
|
37884
37887
|
var node = factory.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
37885
|
-
node.
|
|
37888
|
+
node.illegalDecorators = decorators;
|
|
37886
37889
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37887
37890
|
}
|
|
37888
37891
|
function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -37899,7 +37902,7 @@ var ts;
|
|
|
37899
37902
|
parseSemicolon();
|
|
37900
37903
|
setAwaitContext(savedAwaitContext);
|
|
37901
37904
|
var node = factory.createExportAssignment(modifiers, isExportEquals, expression);
|
|
37902
|
-
node.
|
|
37905
|
+
node.illegalDecorators = decorators;
|
|
37903
37906
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
37904
37907
|
}
|
|
37905
37908
|
var ParsingContext;
|
|
@@ -43263,10 +43266,12 @@ var ts;
|
|
|
43263
43266
|
if (resolved) {
|
|
43264
43267
|
var fileName = resolved.fileName, packageId = resolved.packageId;
|
|
43265
43268
|
var resolvedFileName = options.preserveSymlinks ? fileName : realPath(fileName, host, traceEnabled);
|
|
43269
|
+
var pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host);
|
|
43266
43270
|
resolvedTypeReferenceDirective = {
|
|
43267
43271
|
primary: primary,
|
|
43268
|
-
|
|
43269
|
-
|
|
43272
|
+
// If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames
|
|
43273
|
+
resolvedFileName: pathsAreEqual ? fileName : resolvedFileName,
|
|
43274
|
+
originalPath: pathsAreEqual ? undefined : fileName,
|
|
43270
43275
|
packageId: packageId,
|
|
43271
43276
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
43272
43277
|
};
|
|
@@ -44051,8 +44056,10 @@ var ts;
|
|
|
44051
44056
|
var resolvedValue = resolved_1.value;
|
|
44052
44057
|
if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) {
|
|
44053
44058
|
var path = realPath(resolvedValue.path, host, traceEnabled);
|
|
44054
|
-
var
|
|
44055
|
-
|
|
44059
|
+
var pathsAreEqual = arePathsEqual(path, resolvedValue.path, host);
|
|
44060
|
+
var originalPath = pathsAreEqual ? undefined : resolvedValue.path;
|
|
44061
|
+
// If the path and realpath are differing only in casing prefer path so that we can issue correct errors for casing under forceConsistentCasingInFileNames
|
|
44062
|
+
resolvedValue = __assign(__assign({}, resolvedValue), { path: pathsAreEqual ? resolvedValue.path : path, originalPath: originalPath });
|
|
44056
44063
|
}
|
|
44057
44064
|
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
|
|
44058
44065
|
return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
|
|
@@ -73705,25 +73712,7 @@ var ts;
|
|
|
73705
73712
|
}
|
|
73706
73713
|
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
73707
73714
|
return mapType(type, function (t) {
|
|
73708
|
-
|
|
73709
|
-
var intersection = t;
|
|
73710
|
-
var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
|
|
73711
|
-
if (newTypes.length > 0) {
|
|
73712
|
-
return getIntersectionType(newTypes);
|
|
73713
|
-
}
|
|
73714
|
-
newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
|
|
73715
|
-
if (newTypes.length > 0) {
|
|
73716
|
-
return getIntersectionType(newTypes);
|
|
73717
|
-
}
|
|
73718
|
-
return undefined;
|
|
73719
|
-
}
|
|
73720
|
-
var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
|
|
73721
|
-
if (concretePropertyType) {
|
|
73722
|
-
return concretePropertyType;
|
|
73723
|
-
}
|
|
73724
|
-
return getTypeOfApplicableIndexInfoOfContextualType(t);
|
|
73725
|
-
}, /*noReductions*/ true);
|
|
73726
|
-
function getTypeOfConcretePropertyOfContextualType(t) {
|
|
73715
|
+
var _a;
|
|
73727
73716
|
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
73728
73717
|
var constraint = getConstraintTypeFromMappedType(t);
|
|
73729
73718
|
var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
@@ -73731,9 +73720,8 @@ var ts;
|
|
|
73731
73720
|
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
73732
73721
|
return substituteIndexedMappedType(t, propertyNameType);
|
|
73733
73722
|
}
|
|
73734
|
-
return undefined;
|
|
73735
73723
|
}
|
|
73736
|
-
if (t.flags & 3670016 /* TypeFlags.StructuredType */) {
|
|
73724
|
+
else if (t.flags & 3670016 /* TypeFlags.StructuredType */) {
|
|
73737
73725
|
var prop = getPropertyOfType(t, name);
|
|
73738
73726
|
if (prop) {
|
|
73739
73727
|
return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
|
|
@@ -73744,16 +73732,10 @@ var ts;
|
|
|
73744
73732
|
return restType;
|
|
73745
73733
|
}
|
|
73746
73734
|
}
|
|
73735
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
73747
73736
|
}
|
|
73748
73737
|
return undefined;
|
|
73749
|
-
}
|
|
73750
|
-
function getTypeOfApplicableIndexInfoOfContextualType(t) {
|
|
73751
|
-
var _a;
|
|
73752
|
-
if (!(t.flags & 3670016 /* TypeFlags.StructuredType */)) {
|
|
73753
|
-
return undefined;
|
|
73754
|
-
}
|
|
73755
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
73756
|
-
}
|
|
73738
|
+
}, /*noReductions*/ true);
|
|
73757
73739
|
}
|
|
73758
73740
|
// In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
|
|
73759
73741
|
// the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
|
|
@@ -88883,7 +88865,7 @@ var ts;
|
|
|
88883
88865
|
return checkGrammarDecorators(node) || checkGrammarModifiers(node);
|
|
88884
88866
|
}
|
|
88885
88867
|
function checkGrammarDecorators(node) {
|
|
88886
|
-
if (ts.canHaveIllegalDecorators(node) && ts.some(node.
|
|
88868
|
+
if (ts.canHaveIllegalDecorators(node) && ts.some(node.illegalDecorators)) {
|
|
88887
88869
|
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
|
|
88888
88870
|
}
|
|
88889
88871
|
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node)) {
|
|
@@ -171628,9 +171610,9 @@ var ts;
|
|
|
171628
171610
|
// - error: 5.0
|
|
171629
171611
|
var ts;
|
|
171630
171612
|
(function (ts) {
|
|
171631
|
-
var MUST_MERGE = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators have been combined with modifiers. Callers should switch to an overload
|
|
171632
|
-
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
|
|
171633
|
-
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
|
|
171613
|
+
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." };
|
|
171614
|
+
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." };
|
|
171615
|
+
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." };
|
|
171634
171616
|
function patchNodeFactory(factory) {
|
|
171635
171617
|
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;
|
|
171636
171618
|
factory.createParameterDeclaration = ts.buildOverload("createParameterDeclaration")
|
|
@@ -171857,7 +171839,7 @@ var ts;
|
|
|
171857
171839
|
return (decorators === undefined || !ts.some(decorators, ts.isModifier)) &&
|
|
171858
171840
|
(modifiers === undefined || !ts.some(modifiers, ts.isParameter)) &&
|
|
171859
171841
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
171860
|
-
(body === undefined ||
|
|
171842
|
+
(body === undefined || ts.isBlock(body));
|
|
171861
171843
|
},
|
|
171862
171844
|
})
|
|
171863
171845
|
.deprecate({
|
|
@@ -171886,7 +171868,7 @@ var ts;
|
|
|
171886
171868
|
return (decorators === undefined || !ts.some(decorators, ts.isModifier)) &&
|
|
171887
171869
|
(modifiers === undefined || !ts.some(modifiers, ts.isParameter)) &&
|
|
171888
171870
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
171889
|
-
(body === undefined ||
|
|
171871
|
+
(body === undefined || ts.isBlock(body));
|
|
171890
171872
|
},
|
|
171891
171873
|
})
|
|
171892
171874
|
.deprecate({
|
|
@@ -172835,4 +172817,4 @@ var ts;
|
|
|
172835
172817
|
})(ts || (ts = {}));
|
|
172836
172818
|
|
|
172837
172819
|
|
|
172838
|
-
//# sourceMappingURL=typescript.js.map
|
|
172820
|
+
//# sourceMappingURL=typescript.js.map
|