typescript 4.9.0-dev.20221019 → 4.9.0-dev.20221020
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 +5 -6
- package/lib/tsserver.js +11 -6
- package/lib/tsserverlibrary.js +11 -6
- package/lib/typescript.js +11 -6
- package/lib/typescriptServices.js +11 -6
- package/lib/typingsInstaller.js +5 -6
- 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.9";
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221020");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -55946,7 +55946,7 @@ var ts;
|
|
|
55946
55946
|
if (relation !== identityRelation) {
|
|
55947
55947
|
if (!result && (source.flags & 2097152 || source.flags & 262144 && target.flags & 1048576)) {
|
|
55948
55948
|
var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 ? source.types : [source], !!(target.flags & 1048576));
|
|
55949
|
-
if (constraint &&
|
|
55949
|
+
if (constraint && everyType(constraint, function (c) { return c !== source; })) {
|
|
55950
55950
|
result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState);
|
|
55951
55951
|
}
|
|
55952
55952
|
}
|
|
@@ -57526,8 +57526,7 @@ var ts;
|
|
|
57526
57526
|
return !!(type.flags & 109440);
|
|
57527
57527
|
}
|
|
57528
57528
|
function isUnitLikeType(type) {
|
|
57529
|
-
return
|
|
57530
|
-
!!(type.flags & 109440);
|
|
57529
|
+
return isUnitType(getBaseConstraintOrType(type));
|
|
57531
57530
|
}
|
|
57532
57531
|
function extractUnitType(type) {
|
|
57533
57532
|
return type.flags & 2097152 ? ts.find(type.types, isUnitType) || type : type;
|
|
@@ -61163,10 +61162,10 @@ var ts;
|
|
|
61163
61162
|
function markAliasReferenced(symbol, location) {
|
|
61164
61163
|
if (isNonLocalAlias(symbol, 111551) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551)) {
|
|
61165
61164
|
var target = resolveAlias(symbol);
|
|
61166
|
-
if (getAllSymbolFlags(target) & 111551) {
|
|
61165
|
+
if (getAllSymbolFlags(target) & (111551 | 1048576)) {
|
|
61167
61166
|
if (compilerOptions.isolatedModules ||
|
|
61168
61167
|
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
|
|
61169
|
-
!isConstEnumOrConstEnumOnlyModule(target)) {
|
|
61168
|
+
!isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
61170
61169
|
markAliasSymbolAsReferenced(symbol);
|
|
61171
61170
|
}
|
|
61172
61171
|
else {
|
package/lib/tsserver.js
CHANGED
|
@@ -109,7 +109,7 @@ var ts;
|
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
112
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221020");
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -67002,7 +67002,7 @@ var ts;
|
|
|
67002
67002
|
// For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
|
|
67003
67003
|
if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
|
|
67004
67004
|
var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
|
|
67005
|
-
if (constraint &&
|
|
67005
|
+
if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
|
|
67006
67006
|
// TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
|
|
67007
67007
|
result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
|
|
67008
67008
|
}
|
|
@@ -68891,8 +68891,7 @@ var ts;
|
|
|
68891
68891
|
return !!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68892
68892
|
}
|
|
68893
68893
|
function isUnitLikeType(type) {
|
|
68894
|
-
return
|
|
68895
|
-
!!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68894
|
+
return isUnitType(getBaseConstraintOrType(type));
|
|
68896
68895
|
}
|
|
68897
68896
|
function extractUnitType(type) {
|
|
68898
68897
|
return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
|
|
@@ -73065,13 +73064,13 @@ var ts;
|
|
|
73065
73064
|
function markAliasReferenced(symbol, location) {
|
|
73066
73065
|
if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
|
|
73067
73066
|
var target = resolveAlias(symbol);
|
|
73068
|
-
if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
|
|
73067
|
+
if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
|
|
73069
73068
|
// An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
|
|
73070
73069
|
// (because the const enum value will not be inlined), or if (2) the alias is an export
|
|
73071
73070
|
// of a const enum declaration that will be preserved.
|
|
73072
73071
|
if (compilerOptions.isolatedModules ||
|
|
73073
73072
|
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
|
|
73074
|
-
!isConstEnumOrConstEnumOnlyModule(target)) {
|
|
73073
|
+
!isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
73075
73074
|
markAliasSymbolAsReferenced(symbol);
|
|
73076
73075
|
}
|
|
73077
73076
|
else {
|
|
@@ -142730,6 +142729,12 @@ var ts;
|
|
|
142730
142729
|
var label = ts.getTargetLabel(node.parent, node.text);
|
|
142731
142730
|
return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
|
|
142732
142731
|
}
|
|
142732
|
+
if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
|
|
142733
|
+
var functionDeclaration = ts.findAncestor(node.parent, function (n) {
|
|
142734
|
+
return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
|
|
142735
|
+
});
|
|
142736
|
+
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
|
|
142737
|
+
}
|
|
142733
142738
|
if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
|
|
142734
142739
|
var classDecl = node.parent.parent;
|
|
142735
142740
|
var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -108,7 +108,7 @@ var ts;
|
|
|
108
108
|
// The following is baselined as a literal template type without intervention
|
|
109
109
|
/** The version of the TypeScript compiler release */
|
|
110
110
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
111
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
111
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221020");
|
|
112
112
|
/* @internal */
|
|
113
113
|
var Comparison;
|
|
114
114
|
(function (Comparison) {
|
|
@@ -67001,7 +67001,7 @@ var ts;
|
|
|
67001
67001
|
// For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
|
|
67002
67002
|
if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
|
|
67003
67003
|
var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
|
|
67004
|
-
if (constraint &&
|
|
67004
|
+
if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
|
|
67005
67005
|
// TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
|
|
67006
67006
|
result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
|
|
67007
67007
|
}
|
|
@@ -68890,8 +68890,7 @@ var ts;
|
|
|
68890
68890
|
return !!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68891
68891
|
}
|
|
68892
68892
|
function isUnitLikeType(type) {
|
|
68893
|
-
return
|
|
68894
|
-
!!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68893
|
+
return isUnitType(getBaseConstraintOrType(type));
|
|
68895
68894
|
}
|
|
68896
68895
|
function extractUnitType(type) {
|
|
68897
68896
|
return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
|
|
@@ -73064,13 +73063,13 @@ var ts;
|
|
|
73064
73063
|
function markAliasReferenced(symbol, location) {
|
|
73065
73064
|
if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
|
|
73066
73065
|
var target = resolveAlias(symbol);
|
|
73067
|
-
if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
|
|
73066
|
+
if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
|
|
73068
73067
|
// An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
|
|
73069
73068
|
// (because the const enum value will not be inlined), or if (2) the alias is an export
|
|
73070
73069
|
// of a const enum declaration that will be preserved.
|
|
73071
73070
|
if (compilerOptions.isolatedModules ||
|
|
73072
73071
|
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
|
|
73073
|
-
!isConstEnumOrConstEnumOnlyModule(target)) {
|
|
73072
|
+
!isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
73074
73073
|
markAliasSymbolAsReferenced(symbol);
|
|
73075
73074
|
}
|
|
73076
73075
|
else {
|
|
@@ -143148,6 +143147,12 @@ var ts;
|
|
|
143148
143147
|
var label = ts.getTargetLabel(node.parent, node.text);
|
|
143149
143148
|
return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
|
|
143150
143149
|
}
|
|
143150
|
+
if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
|
|
143151
|
+
var functionDeclaration = ts.findAncestor(node.parent, function (n) {
|
|
143152
|
+
return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
|
|
143153
|
+
});
|
|
143154
|
+
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
|
|
143155
|
+
}
|
|
143151
143156
|
if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
|
|
143152
143157
|
var classDecl = node.parent.parent;
|
|
143153
143158
|
var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
|
package/lib/typescript.js
CHANGED
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221020");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -66992,7 +66992,7 @@ var ts;
|
|
|
66992
66992
|
// For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
|
|
66993
66993
|
if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
|
|
66994
66994
|
var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
|
|
66995
|
-
if (constraint &&
|
|
66995
|
+
if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
|
|
66996
66996
|
// TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
|
|
66997
66997
|
result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
|
|
66998
66998
|
}
|
|
@@ -68881,8 +68881,7 @@ var ts;
|
|
|
68881
68881
|
return !!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68882
68882
|
}
|
|
68883
68883
|
function isUnitLikeType(type) {
|
|
68884
|
-
return
|
|
68885
|
-
!!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68884
|
+
return isUnitType(getBaseConstraintOrType(type));
|
|
68886
68885
|
}
|
|
68887
68886
|
function extractUnitType(type) {
|
|
68888
68887
|
return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
|
|
@@ -73055,13 +73054,13 @@ var ts;
|
|
|
73055
73054
|
function markAliasReferenced(symbol, location) {
|
|
73056
73055
|
if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
|
|
73057
73056
|
var target = resolveAlias(symbol);
|
|
73058
|
-
if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
|
|
73057
|
+
if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
|
|
73059
73058
|
// An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
|
|
73060
73059
|
// (because the const enum value will not be inlined), or if (2) the alias is an export
|
|
73061
73060
|
// of a const enum declaration that will be preserved.
|
|
73062
73061
|
if (compilerOptions.isolatedModules ||
|
|
73063
73062
|
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
|
|
73064
|
-
!isConstEnumOrConstEnumOnlyModule(target)) {
|
|
73063
|
+
!isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
73065
73064
|
markAliasSymbolAsReferenced(symbol);
|
|
73066
73065
|
}
|
|
73067
73066
|
else {
|
|
@@ -143139,6 +143138,12 @@ var ts;
|
|
|
143139
143138
|
var label = ts.getTargetLabel(node.parent, node.text);
|
|
143140
143139
|
return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
|
|
143141
143140
|
}
|
|
143141
|
+
if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
|
|
143142
|
+
var functionDeclaration = ts.findAncestor(node.parent, function (n) {
|
|
143143
|
+
return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
|
|
143144
|
+
});
|
|
143145
|
+
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
|
|
143146
|
+
}
|
|
143142
143147
|
if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
|
|
143143
143148
|
var classDecl = node.parent.parent;
|
|
143144
143149
|
var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
|
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221020");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -66992,7 +66992,7 @@ var ts;
|
|
|
66992
66992
|
// For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
|
|
66993
66993
|
if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
|
|
66994
66994
|
var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
|
|
66995
|
-
if (constraint &&
|
|
66995
|
+
if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
|
|
66996
66996
|
// TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
|
|
66997
66997
|
result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
|
|
66998
66998
|
}
|
|
@@ -68881,8 +68881,7 @@ var ts;
|
|
|
68881
68881
|
return !!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68882
68882
|
}
|
|
68883
68883
|
function isUnitLikeType(type) {
|
|
68884
|
-
return
|
|
68885
|
-
!!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68884
|
+
return isUnitType(getBaseConstraintOrType(type));
|
|
68886
68885
|
}
|
|
68887
68886
|
function extractUnitType(type) {
|
|
68888
68887
|
return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
|
|
@@ -73055,13 +73054,13 @@ var ts;
|
|
|
73055
73054
|
function markAliasReferenced(symbol, location) {
|
|
73056
73055
|
if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
|
|
73057
73056
|
var target = resolveAlias(symbol);
|
|
73058
|
-
if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
|
|
73057
|
+
if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
|
|
73059
73058
|
// An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
|
|
73060
73059
|
// (because the const enum value will not be inlined), or if (2) the alias is an export
|
|
73061
73060
|
// of a const enum declaration that will be preserved.
|
|
73062
73061
|
if (compilerOptions.isolatedModules ||
|
|
73063
73062
|
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
|
|
73064
|
-
!isConstEnumOrConstEnumOnlyModule(target)) {
|
|
73063
|
+
!isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
73065
73064
|
markAliasSymbolAsReferenced(symbol);
|
|
73066
73065
|
}
|
|
73067
73066
|
else {
|
|
@@ -143139,6 +143138,12 @@ var ts;
|
|
|
143139
143138
|
var label = ts.getTargetLabel(node.parent, node.text);
|
|
143140
143139
|
return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
|
|
143141
143140
|
}
|
|
143141
|
+
if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
|
|
143142
|
+
var functionDeclaration = ts.findAncestor(node.parent, function (n) {
|
|
143143
|
+
return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
|
|
143144
|
+
});
|
|
143145
|
+
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
|
|
143146
|
+
}
|
|
143142
143147
|
if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
|
|
143143
143148
|
var classDecl = node.parent.parent;
|
|
143144
143149
|
var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
|
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 = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221020");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -66982,7 +66982,7 @@ var ts;
|
|
|
66982
66982
|
// For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
|
|
66983
66983
|
if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
|
|
66984
66984
|
var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
|
|
66985
|
-
if (constraint &&
|
|
66985
|
+
if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
|
|
66986
66986
|
// TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
|
|
66987
66987
|
result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
|
|
66988
66988
|
}
|
|
@@ -68871,8 +68871,7 @@ var ts;
|
|
|
68871
68871
|
return !!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68872
68872
|
}
|
|
68873
68873
|
function isUnitLikeType(type) {
|
|
68874
|
-
return
|
|
68875
|
-
!!(type.flags & 109440 /* TypeFlags.Unit */);
|
|
68874
|
+
return isUnitType(getBaseConstraintOrType(type));
|
|
68876
68875
|
}
|
|
68877
68876
|
function extractUnitType(type) {
|
|
68878
68877
|
return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
|
|
@@ -73045,13 +73044,13 @@ var ts;
|
|
|
73045
73044
|
function markAliasReferenced(symbol, location) {
|
|
73046
73045
|
if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
|
|
73047
73046
|
var target = resolveAlias(symbol);
|
|
73048
|
-
if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
|
|
73047
|
+
if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
|
|
73049
73048
|
// An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
|
|
73050
73049
|
// (because the const enum value will not be inlined), or if (2) the alias is an export
|
|
73051
73050
|
// of a const enum declaration that will be preserved.
|
|
73052
73051
|
if (compilerOptions.isolatedModules ||
|
|
73053
73052
|
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
|
|
73054
|
-
!isConstEnumOrConstEnumOnlyModule(target)) {
|
|
73053
|
+
!isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
73055
73054
|
markAliasSymbolAsReferenced(symbol);
|
|
73056
73055
|
}
|
|
73057
73056
|
else {
|
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.9.0-dev.
|
|
5
|
+
"version": "4.9.0-dev.20221020",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|