typescript 4.7.0-dev.20220419 → 4.7.0-dev.20220420
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +11 -10
- package/lib/tsserver.js +20 -10
- package/lib/tsserverlibrary.js +20 -10
- package/lib/typescript.js +20 -10
- package/lib/typescriptServices.js +20 -10
- package/lib/typingsInstaller.js +20 -10
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220420";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -62000,7 +62000,9 @@ var ts;
|
|
|
62000
62000
|
}
|
|
62001
62001
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
62002
62002
|
}
|
|
62003
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
62003
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
62004
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 && node.parent.kind === 299)) ||
|
|
62005
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
62004
62006
|
markAliasReferenced(parentSymbol, node);
|
|
62005
62007
|
}
|
|
62006
62008
|
var propType;
|
|
@@ -72130,15 +72132,14 @@ var ts;
|
|
|
72130
72132
|
return propertyDeclaration;
|
|
72131
72133
|
}
|
|
72132
72134
|
}
|
|
72133
|
-
else if (ts.isMetaProperty(parent)) {
|
|
72134
|
-
|
|
72135
|
-
var propertyDeclaration = getPropertyOfType(parentType, node.escapedText);
|
|
72136
|
-
if (propertyDeclaration) {
|
|
72137
|
-
return propertyDeclaration;
|
|
72138
|
-
}
|
|
72139
|
-
if (parent.keywordToken === 103) {
|
|
72135
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
72136
|
+
if (parent.keywordToken === 103 && ts.idText(node) === "target") {
|
|
72140
72137
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
72141
72138
|
}
|
|
72139
|
+
if (parent.keywordToken === 100 && ts.idText(node) === "meta") {
|
|
72140
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
72141
|
+
}
|
|
72142
|
+
return undefined;
|
|
72142
72143
|
}
|
|
72143
72144
|
}
|
|
72144
72145
|
switch (node.kind) {
|
|
@@ -82352,7 +82353,7 @@ var ts;
|
|
|
82352
82353
|
else {
|
|
82353
82354
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
82354
82355
|
}
|
|
82355
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)), constructor.body.statements), true);
|
|
82356
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)), constructor.body.statements), true);
|
|
82356
82357
|
ts.setTextRange(body, constructor.body);
|
|
82357
82358
|
return body;
|
|
82358
82359
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220420";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -74262,10 +74262,15 @@ var ts;
|
|
|
74262
74262
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74263
74263
|
}
|
|
74264
74264
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74265
|
+
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
74266
|
+
// here even if `Foo` is not a const enum.
|
|
74267
|
+
//
|
|
74265
74268
|
// The exceptions are:
|
|
74266
74269
|
// 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and
|
|
74267
74270
|
// 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`.
|
|
74268
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74271
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74272
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 299 /* EnumMember */)) ||
|
|
74273
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
74269
74274
|
markAliasReferenced(parentSymbol, node);
|
|
74270
74275
|
}
|
|
74271
74276
|
var propType;
|
|
@@ -86000,15 +86005,20 @@ var ts;
|
|
|
86000
86005
|
return propertyDeclaration;
|
|
86001
86006
|
}
|
|
86002
86007
|
}
|
|
86003
|
-
else if (ts.isMetaProperty(parent)) {
|
|
86004
|
-
|
|
86005
|
-
|
|
86006
|
-
if (propertyDeclaration) {
|
|
86007
|
-
return propertyDeclaration;
|
|
86008
|
-
}
|
|
86009
|
-
if (parent.keywordToken === 103 /* NewKeyword */) {
|
|
86008
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
86009
|
+
if (parent.keywordToken === 103 /* NewKeyword */ && ts.idText(node) === "target") {
|
|
86010
|
+
// `target` in `new.target`
|
|
86010
86011
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
86011
86012
|
}
|
|
86013
|
+
// The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but
|
|
86014
|
+
// we have a fake expression type made for other reasons already, whose transient `meta`
|
|
86015
|
+
// member should more exactly be the kind of (declarationless) symbol we want.
|
|
86016
|
+
// (See #44364 and #45031 for relevant implementation PRs)
|
|
86017
|
+
if (parent.keywordToken === 100 /* ImportKeyword */ && ts.idText(node) === "meta") {
|
|
86018
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
86019
|
+
}
|
|
86020
|
+
// no other meta properties are valid syntax, thus no others should have symbols
|
|
86021
|
+
return undefined;
|
|
86012
86022
|
}
|
|
86013
86023
|
}
|
|
86014
86024
|
switch (node.kind) {
|
|
@@ -98798,7 +98808,7 @@ var ts;
|
|
|
98798
98808
|
// ```
|
|
98799
98809
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
98800
98810
|
}
|
|
98801
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)),
|
|
98811
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
98802
98812
|
/*location*/ constructor.body.statements),
|
|
98803
98813
|
/*multiLine*/ true);
|
|
98804
98814
|
ts.setTextRange(body, constructor.body);
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -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 = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220420";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -74456,10 +74456,15 @@ var ts;
|
|
|
74456
74456
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74457
74457
|
}
|
|
74458
74458
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74459
|
+
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
74460
|
+
// here even if `Foo` is not a const enum.
|
|
74461
|
+
//
|
|
74459
74462
|
// The exceptions are:
|
|
74460
74463
|
// 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and
|
|
74461
74464
|
// 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`.
|
|
74462
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74465
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74466
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 299 /* EnumMember */)) ||
|
|
74467
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
74463
74468
|
markAliasReferenced(parentSymbol, node);
|
|
74464
74469
|
}
|
|
74465
74470
|
var propType;
|
|
@@ -86194,15 +86199,20 @@ var ts;
|
|
|
86194
86199
|
return propertyDeclaration;
|
|
86195
86200
|
}
|
|
86196
86201
|
}
|
|
86197
|
-
else if (ts.isMetaProperty(parent)) {
|
|
86198
|
-
|
|
86199
|
-
|
|
86200
|
-
if (propertyDeclaration) {
|
|
86201
|
-
return propertyDeclaration;
|
|
86202
|
-
}
|
|
86203
|
-
if (parent.keywordToken === 103 /* NewKeyword */) {
|
|
86202
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
86203
|
+
if (parent.keywordToken === 103 /* NewKeyword */ && ts.idText(node) === "target") {
|
|
86204
|
+
// `target` in `new.target`
|
|
86204
86205
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
86205
86206
|
}
|
|
86207
|
+
// The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but
|
|
86208
|
+
// we have a fake expression type made for other reasons already, whose transient `meta`
|
|
86209
|
+
// member should more exactly be the kind of (declarationless) symbol we want.
|
|
86210
|
+
// (See #44364 and #45031 for relevant implementation PRs)
|
|
86211
|
+
if (parent.keywordToken === 100 /* ImportKeyword */ && ts.idText(node) === "meta") {
|
|
86212
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
86213
|
+
}
|
|
86214
|
+
// no other meta properties are valid syntax, thus no others should have symbols
|
|
86215
|
+
return undefined;
|
|
86206
86216
|
}
|
|
86207
86217
|
}
|
|
86208
86218
|
switch (node.kind) {
|
|
@@ -98992,7 +99002,7 @@ var ts;
|
|
|
98992
99002
|
// ```
|
|
98993
99003
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
98994
99004
|
}
|
|
98995
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)),
|
|
99005
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
98996
99006
|
/*location*/ constructor.body.statements),
|
|
98997
99007
|
/*multiLine*/ true);
|
|
98998
99008
|
ts.setTextRange(body, constructor.body);
|
package/lib/typescript.js
CHANGED
|
@@ -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 = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220420";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -74456,10 +74456,15 @@ var ts;
|
|
|
74456
74456
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74457
74457
|
}
|
|
74458
74458
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74459
|
+
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
74460
|
+
// here even if `Foo` is not a const enum.
|
|
74461
|
+
//
|
|
74459
74462
|
// The exceptions are:
|
|
74460
74463
|
// 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and
|
|
74461
74464
|
// 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`.
|
|
74462
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74465
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74466
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 299 /* EnumMember */)) ||
|
|
74467
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
74463
74468
|
markAliasReferenced(parentSymbol, node);
|
|
74464
74469
|
}
|
|
74465
74470
|
var propType;
|
|
@@ -86194,15 +86199,20 @@ var ts;
|
|
|
86194
86199
|
return propertyDeclaration;
|
|
86195
86200
|
}
|
|
86196
86201
|
}
|
|
86197
|
-
else if (ts.isMetaProperty(parent)) {
|
|
86198
|
-
|
|
86199
|
-
|
|
86200
|
-
if (propertyDeclaration) {
|
|
86201
|
-
return propertyDeclaration;
|
|
86202
|
-
}
|
|
86203
|
-
if (parent.keywordToken === 103 /* NewKeyword */) {
|
|
86202
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
86203
|
+
if (parent.keywordToken === 103 /* NewKeyword */ && ts.idText(node) === "target") {
|
|
86204
|
+
// `target` in `new.target`
|
|
86204
86205
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
86205
86206
|
}
|
|
86207
|
+
// The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but
|
|
86208
|
+
// we have a fake expression type made for other reasons already, whose transient `meta`
|
|
86209
|
+
// member should more exactly be the kind of (declarationless) symbol we want.
|
|
86210
|
+
// (See #44364 and #45031 for relevant implementation PRs)
|
|
86211
|
+
if (parent.keywordToken === 100 /* ImportKeyword */ && ts.idText(node) === "meta") {
|
|
86212
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
86213
|
+
}
|
|
86214
|
+
// no other meta properties are valid syntax, thus no others should have symbols
|
|
86215
|
+
return undefined;
|
|
86206
86216
|
}
|
|
86207
86217
|
}
|
|
86208
86218
|
switch (node.kind) {
|
|
@@ -98992,7 +99002,7 @@ var ts;
|
|
|
98992
99002
|
// ```
|
|
98993
99003
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
98994
99004
|
}
|
|
98995
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)),
|
|
99005
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
98996
99006
|
/*location*/ constructor.body.statements),
|
|
98997
99007
|
/*multiLine*/ true);
|
|
98998
99008
|
ts.setTextRange(body, constructor.body);
|
|
@@ -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 = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220420";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -74456,10 +74456,15 @@ var ts;
|
|
|
74456
74456
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74457
74457
|
}
|
|
74458
74458
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74459
|
+
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
74460
|
+
// here even if `Foo` is not a const enum.
|
|
74461
|
+
//
|
|
74459
74462
|
// The exceptions are:
|
|
74460
74463
|
// 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and
|
|
74461
74464
|
// 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`.
|
|
74462
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74465
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74466
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 299 /* EnumMember */)) ||
|
|
74467
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
74463
74468
|
markAliasReferenced(parentSymbol, node);
|
|
74464
74469
|
}
|
|
74465
74470
|
var propType;
|
|
@@ -86194,15 +86199,20 @@ var ts;
|
|
|
86194
86199
|
return propertyDeclaration;
|
|
86195
86200
|
}
|
|
86196
86201
|
}
|
|
86197
|
-
else if (ts.isMetaProperty(parent)) {
|
|
86198
|
-
|
|
86199
|
-
|
|
86200
|
-
if (propertyDeclaration) {
|
|
86201
|
-
return propertyDeclaration;
|
|
86202
|
-
}
|
|
86203
|
-
if (parent.keywordToken === 103 /* NewKeyword */) {
|
|
86202
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
86203
|
+
if (parent.keywordToken === 103 /* NewKeyword */ && ts.idText(node) === "target") {
|
|
86204
|
+
// `target` in `new.target`
|
|
86204
86205
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
86205
86206
|
}
|
|
86207
|
+
// The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but
|
|
86208
|
+
// we have a fake expression type made for other reasons already, whose transient `meta`
|
|
86209
|
+
// member should more exactly be the kind of (declarationless) symbol we want.
|
|
86210
|
+
// (See #44364 and #45031 for relevant implementation PRs)
|
|
86211
|
+
if (parent.keywordToken === 100 /* ImportKeyword */ && ts.idText(node) === "meta") {
|
|
86212
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
86213
|
+
}
|
|
86214
|
+
// no other meta properties are valid syntax, thus no others should have symbols
|
|
86215
|
+
return undefined;
|
|
86206
86216
|
}
|
|
86207
86217
|
}
|
|
86208
86218
|
switch (node.kind) {
|
|
@@ -98992,7 +99002,7 @@ var ts;
|
|
|
98992
99002
|
// ```
|
|
98993
99003
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
98994
99004
|
}
|
|
98995
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)),
|
|
99005
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
98996
99006
|
/*location*/ constructor.body.statements),
|
|
98997
99007
|
/*multiLine*/ true);
|
|
98998
99008
|
ts.setTextRange(body, constructor.body);
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220420";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -74251,10 +74251,15 @@ var ts;
|
|
|
74251
74251
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74252
74252
|
}
|
|
74253
74253
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74254
|
+
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
74255
|
+
// here even if `Foo` is not a const enum.
|
|
74256
|
+
//
|
|
74254
74257
|
// The exceptions are:
|
|
74255
74258
|
// 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and
|
|
74256
74259
|
// 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`.
|
|
74257
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74260
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
74261
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 299 /* EnumMember */)) ||
|
|
74262
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
74258
74263
|
markAliasReferenced(parentSymbol, node);
|
|
74259
74264
|
}
|
|
74260
74265
|
var propType;
|
|
@@ -85989,15 +85994,20 @@ var ts;
|
|
|
85989
85994
|
return propertyDeclaration;
|
|
85990
85995
|
}
|
|
85991
85996
|
}
|
|
85992
|
-
else if (ts.isMetaProperty(parent)) {
|
|
85993
|
-
|
|
85994
|
-
|
|
85995
|
-
if (propertyDeclaration) {
|
|
85996
|
-
return propertyDeclaration;
|
|
85997
|
-
}
|
|
85998
|
-
if (parent.keywordToken === 103 /* NewKeyword */) {
|
|
85997
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
85998
|
+
if (parent.keywordToken === 103 /* NewKeyword */ && ts.idText(node) === "target") {
|
|
85999
|
+
// `target` in `new.target`
|
|
85999
86000
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
86000
86001
|
}
|
|
86002
|
+
// The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but
|
|
86003
|
+
// we have a fake expression type made for other reasons already, whose transient `meta`
|
|
86004
|
+
// member should more exactly be the kind of (declarationless) symbol we want.
|
|
86005
|
+
// (See #44364 and #45031 for relevant implementation PRs)
|
|
86006
|
+
if (parent.keywordToken === 100 /* ImportKeyword */ && ts.idText(node) === "meta") {
|
|
86007
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
86008
|
+
}
|
|
86009
|
+
// no other meta properties are valid syntax, thus no others should have symbols
|
|
86010
|
+
return undefined;
|
|
86001
86011
|
}
|
|
86002
86012
|
}
|
|
86003
86013
|
switch (node.kind) {
|
|
@@ -98787,7 +98797,7 @@ var ts;
|
|
|
98787
98797
|
// ```
|
|
98788
98798
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
98789
98799
|
}
|
|
98790
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)),
|
|
98800
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)),
|
|
98791
98801
|
/*location*/ constructor.body.statements),
|
|
98792
98802
|
/*multiLine*/ true);
|
|
98793
98803
|
ts.setTextRange(body, constructor.body);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.7.0-dev.
|
|
5
|
+
"version": "4.7.0-dev.20220420",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|