typescript 4.8.0-dev.20220710 → 4.8.0-dev.20220713
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 +32 -30
- package/lib/tsserver.js +50 -33
- package/lib/tsserverlibrary.js +50 -33
- package/lib/typescript.js +50 -33
- package/lib/typescriptServices.js +50 -33
- package/lib/typingsInstaller.js +32 -30
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220713";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -2699,6 +2699,32 @@ var ts;
|
|
|
2699
2699
|
return result;
|
|
2700
2700
|
}
|
|
2701
2701
|
Debug.formatVariance = formatVariance;
|
|
2702
|
+
var DebugTypeMapper = (function () {
|
|
2703
|
+
function DebugTypeMapper() {
|
|
2704
|
+
}
|
|
2705
|
+
DebugTypeMapper.prototype.__debugToString = function () {
|
|
2706
|
+
var _a;
|
|
2707
|
+
type(this);
|
|
2708
|
+
switch (this.kind) {
|
|
2709
|
+
case 3: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
2710
|
+
case 0: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
2711
|
+
case 1: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return "any"; }), function (s, t) { return s.__debugTypeToString() + " -> " + (typeof t === "string" ? t : t.__debugTypeToString()); }).join(", ");
|
|
2712
|
+
case 2: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
2713
|
+
case 5:
|
|
2714
|
+
case 4: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
2715
|
+
default: return assertNever(this);
|
|
2716
|
+
}
|
|
2717
|
+
};
|
|
2718
|
+
return DebugTypeMapper;
|
|
2719
|
+
}());
|
|
2720
|
+
Debug.DebugTypeMapper = DebugTypeMapper;
|
|
2721
|
+
function attachDebugPrototypeIfDebug(mapper) {
|
|
2722
|
+
if (Debug.isDebugging) {
|
|
2723
|
+
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
2724
|
+
}
|
|
2725
|
+
return mapper;
|
|
2726
|
+
}
|
|
2727
|
+
Debug.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;
|
|
2702
2728
|
})(Debug = ts.Debug || (ts.Debug = {}));
|
|
2703
2729
|
})(ts || (ts = {}));
|
|
2704
2730
|
var ts;
|
|
@@ -39848,24 +39874,6 @@ var ts;
|
|
|
39848
39874
|
var Symbol = ts.objectAllocator.getSymbolConstructor();
|
|
39849
39875
|
var Type = ts.objectAllocator.getTypeConstructor();
|
|
39850
39876
|
var Signature = ts.objectAllocator.getSignatureConstructor();
|
|
39851
|
-
var DebugTypeMapper = (function () {
|
|
39852
|
-
function DebugTypeMapper() {
|
|
39853
|
-
}
|
|
39854
|
-
DebugTypeMapper.prototype.__debugToString = function () {
|
|
39855
|
-
var _a;
|
|
39856
|
-
ts.Debug.type(this);
|
|
39857
|
-
switch (this.kind) {
|
|
39858
|
-
case 3: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
39859
|
-
case 0: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
39860
|
-
case 1: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
|
|
39861
|
-
case 2: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
39862
|
-
case 5:
|
|
39863
|
-
case 4: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
39864
|
-
default: return ts.Debug.assertNever(this);
|
|
39865
|
-
}
|
|
39866
|
-
};
|
|
39867
|
-
return DebugTypeMapper;
|
|
39868
|
-
}());
|
|
39869
39877
|
var typeCount = 0;
|
|
39870
39878
|
var symbolCount = 0;
|
|
39871
39879
|
var enumCount = 0;
|
|
@@ -53153,26 +53161,20 @@ var ts;
|
|
|
53153
53161
|
return t1 !== type && mapper.kind === 4 ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
|
|
53154
53162
|
}
|
|
53155
53163
|
}
|
|
53156
|
-
function attachDebugPrototypeIfDebug(mapper) {
|
|
53157
|
-
if (ts.Debug.isDebugging) {
|
|
53158
|
-
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
53159
|
-
}
|
|
53160
|
-
return mapper;
|
|
53161
|
-
}
|
|
53162
53164
|
function makeUnaryTypeMapper(source, target) {
|
|
53163
|
-
return attachDebugPrototypeIfDebug({ kind: 0, source: source, target: target });
|
|
53165
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 0, source: source, target: target });
|
|
53164
53166
|
}
|
|
53165
53167
|
function makeArrayTypeMapper(sources, targets) {
|
|
53166
|
-
return attachDebugPrototypeIfDebug({ kind: 1, sources: sources, targets: targets });
|
|
53168
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 1, sources: sources, targets: targets });
|
|
53167
53169
|
}
|
|
53168
53170
|
function makeFunctionTypeMapper(func, debugInfo) {
|
|
53169
|
-
return attachDebugPrototypeIfDebug({ kind: 3, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
53171
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 3, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
53170
53172
|
}
|
|
53171
53173
|
function makeDeferredTypeMapper(sources, targets) {
|
|
53172
|
-
return attachDebugPrototypeIfDebug({ kind: 2, sources: sources, targets: targets });
|
|
53174
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 2, sources: sources, targets: targets });
|
|
53173
53175
|
}
|
|
53174
53176
|
function makeCompositeTypeMapper(kind, mapper1, mapper2) {
|
|
53175
|
-
return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
53177
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
53176
53178
|
}
|
|
53177
53179
|
function createTypeEraser(sources) {
|
|
53178
53180
|
return createTypeMapper(sources, undefined);
|
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 = ts.versionMajorMinor + ".0-dev.
|
|
112
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220713";
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -3156,6 +3156,32 @@ var ts;
|
|
|
3156
3156
|
return result;
|
|
3157
3157
|
}
|
|
3158
3158
|
Debug.formatVariance = formatVariance;
|
|
3159
|
+
var DebugTypeMapper = /** @class */ (function () {
|
|
3160
|
+
function DebugTypeMapper() {
|
|
3161
|
+
}
|
|
3162
|
+
DebugTypeMapper.prototype.__debugToString = function () {
|
|
3163
|
+
var _a;
|
|
3164
|
+
type(this);
|
|
3165
|
+
switch (this.kind) {
|
|
3166
|
+
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
3167
|
+
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
3168
|
+
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return "any"; }), function (s, t) { return s.__debugTypeToString() + " -> " + (typeof t === "string" ? t : t.__debugTypeToString()); }).join(", ");
|
|
3169
|
+
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
3170
|
+
case 5 /* Merged */:
|
|
3171
|
+
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
3172
|
+
default: return assertNever(this);
|
|
3173
|
+
}
|
|
3174
|
+
};
|
|
3175
|
+
return DebugTypeMapper;
|
|
3176
|
+
}());
|
|
3177
|
+
Debug.DebugTypeMapper = DebugTypeMapper;
|
|
3178
|
+
function attachDebugPrototypeIfDebug(mapper) {
|
|
3179
|
+
if (Debug.isDebugging) {
|
|
3180
|
+
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
3181
|
+
}
|
|
3182
|
+
return mapper;
|
|
3183
|
+
}
|
|
3184
|
+
Debug.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;
|
|
3159
3185
|
})(Debug = ts.Debug || (ts.Debug = {}));
|
|
3160
3186
|
})(ts || (ts = {}));
|
|
3161
3187
|
/* @internal */
|
|
@@ -48707,24 +48733,6 @@ var ts;
|
|
|
48707
48733
|
var Symbol = ts.objectAllocator.getSymbolConstructor();
|
|
48708
48734
|
var Type = ts.objectAllocator.getTypeConstructor();
|
|
48709
48735
|
var Signature = ts.objectAllocator.getSignatureConstructor();
|
|
48710
|
-
var DebugTypeMapper = /** @class */ (function () {
|
|
48711
|
-
function DebugTypeMapper() {
|
|
48712
|
-
}
|
|
48713
|
-
DebugTypeMapper.prototype.__debugToString = function () {
|
|
48714
|
-
var _a;
|
|
48715
|
-
ts.Debug.type(this);
|
|
48716
|
-
switch (this.kind) {
|
|
48717
|
-
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
48718
|
-
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
48719
|
-
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
|
|
48720
|
-
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
48721
|
-
case 5 /* Merged */:
|
|
48722
|
-
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
48723
|
-
default: return ts.Debug.assertNever(this);
|
|
48724
|
-
}
|
|
48725
|
-
};
|
|
48726
|
-
return DebugTypeMapper;
|
|
48727
|
-
}());
|
|
48728
48736
|
var typeCount = 0;
|
|
48729
48737
|
var symbolCount = 0;
|
|
48730
48738
|
var enumCount = 0;
|
|
@@ -63854,26 +63862,20 @@ var ts;
|
|
|
63854
63862
|
return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
|
|
63855
63863
|
}
|
|
63856
63864
|
}
|
|
63857
|
-
function attachDebugPrototypeIfDebug(mapper) {
|
|
63858
|
-
if (ts.Debug.isDebugging) {
|
|
63859
|
-
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
63860
|
-
}
|
|
63861
|
-
return mapper;
|
|
63862
|
-
}
|
|
63863
63865
|
function makeUnaryTypeMapper(source, target) {
|
|
63864
|
-
return attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
63866
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
63865
63867
|
}
|
|
63866
63868
|
function makeArrayTypeMapper(sources, targets) {
|
|
63867
|
-
return attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
63869
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
63868
63870
|
}
|
|
63869
63871
|
function makeFunctionTypeMapper(func, debugInfo) {
|
|
63870
|
-
return attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
63872
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
63871
63873
|
}
|
|
63872
63874
|
function makeDeferredTypeMapper(sources, targets) {
|
|
63873
|
-
return attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
63875
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
63874
63876
|
}
|
|
63875
63877
|
function makeCompositeTypeMapper(kind, mapper1, mapper2) {
|
|
63876
|
-
return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
63878
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
63877
63879
|
}
|
|
63878
63880
|
function createTypeEraser(sources) {
|
|
63879
63881
|
return createTypeMapper(sources, /*targets*/ undefined);
|
|
@@ -144709,7 +144711,7 @@ var ts;
|
|
|
144709
144711
|
var SmartSelectionRange;
|
|
144710
144712
|
(function (SmartSelectionRange) {
|
|
144711
144713
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
144712
|
-
var _a;
|
|
144714
|
+
var _a, _b;
|
|
144713
144715
|
var selectionRange = {
|
|
144714
144716
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
144715
144717
|
};
|
|
@@ -144761,6 +144763,17 @@ var ts;
|
|
|
144761
144763
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
144762
144764
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
144763
144765
|
}
|
|
144766
|
+
// (#39618 & #49807)
|
|
144767
|
+
// When the node is a SyntaxList and its first child has a JSDoc comment, then the node's
|
|
144768
|
+
// `start` (which usually is the result of calling `node.getStart()`) points to the first
|
|
144769
|
+
// token after the JSDoc comment. So, we have to make sure we'd pushed the selection
|
|
144770
|
+
// covering the JSDoc comment before diving further.
|
|
144771
|
+
if (ts.isSyntaxList(node)) {
|
|
144772
|
+
var firstChild = node.getChildren()[0];
|
|
144773
|
+
if (firstChild && ts.hasJSDocNodes(firstChild) && ((_b = firstChild.jsDoc) === null || _b === void 0 ? void 0 : _b.length) && firstChild.getStart() !== node.pos) {
|
|
144774
|
+
start = Math.min(start, ts.first(firstChild.jsDoc).getStart());
|
|
144775
|
+
}
|
|
144776
|
+
}
|
|
144764
144777
|
pushSelectionRange(start, end);
|
|
144765
144778
|
// String literals should have a stop both inside and outside their quotes.
|
|
144766
144779
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -144834,6 +144847,7 @@ var ts;
|
|
|
144834
144847
|
* other as well as of other top-level statements and declarations.
|
|
144835
144848
|
*/
|
|
144836
144849
|
function getSelectionChildren(node) {
|
|
144850
|
+
var _a;
|
|
144837
144851
|
// Group top-level imports
|
|
144838
144852
|
if (ts.isSourceFile(node)) {
|
|
144839
144853
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -144849,7 +144863,7 @@ var ts;
|
|
|
144849
144863
|
// because it allows the mapped type to become an object type with a
|
|
144850
144864
|
// few keystrokes.
|
|
144851
144865
|
if (ts.isMappedTypeNode(node)) {
|
|
144852
|
-
var
|
|
144866
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
144853
144867
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
144854
144868
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
144855
144869
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -144880,10 +144894,13 @@ var ts;
|
|
|
144880
144894
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
144881
144895
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
144882
144896
|
});
|
|
144883
|
-
|
|
144897
|
+
var firstJSDocChild = ((_a = children[0]) === null || _a === void 0 ? void 0 : _a.kind) === 320 /* JSDoc */ ? children[0] : undefined;
|
|
144898
|
+
var withJSDocSeparated = firstJSDocChild ? children.slice(1) : children;
|
|
144899
|
+
var splittedChildren = splitChildren(withJSDocSeparated, function (_a) {
|
|
144884
144900
|
var kind = _a.kind;
|
|
144885
144901
|
return kind === 58 /* ColonToken */;
|
|
144886
144902
|
});
|
|
144903
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
144887
144904
|
}
|
|
144888
144905
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
144889
144906
|
if (ts.isParameter(node)) {
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -303,7 +303,7 @@ var ts;
|
|
|
303
303
|
// The following is baselined as a literal template type without intervention
|
|
304
304
|
/** The version of the TypeScript compiler release */
|
|
305
305
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
306
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
306
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220713";
|
|
307
307
|
/* @internal */
|
|
308
308
|
var Comparison;
|
|
309
309
|
(function (Comparison) {
|
|
@@ -3350,6 +3350,32 @@ var ts;
|
|
|
3350
3350
|
return result;
|
|
3351
3351
|
}
|
|
3352
3352
|
Debug.formatVariance = formatVariance;
|
|
3353
|
+
var DebugTypeMapper = /** @class */ (function () {
|
|
3354
|
+
function DebugTypeMapper() {
|
|
3355
|
+
}
|
|
3356
|
+
DebugTypeMapper.prototype.__debugToString = function () {
|
|
3357
|
+
var _a;
|
|
3358
|
+
type(this);
|
|
3359
|
+
switch (this.kind) {
|
|
3360
|
+
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
3361
|
+
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
3362
|
+
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return "any"; }), function (s, t) { return s.__debugTypeToString() + " -> " + (typeof t === "string" ? t : t.__debugTypeToString()); }).join(", ");
|
|
3363
|
+
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
3364
|
+
case 5 /* Merged */:
|
|
3365
|
+
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
3366
|
+
default: return assertNever(this);
|
|
3367
|
+
}
|
|
3368
|
+
};
|
|
3369
|
+
return DebugTypeMapper;
|
|
3370
|
+
}());
|
|
3371
|
+
Debug.DebugTypeMapper = DebugTypeMapper;
|
|
3372
|
+
function attachDebugPrototypeIfDebug(mapper) {
|
|
3373
|
+
if (Debug.isDebugging) {
|
|
3374
|
+
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
3375
|
+
}
|
|
3376
|
+
return mapper;
|
|
3377
|
+
}
|
|
3378
|
+
Debug.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;
|
|
3353
3379
|
})(Debug = ts.Debug || (ts.Debug = {}));
|
|
3354
3380
|
})(ts || (ts = {}));
|
|
3355
3381
|
/* @internal */
|
|
@@ -48901,24 +48927,6 @@ var ts;
|
|
|
48901
48927
|
var Symbol = ts.objectAllocator.getSymbolConstructor();
|
|
48902
48928
|
var Type = ts.objectAllocator.getTypeConstructor();
|
|
48903
48929
|
var Signature = ts.objectAllocator.getSignatureConstructor();
|
|
48904
|
-
var DebugTypeMapper = /** @class */ (function () {
|
|
48905
|
-
function DebugTypeMapper() {
|
|
48906
|
-
}
|
|
48907
|
-
DebugTypeMapper.prototype.__debugToString = function () {
|
|
48908
|
-
var _a;
|
|
48909
|
-
ts.Debug.type(this);
|
|
48910
|
-
switch (this.kind) {
|
|
48911
|
-
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
48912
|
-
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
48913
|
-
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
|
|
48914
|
-
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
48915
|
-
case 5 /* Merged */:
|
|
48916
|
-
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
48917
|
-
default: return ts.Debug.assertNever(this);
|
|
48918
|
-
}
|
|
48919
|
-
};
|
|
48920
|
-
return DebugTypeMapper;
|
|
48921
|
-
}());
|
|
48922
48930
|
var typeCount = 0;
|
|
48923
48931
|
var symbolCount = 0;
|
|
48924
48932
|
var enumCount = 0;
|
|
@@ -64048,26 +64056,20 @@ var ts;
|
|
|
64048
64056
|
return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
|
|
64049
64057
|
}
|
|
64050
64058
|
}
|
|
64051
|
-
function attachDebugPrototypeIfDebug(mapper) {
|
|
64052
|
-
if (ts.Debug.isDebugging) {
|
|
64053
|
-
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
64054
|
-
}
|
|
64055
|
-
return mapper;
|
|
64056
|
-
}
|
|
64057
64059
|
function makeUnaryTypeMapper(source, target) {
|
|
64058
|
-
return attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
64060
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
64059
64061
|
}
|
|
64060
64062
|
function makeArrayTypeMapper(sources, targets) {
|
|
64061
|
-
return attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
64063
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
64062
64064
|
}
|
|
64063
64065
|
function makeFunctionTypeMapper(func, debugInfo) {
|
|
64064
|
-
return attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
64066
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
64065
64067
|
}
|
|
64066
64068
|
function makeDeferredTypeMapper(sources, targets) {
|
|
64067
|
-
return attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
64069
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
64068
64070
|
}
|
|
64069
64071
|
function makeCompositeTypeMapper(kind, mapper1, mapper2) {
|
|
64070
|
-
return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
64072
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
64071
64073
|
}
|
|
64072
64074
|
function createTypeEraser(sources) {
|
|
64073
64075
|
return createTypeMapper(sources, /*targets*/ undefined);
|
|
@@ -145322,7 +145324,7 @@ var ts;
|
|
|
145322
145324
|
var SmartSelectionRange;
|
|
145323
145325
|
(function (SmartSelectionRange) {
|
|
145324
145326
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
145325
|
-
var _a;
|
|
145327
|
+
var _a, _b;
|
|
145326
145328
|
var selectionRange = {
|
|
145327
145329
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
145328
145330
|
};
|
|
@@ -145374,6 +145376,17 @@ var ts;
|
|
|
145374
145376
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
145375
145377
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
145376
145378
|
}
|
|
145379
|
+
// (#39618 & #49807)
|
|
145380
|
+
// When the node is a SyntaxList and its first child has a JSDoc comment, then the node's
|
|
145381
|
+
// `start` (which usually is the result of calling `node.getStart()`) points to the first
|
|
145382
|
+
// token after the JSDoc comment. So, we have to make sure we'd pushed the selection
|
|
145383
|
+
// covering the JSDoc comment before diving further.
|
|
145384
|
+
if (ts.isSyntaxList(node)) {
|
|
145385
|
+
var firstChild = node.getChildren()[0];
|
|
145386
|
+
if (firstChild && ts.hasJSDocNodes(firstChild) && ((_b = firstChild.jsDoc) === null || _b === void 0 ? void 0 : _b.length) && firstChild.getStart() !== node.pos) {
|
|
145387
|
+
start = Math.min(start, ts.first(firstChild.jsDoc).getStart());
|
|
145388
|
+
}
|
|
145389
|
+
}
|
|
145377
145390
|
pushSelectionRange(start, end);
|
|
145378
145391
|
// String literals should have a stop both inside and outside their quotes.
|
|
145379
145392
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -145447,6 +145460,7 @@ var ts;
|
|
|
145447
145460
|
* other as well as of other top-level statements and declarations.
|
|
145448
145461
|
*/
|
|
145449
145462
|
function getSelectionChildren(node) {
|
|
145463
|
+
var _a;
|
|
145450
145464
|
// Group top-level imports
|
|
145451
145465
|
if (ts.isSourceFile(node)) {
|
|
145452
145466
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -145462,7 +145476,7 @@ var ts;
|
|
|
145462
145476
|
// because it allows the mapped type to become an object type with a
|
|
145463
145477
|
// few keystrokes.
|
|
145464
145478
|
if (ts.isMappedTypeNode(node)) {
|
|
145465
|
-
var
|
|
145479
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
145466
145480
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
145467
145481
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
145468
145482
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -145493,10 +145507,13 @@ var ts;
|
|
|
145493
145507
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
145494
145508
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
145495
145509
|
});
|
|
145496
|
-
|
|
145510
|
+
var firstJSDocChild = ((_a = children[0]) === null || _a === void 0 ? void 0 : _a.kind) === 320 /* JSDoc */ ? children[0] : undefined;
|
|
145511
|
+
var withJSDocSeparated = firstJSDocChild ? children.slice(1) : children;
|
|
145512
|
+
var splittedChildren = splitChildren(withJSDocSeparated, function (_a) {
|
|
145497
145513
|
var kind = _a.kind;
|
|
145498
145514
|
return kind === 58 /* ColonToken */;
|
|
145499
145515
|
});
|
|
145516
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
145500
145517
|
}
|
|
145501
145518
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
145502
145519
|
if (ts.isParameter(node)) {
|
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.20220713";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -3341,6 +3341,32 @@ var ts;
|
|
|
3341
3341
|
return result;
|
|
3342
3342
|
}
|
|
3343
3343
|
Debug.formatVariance = formatVariance;
|
|
3344
|
+
var DebugTypeMapper = /** @class */ (function () {
|
|
3345
|
+
function DebugTypeMapper() {
|
|
3346
|
+
}
|
|
3347
|
+
DebugTypeMapper.prototype.__debugToString = function () {
|
|
3348
|
+
var _a;
|
|
3349
|
+
type(this);
|
|
3350
|
+
switch (this.kind) {
|
|
3351
|
+
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
3352
|
+
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
3353
|
+
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return "any"; }), function (s, t) { return s.__debugTypeToString() + " -> " + (typeof t === "string" ? t : t.__debugTypeToString()); }).join(", ");
|
|
3354
|
+
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
3355
|
+
case 5 /* Merged */:
|
|
3356
|
+
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
3357
|
+
default: return assertNever(this);
|
|
3358
|
+
}
|
|
3359
|
+
};
|
|
3360
|
+
return DebugTypeMapper;
|
|
3361
|
+
}());
|
|
3362
|
+
Debug.DebugTypeMapper = DebugTypeMapper;
|
|
3363
|
+
function attachDebugPrototypeIfDebug(mapper) {
|
|
3364
|
+
if (Debug.isDebugging) {
|
|
3365
|
+
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
3366
|
+
}
|
|
3367
|
+
return mapper;
|
|
3368
|
+
}
|
|
3369
|
+
Debug.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;
|
|
3344
3370
|
})(Debug = ts.Debug || (ts.Debug = {}));
|
|
3345
3371
|
})(ts || (ts = {}));
|
|
3346
3372
|
/* @internal */
|
|
@@ -48892,24 +48918,6 @@ var ts;
|
|
|
48892
48918
|
var Symbol = ts.objectAllocator.getSymbolConstructor();
|
|
48893
48919
|
var Type = ts.objectAllocator.getTypeConstructor();
|
|
48894
48920
|
var Signature = ts.objectAllocator.getSignatureConstructor();
|
|
48895
|
-
var DebugTypeMapper = /** @class */ (function () {
|
|
48896
|
-
function DebugTypeMapper() {
|
|
48897
|
-
}
|
|
48898
|
-
DebugTypeMapper.prototype.__debugToString = function () {
|
|
48899
|
-
var _a;
|
|
48900
|
-
ts.Debug.type(this);
|
|
48901
|
-
switch (this.kind) {
|
|
48902
|
-
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
48903
|
-
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
48904
|
-
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
|
|
48905
|
-
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
48906
|
-
case 5 /* Merged */:
|
|
48907
|
-
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
48908
|
-
default: return ts.Debug.assertNever(this);
|
|
48909
|
-
}
|
|
48910
|
-
};
|
|
48911
|
-
return DebugTypeMapper;
|
|
48912
|
-
}());
|
|
48913
48921
|
var typeCount = 0;
|
|
48914
48922
|
var symbolCount = 0;
|
|
48915
48923
|
var enumCount = 0;
|
|
@@ -64039,26 +64047,20 @@ var ts;
|
|
|
64039
64047
|
return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
|
|
64040
64048
|
}
|
|
64041
64049
|
}
|
|
64042
|
-
function attachDebugPrototypeIfDebug(mapper) {
|
|
64043
|
-
if (ts.Debug.isDebugging) {
|
|
64044
|
-
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
64045
|
-
}
|
|
64046
|
-
return mapper;
|
|
64047
|
-
}
|
|
64048
64050
|
function makeUnaryTypeMapper(source, target) {
|
|
64049
|
-
return attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
64051
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
64050
64052
|
}
|
|
64051
64053
|
function makeArrayTypeMapper(sources, targets) {
|
|
64052
|
-
return attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
64054
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
64053
64055
|
}
|
|
64054
64056
|
function makeFunctionTypeMapper(func, debugInfo) {
|
|
64055
|
-
return attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
64057
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
64056
64058
|
}
|
|
64057
64059
|
function makeDeferredTypeMapper(sources, targets) {
|
|
64058
|
-
return attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
64060
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
64059
64061
|
}
|
|
64060
64062
|
function makeCompositeTypeMapper(kind, mapper1, mapper2) {
|
|
64061
|
-
return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
64063
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
64062
64064
|
}
|
|
64063
64065
|
function createTypeEraser(sources) {
|
|
64064
64066
|
return createTypeMapper(sources, /*targets*/ undefined);
|
|
@@ -145313,7 +145315,7 @@ var ts;
|
|
|
145313
145315
|
var SmartSelectionRange;
|
|
145314
145316
|
(function (SmartSelectionRange) {
|
|
145315
145317
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
145316
|
-
var _a;
|
|
145318
|
+
var _a, _b;
|
|
145317
145319
|
var selectionRange = {
|
|
145318
145320
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
145319
145321
|
};
|
|
@@ -145365,6 +145367,17 @@ var ts;
|
|
|
145365
145367
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
145366
145368
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
145367
145369
|
}
|
|
145370
|
+
// (#39618 & #49807)
|
|
145371
|
+
// When the node is a SyntaxList and its first child has a JSDoc comment, then the node's
|
|
145372
|
+
// `start` (which usually is the result of calling `node.getStart()`) points to the first
|
|
145373
|
+
// token after the JSDoc comment. So, we have to make sure we'd pushed the selection
|
|
145374
|
+
// covering the JSDoc comment before diving further.
|
|
145375
|
+
if (ts.isSyntaxList(node)) {
|
|
145376
|
+
var firstChild = node.getChildren()[0];
|
|
145377
|
+
if (firstChild && ts.hasJSDocNodes(firstChild) && ((_b = firstChild.jsDoc) === null || _b === void 0 ? void 0 : _b.length) && firstChild.getStart() !== node.pos) {
|
|
145378
|
+
start = Math.min(start, ts.first(firstChild.jsDoc).getStart());
|
|
145379
|
+
}
|
|
145380
|
+
}
|
|
145368
145381
|
pushSelectionRange(start, end);
|
|
145369
145382
|
// String literals should have a stop both inside and outside their quotes.
|
|
145370
145383
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -145438,6 +145451,7 @@ var ts;
|
|
|
145438
145451
|
* other as well as of other top-level statements and declarations.
|
|
145439
145452
|
*/
|
|
145440
145453
|
function getSelectionChildren(node) {
|
|
145454
|
+
var _a;
|
|
145441
145455
|
// Group top-level imports
|
|
145442
145456
|
if (ts.isSourceFile(node)) {
|
|
145443
145457
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -145453,7 +145467,7 @@ var ts;
|
|
|
145453
145467
|
// because it allows the mapped type to become an object type with a
|
|
145454
145468
|
// few keystrokes.
|
|
145455
145469
|
if (ts.isMappedTypeNode(node)) {
|
|
145456
|
-
var
|
|
145470
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
145457
145471
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
145458
145472
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
145459
145473
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -145484,10 +145498,13 @@ var ts;
|
|
|
145484
145498
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
145485
145499
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
145486
145500
|
});
|
|
145487
|
-
|
|
145501
|
+
var firstJSDocChild = ((_a = children[0]) === null || _a === void 0 ? void 0 : _a.kind) === 320 /* JSDoc */ ? children[0] : undefined;
|
|
145502
|
+
var withJSDocSeparated = firstJSDocChild ? children.slice(1) : children;
|
|
145503
|
+
var splittedChildren = splitChildren(withJSDocSeparated, function (_a) {
|
|
145488
145504
|
var kind = _a.kind;
|
|
145489
145505
|
return kind === 58 /* ColonToken */;
|
|
145490
145506
|
});
|
|
145507
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
145491
145508
|
}
|
|
145492
145509
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
145493
145510
|
if (ts.isParameter(node)) {
|
|
@@ -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.20220713";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -3341,6 +3341,32 @@ var ts;
|
|
|
3341
3341
|
return result;
|
|
3342
3342
|
}
|
|
3343
3343
|
Debug.formatVariance = formatVariance;
|
|
3344
|
+
var DebugTypeMapper = /** @class */ (function () {
|
|
3345
|
+
function DebugTypeMapper() {
|
|
3346
|
+
}
|
|
3347
|
+
DebugTypeMapper.prototype.__debugToString = function () {
|
|
3348
|
+
var _a;
|
|
3349
|
+
type(this);
|
|
3350
|
+
switch (this.kind) {
|
|
3351
|
+
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
3352
|
+
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
3353
|
+
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return "any"; }), function (s, t) { return s.__debugTypeToString() + " -> " + (typeof t === "string" ? t : t.__debugTypeToString()); }).join(", ");
|
|
3354
|
+
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
3355
|
+
case 5 /* Merged */:
|
|
3356
|
+
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
3357
|
+
default: return assertNever(this);
|
|
3358
|
+
}
|
|
3359
|
+
};
|
|
3360
|
+
return DebugTypeMapper;
|
|
3361
|
+
}());
|
|
3362
|
+
Debug.DebugTypeMapper = DebugTypeMapper;
|
|
3363
|
+
function attachDebugPrototypeIfDebug(mapper) {
|
|
3364
|
+
if (Debug.isDebugging) {
|
|
3365
|
+
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
3366
|
+
}
|
|
3367
|
+
return mapper;
|
|
3368
|
+
}
|
|
3369
|
+
Debug.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;
|
|
3344
3370
|
})(Debug = ts.Debug || (ts.Debug = {}));
|
|
3345
3371
|
})(ts || (ts = {}));
|
|
3346
3372
|
/* @internal */
|
|
@@ -48892,24 +48918,6 @@ var ts;
|
|
|
48892
48918
|
var Symbol = ts.objectAllocator.getSymbolConstructor();
|
|
48893
48919
|
var Type = ts.objectAllocator.getTypeConstructor();
|
|
48894
48920
|
var Signature = ts.objectAllocator.getSignatureConstructor();
|
|
48895
|
-
var DebugTypeMapper = /** @class */ (function () {
|
|
48896
|
-
function DebugTypeMapper() {
|
|
48897
|
-
}
|
|
48898
|
-
DebugTypeMapper.prototype.__debugToString = function () {
|
|
48899
|
-
var _a;
|
|
48900
|
-
ts.Debug.type(this);
|
|
48901
|
-
switch (this.kind) {
|
|
48902
|
-
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
48903
|
-
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
48904
|
-
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
|
|
48905
|
-
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
48906
|
-
case 5 /* Merged */:
|
|
48907
|
-
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
48908
|
-
default: return ts.Debug.assertNever(this);
|
|
48909
|
-
}
|
|
48910
|
-
};
|
|
48911
|
-
return DebugTypeMapper;
|
|
48912
|
-
}());
|
|
48913
48921
|
var typeCount = 0;
|
|
48914
48922
|
var symbolCount = 0;
|
|
48915
48923
|
var enumCount = 0;
|
|
@@ -64039,26 +64047,20 @@ var ts;
|
|
|
64039
64047
|
return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
|
|
64040
64048
|
}
|
|
64041
64049
|
}
|
|
64042
|
-
function attachDebugPrototypeIfDebug(mapper) {
|
|
64043
|
-
if (ts.Debug.isDebugging) {
|
|
64044
|
-
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
64045
|
-
}
|
|
64046
|
-
return mapper;
|
|
64047
|
-
}
|
|
64048
64050
|
function makeUnaryTypeMapper(source, target) {
|
|
64049
|
-
return attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
64051
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
64050
64052
|
}
|
|
64051
64053
|
function makeArrayTypeMapper(sources, targets) {
|
|
64052
|
-
return attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
64054
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
64053
64055
|
}
|
|
64054
64056
|
function makeFunctionTypeMapper(func, debugInfo) {
|
|
64055
|
-
return attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
64057
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
64056
64058
|
}
|
|
64057
64059
|
function makeDeferredTypeMapper(sources, targets) {
|
|
64058
|
-
return attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
64060
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
64059
64061
|
}
|
|
64060
64062
|
function makeCompositeTypeMapper(kind, mapper1, mapper2) {
|
|
64061
|
-
return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
64063
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
64062
64064
|
}
|
|
64063
64065
|
function createTypeEraser(sources) {
|
|
64064
64066
|
return createTypeMapper(sources, /*targets*/ undefined);
|
|
@@ -145313,7 +145315,7 @@ var ts;
|
|
|
145313
145315
|
var SmartSelectionRange;
|
|
145314
145316
|
(function (SmartSelectionRange) {
|
|
145315
145317
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
145316
|
-
var _a;
|
|
145318
|
+
var _a, _b;
|
|
145317
145319
|
var selectionRange = {
|
|
145318
145320
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
145319
145321
|
};
|
|
@@ -145365,6 +145367,17 @@ var ts;
|
|
|
145365
145367
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
145366
145368
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
145367
145369
|
}
|
|
145370
|
+
// (#39618 & #49807)
|
|
145371
|
+
// When the node is a SyntaxList and its first child has a JSDoc comment, then the node's
|
|
145372
|
+
// `start` (which usually is the result of calling `node.getStart()`) points to the first
|
|
145373
|
+
// token after the JSDoc comment. So, we have to make sure we'd pushed the selection
|
|
145374
|
+
// covering the JSDoc comment before diving further.
|
|
145375
|
+
if (ts.isSyntaxList(node)) {
|
|
145376
|
+
var firstChild = node.getChildren()[0];
|
|
145377
|
+
if (firstChild && ts.hasJSDocNodes(firstChild) && ((_b = firstChild.jsDoc) === null || _b === void 0 ? void 0 : _b.length) && firstChild.getStart() !== node.pos) {
|
|
145378
|
+
start = Math.min(start, ts.first(firstChild.jsDoc).getStart());
|
|
145379
|
+
}
|
|
145380
|
+
}
|
|
145368
145381
|
pushSelectionRange(start, end);
|
|
145369
145382
|
// String literals should have a stop both inside and outside their quotes.
|
|
145370
145383
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -145438,6 +145451,7 @@ var ts;
|
|
|
145438
145451
|
* other as well as of other top-level statements and declarations.
|
|
145439
145452
|
*/
|
|
145440
145453
|
function getSelectionChildren(node) {
|
|
145454
|
+
var _a;
|
|
145441
145455
|
// Group top-level imports
|
|
145442
145456
|
if (ts.isSourceFile(node)) {
|
|
145443
145457
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -145453,7 +145467,7 @@ var ts;
|
|
|
145453
145467
|
// because it allows the mapped type to become an object type with a
|
|
145454
145468
|
// few keystrokes.
|
|
145455
145469
|
if (ts.isMappedTypeNode(node)) {
|
|
145456
|
-
var
|
|
145470
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
145457
145471
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
145458
145472
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
145459
145473
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -145484,10 +145498,13 @@ var ts;
|
|
|
145484
145498
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
145485
145499
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
145486
145500
|
});
|
|
145487
|
-
|
|
145501
|
+
var firstJSDocChild = ((_a = children[0]) === null || _a === void 0 ? void 0 : _a.kind) === 320 /* JSDoc */ ? children[0] : undefined;
|
|
145502
|
+
var withJSDocSeparated = firstJSDocChild ? children.slice(1) : children;
|
|
145503
|
+
var splittedChildren = splitChildren(withJSDocSeparated, function (_a) {
|
|
145488
145504
|
var kind = _a.kind;
|
|
145489
145505
|
return kind === 58 /* ColonToken */;
|
|
145490
145506
|
});
|
|
145507
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
145491
145508
|
}
|
|
145492
145509
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
145493
145510
|
if (ts.isParameter(node)) {
|
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.20220713";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -3136,6 +3136,32 @@ var ts;
|
|
|
3136
3136
|
return result;
|
|
3137
3137
|
}
|
|
3138
3138
|
Debug.formatVariance = formatVariance;
|
|
3139
|
+
var DebugTypeMapper = /** @class */ (function () {
|
|
3140
|
+
function DebugTypeMapper() {
|
|
3141
|
+
}
|
|
3142
|
+
DebugTypeMapper.prototype.__debugToString = function () {
|
|
3143
|
+
var _a;
|
|
3144
|
+
type(this);
|
|
3145
|
+
switch (this.kind) {
|
|
3146
|
+
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
3147
|
+
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
3148
|
+
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return "any"; }), function (s, t) { return s.__debugTypeToString() + " -> " + (typeof t === "string" ? t : t.__debugTypeToString()); }).join(", ");
|
|
3149
|
+
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
3150
|
+
case 5 /* Merged */:
|
|
3151
|
+
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
3152
|
+
default: return assertNever(this);
|
|
3153
|
+
}
|
|
3154
|
+
};
|
|
3155
|
+
return DebugTypeMapper;
|
|
3156
|
+
}());
|
|
3157
|
+
Debug.DebugTypeMapper = DebugTypeMapper;
|
|
3158
|
+
function attachDebugPrototypeIfDebug(mapper) {
|
|
3159
|
+
if (Debug.isDebugging) {
|
|
3160
|
+
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
3161
|
+
}
|
|
3162
|
+
return mapper;
|
|
3163
|
+
}
|
|
3164
|
+
Debug.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;
|
|
3139
3165
|
})(Debug = ts.Debug || (ts.Debug = {}));
|
|
3140
3166
|
})(ts || (ts = {}));
|
|
3141
3167
|
/* @internal */
|
|
@@ -48687,24 +48713,6 @@ var ts;
|
|
|
48687
48713
|
var Symbol = ts.objectAllocator.getSymbolConstructor();
|
|
48688
48714
|
var Type = ts.objectAllocator.getTypeConstructor();
|
|
48689
48715
|
var Signature = ts.objectAllocator.getSignatureConstructor();
|
|
48690
|
-
var DebugTypeMapper = /** @class */ (function () {
|
|
48691
|
-
function DebugTypeMapper() {
|
|
48692
|
-
}
|
|
48693
|
-
DebugTypeMapper.prototype.__debugToString = function () {
|
|
48694
|
-
var _a;
|
|
48695
|
-
ts.Debug.type(this);
|
|
48696
|
-
switch (this.kind) {
|
|
48697
|
-
case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
|
|
48698
|
-
case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
|
|
48699
|
-
case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
|
|
48700
|
-
case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
|
|
48701
|
-
case 5 /* Merged */:
|
|
48702
|
-
case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
|
|
48703
|
-
default: return ts.Debug.assertNever(this);
|
|
48704
|
-
}
|
|
48705
|
-
};
|
|
48706
|
-
return DebugTypeMapper;
|
|
48707
|
-
}());
|
|
48708
48716
|
var typeCount = 0;
|
|
48709
48717
|
var symbolCount = 0;
|
|
48710
48718
|
var enumCount = 0;
|
|
@@ -63834,26 +63842,20 @@ var ts;
|
|
|
63834
63842
|
return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
|
|
63835
63843
|
}
|
|
63836
63844
|
}
|
|
63837
|
-
function attachDebugPrototypeIfDebug(mapper) {
|
|
63838
|
-
if (ts.Debug.isDebugging) {
|
|
63839
|
-
return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
|
|
63840
|
-
}
|
|
63841
|
-
return mapper;
|
|
63842
|
-
}
|
|
63843
63845
|
function makeUnaryTypeMapper(source, target) {
|
|
63844
|
-
return attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
63846
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
|
|
63845
63847
|
}
|
|
63846
63848
|
function makeArrayTypeMapper(sources, targets) {
|
|
63847
|
-
return attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
63849
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
|
|
63848
63850
|
}
|
|
63849
63851
|
function makeFunctionTypeMapper(func, debugInfo) {
|
|
63850
|
-
return attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
63852
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
|
|
63851
63853
|
}
|
|
63852
63854
|
function makeDeferredTypeMapper(sources, targets) {
|
|
63853
|
-
return attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
63855
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
|
|
63854
63856
|
}
|
|
63855
63857
|
function makeCompositeTypeMapper(kind, mapper1, mapper2) {
|
|
63856
|
-
return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
63858
|
+
return ts.Debug.attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
|
|
63857
63859
|
}
|
|
63858
63860
|
function createTypeEraser(sources) {
|
|
63859
63861
|
return createTypeMapper(sources, /*targets*/ undefined);
|
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.8.0-dev.
|
|
5
|
+
"version": "4.8.0-dev.20220713",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|