typescript 4.8.0-dev.20220712 → 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 +1 -1
- package/lib/tsserver.js +19 -4
- package/lib/tsserverlibrary.js +19 -4
- package/lib/typescript.js +19 -4
- package/lib/typescriptServices.js +19 -4
- package/lib/typingsInstaller.js +1 -1
- 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 :
|
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) {
|
|
@@ -144711,7 +144711,7 @@ var ts;
|
|
|
144711
144711
|
var SmartSelectionRange;
|
|
144712
144712
|
(function (SmartSelectionRange) {
|
|
144713
144713
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
144714
|
-
var _a;
|
|
144714
|
+
var _a, _b;
|
|
144715
144715
|
var selectionRange = {
|
|
144716
144716
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
144717
144717
|
};
|
|
@@ -144763,6 +144763,17 @@ var ts;
|
|
|
144763
144763
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
144764
144764
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
144765
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
|
+
}
|
|
144766
144777
|
pushSelectionRange(start, end);
|
|
144767
144778
|
// String literals should have a stop both inside and outside their quotes.
|
|
144768
144779
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -144836,6 +144847,7 @@ var ts;
|
|
|
144836
144847
|
* other as well as of other top-level statements and declarations.
|
|
144837
144848
|
*/
|
|
144838
144849
|
function getSelectionChildren(node) {
|
|
144850
|
+
var _a;
|
|
144839
144851
|
// Group top-level imports
|
|
144840
144852
|
if (ts.isSourceFile(node)) {
|
|
144841
144853
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -144851,7 +144863,7 @@ var ts;
|
|
|
144851
144863
|
// because it allows the mapped type to become an object type with a
|
|
144852
144864
|
// few keystrokes.
|
|
144853
144865
|
if (ts.isMappedTypeNode(node)) {
|
|
144854
|
-
var
|
|
144866
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
144855
144867
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
144856
144868
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
144857
144869
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -144882,10 +144894,13 @@ var ts;
|
|
|
144882
144894
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
144883
144895
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
144884
144896
|
});
|
|
144885
|
-
|
|
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) {
|
|
144886
144900
|
var kind = _a.kind;
|
|
144887
144901
|
return kind === 58 /* ColonToken */;
|
|
144888
144902
|
});
|
|
144903
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
144889
144904
|
}
|
|
144890
144905
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
144891
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) {
|
|
@@ -145324,7 +145324,7 @@ var ts;
|
|
|
145324
145324
|
var SmartSelectionRange;
|
|
145325
145325
|
(function (SmartSelectionRange) {
|
|
145326
145326
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
145327
|
-
var _a;
|
|
145327
|
+
var _a, _b;
|
|
145328
145328
|
var selectionRange = {
|
|
145329
145329
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
145330
145330
|
};
|
|
@@ -145376,6 +145376,17 @@ var ts;
|
|
|
145376
145376
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
145377
145377
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
145378
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
|
+
}
|
|
145379
145390
|
pushSelectionRange(start, end);
|
|
145380
145391
|
// String literals should have a stop both inside and outside their quotes.
|
|
145381
145392
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -145449,6 +145460,7 @@ var ts;
|
|
|
145449
145460
|
* other as well as of other top-level statements and declarations.
|
|
145450
145461
|
*/
|
|
145451
145462
|
function getSelectionChildren(node) {
|
|
145463
|
+
var _a;
|
|
145452
145464
|
// Group top-level imports
|
|
145453
145465
|
if (ts.isSourceFile(node)) {
|
|
145454
145466
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -145464,7 +145476,7 @@ var ts;
|
|
|
145464
145476
|
// because it allows the mapped type to become an object type with a
|
|
145465
145477
|
// few keystrokes.
|
|
145466
145478
|
if (ts.isMappedTypeNode(node)) {
|
|
145467
|
-
var
|
|
145479
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
145468
145480
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
145469
145481
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
145470
145482
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -145495,10 +145507,13 @@ var ts;
|
|
|
145495
145507
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
145496
145508
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
145497
145509
|
});
|
|
145498
|
-
|
|
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) {
|
|
145499
145513
|
var kind = _a.kind;
|
|
145500
145514
|
return kind === 58 /* ColonToken */;
|
|
145501
145515
|
});
|
|
145516
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
145502
145517
|
}
|
|
145503
145518
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
145504
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) {
|
|
@@ -145315,7 +145315,7 @@ var ts;
|
|
|
145315
145315
|
var SmartSelectionRange;
|
|
145316
145316
|
(function (SmartSelectionRange) {
|
|
145317
145317
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
145318
|
-
var _a;
|
|
145318
|
+
var _a, _b;
|
|
145319
145319
|
var selectionRange = {
|
|
145320
145320
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
145321
145321
|
};
|
|
@@ -145367,6 +145367,17 @@ var ts;
|
|
|
145367
145367
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
145368
145368
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
145369
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
|
+
}
|
|
145370
145381
|
pushSelectionRange(start, end);
|
|
145371
145382
|
// String literals should have a stop both inside and outside their quotes.
|
|
145372
145383
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -145440,6 +145451,7 @@ var ts;
|
|
|
145440
145451
|
* other as well as of other top-level statements and declarations.
|
|
145441
145452
|
*/
|
|
145442
145453
|
function getSelectionChildren(node) {
|
|
145454
|
+
var _a;
|
|
145443
145455
|
// Group top-level imports
|
|
145444
145456
|
if (ts.isSourceFile(node)) {
|
|
145445
145457
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -145455,7 +145467,7 @@ var ts;
|
|
|
145455
145467
|
// because it allows the mapped type to become an object type with a
|
|
145456
145468
|
// few keystrokes.
|
|
145457
145469
|
if (ts.isMappedTypeNode(node)) {
|
|
145458
|
-
var
|
|
145470
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
145459
145471
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
145460
145472
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
145461
145473
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -145486,10 +145498,13 @@ var ts;
|
|
|
145486
145498
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
145487
145499
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
145488
145500
|
});
|
|
145489
|
-
|
|
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) {
|
|
145490
145504
|
var kind = _a.kind;
|
|
145491
145505
|
return kind === 58 /* ColonToken */;
|
|
145492
145506
|
});
|
|
145507
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
145493
145508
|
}
|
|
145494
145509
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
145495
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) {
|
|
@@ -145315,7 +145315,7 @@ var ts;
|
|
|
145315
145315
|
var SmartSelectionRange;
|
|
145316
145316
|
(function (SmartSelectionRange) {
|
|
145317
145317
|
function getSmartSelectionRange(pos, sourceFile) {
|
|
145318
|
-
var _a;
|
|
145318
|
+
var _a, _b;
|
|
145319
145319
|
var selectionRange = {
|
|
145320
145320
|
textSpan: ts.createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())
|
|
145321
145321
|
};
|
|
@@ -145367,6 +145367,17 @@ var ts;
|
|
|
145367
145367
|
if (ts.hasJSDocNodes(node) && ((_a = node.jsDoc) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
145368
145368
|
pushSelectionRange(ts.first(node.jsDoc).getStart(), end);
|
|
145369
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
|
+
}
|
|
145370
145381
|
pushSelectionRange(start, end);
|
|
145371
145382
|
// String literals should have a stop both inside and outside their quotes.
|
|
145372
145383
|
if (ts.isStringLiteral(node) || ts.isTemplateLiteral(node)) {
|
|
@@ -145440,6 +145451,7 @@ var ts;
|
|
|
145440
145451
|
* other as well as of other top-level statements and declarations.
|
|
145441
145452
|
*/
|
|
145442
145453
|
function getSelectionChildren(node) {
|
|
145454
|
+
var _a;
|
|
145443
145455
|
// Group top-level imports
|
|
145444
145456
|
if (ts.isSourceFile(node)) {
|
|
145445
145457
|
return groupChildren(node.getChildAt(0).getChildren(), isImport);
|
|
@@ -145455,7 +145467,7 @@ var ts;
|
|
|
145455
145467
|
// because it allows the mapped type to become an object type with a
|
|
145456
145468
|
// few keystrokes.
|
|
145457
145469
|
if (ts.isMappedTypeNode(node)) {
|
|
145458
|
-
var
|
|
145470
|
+
var _b = node.getChildren(), openBraceToken = _b[0], children = _b.slice(1);
|
|
145459
145471
|
var closeBraceToken = ts.Debug.checkDefined(children.pop());
|
|
145460
145472
|
ts.Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */);
|
|
145461
145473
|
ts.Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */);
|
|
@@ -145486,10 +145498,13 @@ var ts;
|
|
|
145486
145498
|
var children = groupChildren(node.getChildren(), function (child) {
|
|
145487
145499
|
return child === node.name || ts.contains(node.modifiers, child);
|
|
145488
145500
|
});
|
|
145489
|
-
|
|
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) {
|
|
145490
145504
|
var kind = _a.kind;
|
|
145491
145505
|
return kind === 58 /* ColonToken */;
|
|
145492
145506
|
});
|
|
145507
|
+
return firstJSDocChild ? [firstJSDocChild, createSyntaxList(splittedChildren)] : splittedChildren;
|
|
145493
145508
|
}
|
|
145494
145509
|
// Group the parameter name with its `...`, then that group with its `?`, then pivot on `=`.
|
|
145495
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) {
|
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": [
|