typescript 4.2.2 → 4.2.3
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/protocol.d.ts +63 -0
- package/lib/tsc.js +18 -12
- package/lib/tsserver.js +48 -13
- package/lib/tsserverlibrary.d.ts +62 -0
- package/lib/tsserverlibrary.js +48 -13
- package/lib/typescript.js +20 -13
- package/lib/typescriptServices.js +20 -13
- package/lib/typingsInstaller.js +19 -12
- package/package.json +1 -1
package/lib/protocol.d.ts
CHANGED
|
@@ -603,6 +603,41 @@ declare namespace ts.server.protocol {
|
|
|
603
603
|
*/
|
|
604
604
|
body?: string[];
|
|
605
605
|
}
|
|
606
|
+
/**
|
|
607
|
+
* A request to get encoded semantic classifications for a span in the file
|
|
608
|
+
*/
|
|
609
|
+
interface EncodedSemanticClassificationsRequest extends FileRequest {
|
|
610
|
+
arguments: EncodedSemanticClassificationsRequestArgs;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Arguments for EncodedSemanticClassificationsRequest request.
|
|
614
|
+
*/
|
|
615
|
+
interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
|
|
616
|
+
/**
|
|
617
|
+
* Start position of the span.
|
|
618
|
+
*/
|
|
619
|
+
start: number;
|
|
620
|
+
/**
|
|
621
|
+
* Length of the span.
|
|
622
|
+
*/
|
|
623
|
+
length: number;
|
|
624
|
+
/**
|
|
625
|
+
* Optional parameter for the semantic highlighting response, if absent it
|
|
626
|
+
* defaults to "original".
|
|
627
|
+
*/
|
|
628
|
+
format?: "original" | "2020";
|
|
629
|
+
}
|
|
630
|
+
/** The response for a EncodedSemanticClassificationsRequest */
|
|
631
|
+
interface EncodedSemanticClassificationsResponse extends Response {
|
|
632
|
+
body?: EncodedSemanticClassificationsResponseBody;
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Implementation response message. Gives series of text spans depending on the format ar.
|
|
636
|
+
*/
|
|
637
|
+
interface EncodedSemanticClassificationsResponseBody {
|
|
638
|
+
endOfLineState: EndOfLineState;
|
|
639
|
+
spans: number[];
|
|
640
|
+
}
|
|
606
641
|
/**
|
|
607
642
|
* Arguments in document highlight request; include: filesToSearch, file,
|
|
608
643
|
* line, offset.
|
|
@@ -2626,6 +2661,33 @@ declare namespace ts.server.protocol {
|
|
|
2626
2661
|
ES2020 = "ES2020",
|
|
2627
2662
|
ESNext = "ESNext"
|
|
2628
2663
|
}
|
|
2664
|
+
const enum ClassificationType {
|
|
2665
|
+
comment = 1,
|
|
2666
|
+
identifier = 2,
|
|
2667
|
+
keyword = 3,
|
|
2668
|
+
numericLiteral = 4,
|
|
2669
|
+
operator = 5,
|
|
2670
|
+
stringLiteral = 6,
|
|
2671
|
+
regularExpressionLiteral = 7,
|
|
2672
|
+
whiteSpace = 8,
|
|
2673
|
+
text = 9,
|
|
2674
|
+
punctuation = 10,
|
|
2675
|
+
className = 11,
|
|
2676
|
+
enumName = 12,
|
|
2677
|
+
interfaceName = 13,
|
|
2678
|
+
moduleName = 14,
|
|
2679
|
+
typeParameterName = 15,
|
|
2680
|
+
typeAliasName = 16,
|
|
2681
|
+
parameterName = 17,
|
|
2682
|
+
docCommentTagName = 18,
|
|
2683
|
+
jsxOpenTagName = 19,
|
|
2684
|
+
jsxCloseTagName = 20,
|
|
2685
|
+
jsxSelfClosingTagName = 21,
|
|
2686
|
+
jsxAttribute = 22,
|
|
2687
|
+
jsxText = 23,
|
|
2688
|
+
jsxAttributeStringLiteralValue = 24,
|
|
2689
|
+
bigintLiteral = 25
|
|
2690
|
+
}
|
|
2629
2691
|
}
|
|
2630
2692
|
declare namespace ts.server.protocol {
|
|
2631
2693
|
|
|
@@ -2786,6 +2848,7 @@ declare namespace ts.server.protocol {
|
|
|
2786
2848
|
}
|
|
2787
2849
|
declare namespace ts {
|
|
2788
2850
|
// these types are empty stubs for types from services and should not be used directly
|
|
2851
|
+
export type EndOfLineState = never;
|
|
2789
2852
|
export type ScriptKind = never;
|
|
2790
2853
|
export type WatchFileKind = never;
|
|
2791
2854
|
export type WatchDirectoryKind = never;
|
package/lib/tsc.js
CHANGED
|
@@ -65,7 +65,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
65
65
|
var ts;
|
|
66
66
|
(function (ts) {
|
|
67
67
|
ts.versionMajorMinor = "4.2";
|
|
68
|
-
ts.version = "4.2.
|
|
68
|
+
ts.version = "4.2.3";
|
|
69
69
|
var NativeCollections;
|
|
70
70
|
(function (NativeCollections) {
|
|
71
71
|
function tryGetNativeMap() {
|
|
@@ -38531,13 +38531,16 @@ var ts;
|
|
|
38531
38531
|
return result || ts.emptyArray;
|
|
38532
38532
|
}
|
|
38533
38533
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
38534
|
-
|
|
38535
|
-
|
|
38536
|
-
|
|
38537
|
-
|
|
38538
|
-
|
|
38539
|
-
|
|
38540
|
-
|
|
38534
|
+
var resolved = type;
|
|
38535
|
+
resolved.members = members;
|
|
38536
|
+
resolved.properties = ts.emptyArray;
|
|
38537
|
+
resolved.callSignatures = callSignatures;
|
|
38538
|
+
resolved.constructSignatures = constructSignatures;
|
|
38539
|
+
resolved.stringIndexInfo = stringIndexInfo;
|
|
38540
|
+
resolved.numberIndexInfo = numberIndexInfo;
|
|
38541
|
+
if (members !== emptySymbols)
|
|
38542
|
+
resolved.properties = getNamedMembers(members);
|
|
38543
|
+
return resolved;
|
|
38541
38544
|
}
|
|
38542
38545
|
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
38543
38546
|
return setStructuredTypeMembers(createObjectType(16, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
|
|
@@ -46092,7 +46095,7 @@ var ts;
|
|
|
46092
46095
|
if (t.flags & 1048576) {
|
|
46093
46096
|
var origin = t.origin;
|
|
46094
46097
|
if (t.aliasSymbol || origin && !(origin.flags & 1048576)) {
|
|
46095
|
-
|
|
46098
|
+
ts.pushIfUnique(namedUnions, t);
|
|
46096
46099
|
}
|
|
46097
46100
|
else if (origin && origin.flags & 1048576) {
|
|
46098
46101
|
addNamedUnions(namedUnions, origin.types);
|
|
@@ -64692,6 +64695,7 @@ var ts;
|
|
|
64692
64695
|
return true;
|
|
64693
64696
|
}
|
|
64694
64697
|
function checkAliasSymbol(node) {
|
|
64698
|
+
var _a;
|
|
64695
64699
|
var symbol = getSymbolOfNode(node);
|
|
64696
64700
|
var target = resolveAlias(symbol);
|
|
64697
64701
|
if (target !== unknownSymbol) {
|
|
@@ -64712,7 +64716,7 @@ var ts;
|
|
|
64712
64716
|
&& !(node.flags & 8388608)) {
|
|
64713
64717
|
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
|
64714
64718
|
}
|
|
64715
|
-
if (ts.isImportSpecifier(node) &&
|
|
64719
|
+
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728); }))) {
|
|
64716
64720
|
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
|
|
64717
64721
|
}
|
|
64718
64722
|
}
|
|
@@ -91669,8 +91673,9 @@ var ts;
|
|
|
91669
91673
|
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
|
|
91670
91674
|
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
|
|
91671
91675
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
91676
|
+
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
91672
91677
|
if (!preferSymlinks) {
|
|
91673
|
-
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
|
|
91678
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
91674
91679
|
if (result_15)
|
|
91675
91680
|
return result_15;
|
|
91676
91681
|
}
|
|
@@ -91695,13 +91700,14 @@ var ts;
|
|
|
91695
91700
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
91696
91701
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
91697
91702
|
var result_16 = cb(option, target === referenceRedirect);
|
|
91703
|
+
shouldFilterIgnoredPaths = true;
|
|
91698
91704
|
if (result_16)
|
|
91699
91705
|
return result_16;
|
|
91700
91706
|
}
|
|
91701
91707
|
});
|
|
91702
91708
|
});
|
|
91703
91709
|
return result || (preferSymlinks
|
|
91704
|
-
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
91710
|
+
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
91705
91711
|
: undefined);
|
|
91706
91712
|
}
|
|
91707
91713
|
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
|
package/lib/tsserver.js
CHANGED
|
@@ -96,7 +96,7 @@ var ts;
|
|
|
96
96
|
// The following is baselined as a literal template type without intervention
|
|
97
97
|
/** The version of the TypeScript compiler release */
|
|
98
98
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
99
|
-
ts.version = "4.2.
|
|
99
|
+
ts.version = "4.2.3";
|
|
100
100
|
/* @internal */
|
|
101
101
|
var Comparison;
|
|
102
102
|
(function (Comparison) {
|
|
@@ -47044,13 +47044,17 @@ var ts;
|
|
|
47044
47044
|
return result || ts.emptyArray;
|
|
47045
47045
|
}
|
|
47046
47046
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47047
|
-
|
|
47048
|
-
|
|
47049
|
-
|
|
47050
|
-
|
|
47051
|
-
|
|
47052
|
-
|
|
47053
|
-
|
|
47047
|
+
var resolved = type;
|
|
47048
|
+
resolved.members = members;
|
|
47049
|
+
resolved.properties = ts.emptyArray;
|
|
47050
|
+
resolved.callSignatures = callSignatures;
|
|
47051
|
+
resolved.constructSignatures = constructSignatures;
|
|
47052
|
+
resolved.stringIndexInfo = stringIndexInfo;
|
|
47053
|
+
resolved.numberIndexInfo = numberIndexInfo;
|
|
47054
|
+
// This can loop back to getPropertyOfType() which would crash if `callSignatures` & `constructSignatures` are not initialized.
|
|
47055
|
+
if (members !== emptySymbols)
|
|
47056
|
+
resolved.properties = getNamedMembers(members);
|
|
47057
|
+
return resolved;
|
|
47054
47058
|
}
|
|
47055
47059
|
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47056
47060
|
return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
|
|
@@ -55719,7 +55723,7 @@ var ts;
|
|
|
55719
55723
|
if (t.flags & 1048576 /* Union */) {
|
|
55720
55724
|
var origin = t.origin;
|
|
55721
55725
|
if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {
|
|
55722
|
-
|
|
55726
|
+
ts.pushIfUnique(namedUnions, t);
|
|
55723
55727
|
}
|
|
55724
55728
|
else if (origin && origin.flags & 1048576 /* Union */) {
|
|
55725
55729
|
addNamedUnions(namedUnions, origin.types);
|
|
@@ -77354,6 +77358,7 @@ var ts;
|
|
|
77354
77358
|
return true;
|
|
77355
77359
|
}
|
|
77356
77360
|
function checkAliasSymbol(node) {
|
|
77361
|
+
var _a;
|
|
77357
77362
|
var symbol = getSymbolOfNode(node);
|
|
77358
77363
|
var target = resolveAlias(symbol);
|
|
77359
77364
|
if (target !== unknownSymbol) {
|
|
@@ -77381,7 +77386,7 @@ var ts;
|
|
|
77381
77386
|
&& !(node.flags & 8388608 /* Ambient */)) {
|
|
77382
77387
|
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
|
77383
77388
|
}
|
|
77384
|
-
if (ts.isImportSpecifier(node) &&
|
|
77389
|
+
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
|
|
77385
77390
|
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
|
|
77386
77391
|
}
|
|
77387
77392
|
}
|
|
@@ -111486,10 +111491,11 @@ var ts;
|
|
|
111486
111491
|
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
|
|
111487
111492
|
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
|
|
111488
111493
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
111494
|
+
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
111489
111495
|
if (!preferSymlinks) {
|
|
111490
111496
|
// Symlinks inside ignored paths are already filtered out of the symlink cache,
|
|
111491
111497
|
// so we only need to remove them from the realpath filenames.
|
|
111492
|
-
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
|
|
111498
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
111493
111499
|
if (result_15)
|
|
111494
111500
|
return result_15;
|
|
111495
111501
|
}
|
|
@@ -111515,13 +111521,14 @@ var ts;
|
|
|
111515
111521
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
111516
111522
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
111517
111523
|
var result_16 = cb(option, target === referenceRedirect);
|
|
111524
|
+
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
|
|
111518
111525
|
if (result_16)
|
|
111519
111526
|
return result_16;
|
|
111520
111527
|
}
|
|
111521
111528
|
});
|
|
111522
111529
|
});
|
|
111523
111530
|
return result || (preferSymlinks
|
|
111524
|
-
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111531
|
+
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111525
111532
|
: undefined);
|
|
111526
111533
|
}
|
|
111527
111534
|
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
@@ -139596,7 +139603,7 @@ var ts;
|
|
|
139596
139603
|
}
|
|
139597
139604
|
function addFunctionDeclaration(changes, context, info) {
|
|
139598
139605
|
var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
|
|
139599
|
-
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, info.token, info.modifierFlags, info.parentDeclaration);
|
|
139606
|
+
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, ts.idText(info.token), info.modifierFlags, info.parentDeclaration);
|
|
139600
139607
|
changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
|
|
139601
139608
|
}
|
|
139602
139609
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -152538,6 +152545,34 @@ var ts;
|
|
|
152538
152545
|
ScriptTarget["ES2020"] = "ES2020";
|
|
152539
152546
|
ScriptTarget["ESNext"] = "ESNext";
|
|
152540
152547
|
})(ScriptTarget = protocol.ScriptTarget || (protocol.ScriptTarget = {}));
|
|
152548
|
+
var ClassificationType;
|
|
152549
|
+
(function (ClassificationType) {
|
|
152550
|
+
ClassificationType[ClassificationType["comment"] = 1] = "comment";
|
|
152551
|
+
ClassificationType[ClassificationType["identifier"] = 2] = "identifier";
|
|
152552
|
+
ClassificationType[ClassificationType["keyword"] = 3] = "keyword";
|
|
152553
|
+
ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral";
|
|
152554
|
+
ClassificationType[ClassificationType["operator"] = 5] = "operator";
|
|
152555
|
+
ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral";
|
|
152556
|
+
ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
|
|
152557
|
+
ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace";
|
|
152558
|
+
ClassificationType[ClassificationType["text"] = 9] = "text";
|
|
152559
|
+
ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation";
|
|
152560
|
+
ClassificationType[ClassificationType["className"] = 11] = "className";
|
|
152561
|
+
ClassificationType[ClassificationType["enumName"] = 12] = "enumName";
|
|
152562
|
+
ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName";
|
|
152563
|
+
ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName";
|
|
152564
|
+
ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName";
|
|
152565
|
+
ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName";
|
|
152566
|
+
ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName";
|
|
152567
|
+
ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName";
|
|
152568
|
+
ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName";
|
|
152569
|
+
ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName";
|
|
152570
|
+
ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
|
|
152571
|
+
ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute";
|
|
152572
|
+
ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText";
|
|
152573
|
+
ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
|
|
152574
|
+
ClassificationType[ClassificationType["bigintLiteral"] = 25] = "bigintLiteral";
|
|
152575
|
+
})(ClassificationType = protocol.ClassificationType || (protocol.ClassificationType = {}));
|
|
152541
152576
|
})(protocol = server.protocol || (server.protocol = {}));
|
|
152542
152577
|
})(server = ts.server || (ts.server = {}));
|
|
152543
152578
|
})(ts || (ts = {}));
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -7136,6 +7136,41 @@ declare namespace ts.server.protocol {
|
|
|
7136
7136
|
*/
|
|
7137
7137
|
body?: string[];
|
|
7138
7138
|
}
|
|
7139
|
+
/**
|
|
7140
|
+
* A request to get encoded semantic classifications for a span in the file
|
|
7141
|
+
*/
|
|
7142
|
+
interface EncodedSemanticClassificationsRequest extends FileRequest {
|
|
7143
|
+
arguments: EncodedSemanticClassificationsRequestArgs;
|
|
7144
|
+
}
|
|
7145
|
+
/**
|
|
7146
|
+
* Arguments for EncodedSemanticClassificationsRequest request.
|
|
7147
|
+
*/
|
|
7148
|
+
interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
|
|
7149
|
+
/**
|
|
7150
|
+
* Start position of the span.
|
|
7151
|
+
*/
|
|
7152
|
+
start: number;
|
|
7153
|
+
/**
|
|
7154
|
+
* Length of the span.
|
|
7155
|
+
*/
|
|
7156
|
+
length: number;
|
|
7157
|
+
/**
|
|
7158
|
+
* Optional parameter for the semantic highlighting response, if absent it
|
|
7159
|
+
* defaults to "original".
|
|
7160
|
+
*/
|
|
7161
|
+
format?: "original" | "2020";
|
|
7162
|
+
}
|
|
7163
|
+
/** The response for a EncodedSemanticClassificationsRequest */
|
|
7164
|
+
interface EncodedSemanticClassificationsResponse extends Response {
|
|
7165
|
+
body?: EncodedSemanticClassificationsResponseBody;
|
|
7166
|
+
}
|
|
7167
|
+
/**
|
|
7168
|
+
* Implementation response message. Gives series of text spans depending on the format ar.
|
|
7169
|
+
*/
|
|
7170
|
+
interface EncodedSemanticClassificationsResponseBody {
|
|
7171
|
+
endOfLineState: EndOfLineState;
|
|
7172
|
+
spans: number[];
|
|
7173
|
+
}
|
|
7139
7174
|
/**
|
|
7140
7175
|
* Arguments in document highlight request; include: filesToSearch, file,
|
|
7141
7176
|
* line, offset.
|
|
@@ -9159,6 +9194,33 @@ declare namespace ts.server.protocol {
|
|
|
9159
9194
|
ES2020 = "ES2020",
|
|
9160
9195
|
ESNext = "ESNext"
|
|
9161
9196
|
}
|
|
9197
|
+
enum ClassificationType {
|
|
9198
|
+
comment = 1,
|
|
9199
|
+
identifier = 2,
|
|
9200
|
+
keyword = 3,
|
|
9201
|
+
numericLiteral = 4,
|
|
9202
|
+
operator = 5,
|
|
9203
|
+
stringLiteral = 6,
|
|
9204
|
+
regularExpressionLiteral = 7,
|
|
9205
|
+
whiteSpace = 8,
|
|
9206
|
+
text = 9,
|
|
9207
|
+
punctuation = 10,
|
|
9208
|
+
className = 11,
|
|
9209
|
+
enumName = 12,
|
|
9210
|
+
interfaceName = 13,
|
|
9211
|
+
moduleName = 14,
|
|
9212
|
+
typeParameterName = 15,
|
|
9213
|
+
typeAliasName = 16,
|
|
9214
|
+
parameterName = 17,
|
|
9215
|
+
docCommentTagName = 18,
|
|
9216
|
+
jsxOpenTagName = 19,
|
|
9217
|
+
jsxCloseTagName = 20,
|
|
9218
|
+
jsxSelfClosingTagName = 21,
|
|
9219
|
+
jsxAttribute = 22,
|
|
9220
|
+
jsxText = 23,
|
|
9221
|
+
jsxAttributeStringLiteralValue = 24,
|
|
9222
|
+
bigintLiteral = 25
|
|
9223
|
+
}
|
|
9162
9224
|
}
|
|
9163
9225
|
declare namespace ts.server {
|
|
9164
9226
|
interface ScriptInfoVersion {
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -290,7 +290,7 @@ var ts;
|
|
|
290
290
|
// The following is baselined as a literal template type without intervention
|
|
291
291
|
/** The version of the TypeScript compiler release */
|
|
292
292
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
293
|
-
ts.version = "4.2.
|
|
293
|
+
ts.version = "4.2.3";
|
|
294
294
|
/* @internal */
|
|
295
295
|
var Comparison;
|
|
296
296
|
(function (Comparison) {
|
|
@@ -47238,13 +47238,17 @@ var ts;
|
|
|
47238
47238
|
return result || ts.emptyArray;
|
|
47239
47239
|
}
|
|
47240
47240
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47241
|
-
|
|
47242
|
-
|
|
47243
|
-
|
|
47244
|
-
|
|
47245
|
-
|
|
47246
|
-
|
|
47247
|
-
|
|
47241
|
+
var resolved = type;
|
|
47242
|
+
resolved.members = members;
|
|
47243
|
+
resolved.properties = ts.emptyArray;
|
|
47244
|
+
resolved.callSignatures = callSignatures;
|
|
47245
|
+
resolved.constructSignatures = constructSignatures;
|
|
47246
|
+
resolved.stringIndexInfo = stringIndexInfo;
|
|
47247
|
+
resolved.numberIndexInfo = numberIndexInfo;
|
|
47248
|
+
// This can loop back to getPropertyOfType() which would crash if `callSignatures` & `constructSignatures` are not initialized.
|
|
47249
|
+
if (members !== emptySymbols)
|
|
47250
|
+
resolved.properties = getNamedMembers(members);
|
|
47251
|
+
return resolved;
|
|
47248
47252
|
}
|
|
47249
47253
|
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47250
47254
|
return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
|
|
@@ -55913,7 +55917,7 @@ var ts;
|
|
|
55913
55917
|
if (t.flags & 1048576 /* Union */) {
|
|
55914
55918
|
var origin = t.origin;
|
|
55915
55919
|
if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {
|
|
55916
|
-
|
|
55920
|
+
ts.pushIfUnique(namedUnions, t);
|
|
55917
55921
|
}
|
|
55918
55922
|
else if (origin && origin.flags & 1048576 /* Union */) {
|
|
55919
55923
|
addNamedUnions(namedUnions, origin.types);
|
|
@@ -77548,6 +77552,7 @@ var ts;
|
|
|
77548
77552
|
return true;
|
|
77549
77553
|
}
|
|
77550
77554
|
function checkAliasSymbol(node) {
|
|
77555
|
+
var _a;
|
|
77551
77556
|
var symbol = getSymbolOfNode(node);
|
|
77552
77557
|
var target = resolveAlias(symbol);
|
|
77553
77558
|
if (target !== unknownSymbol) {
|
|
@@ -77575,7 +77580,7 @@ var ts;
|
|
|
77575
77580
|
&& !(node.flags & 8388608 /* Ambient */)) {
|
|
77576
77581
|
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
|
77577
77582
|
}
|
|
77578
|
-
if (ts.isImportSpecifier(node) &&
|
|
77583
|
+
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
|
|
77579
77584
|
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
|
|
77580
77585
|
}
|
|
77581
77586
|
}
|
|
@@ -111680,10 +111685,11 @@ var ts;
|
|
|
111680
111685
|
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
|
|
111681
111686
|
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
|
|
111682
111687
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
111688
|
+
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
111683
111689
|
if (!preferSymlinks) {
|
|
111684
111690
|
// Symlinks inside ignored paths are already filtered out of the symlink cache,
|
|
111685
111691
|
// so we only need to remove them from the realpath filenames.
|
|
111686
|
-
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
|
|
111692
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
111687
111693
|
if (result_15)
|
|
111688
111694
|
return result_15;
|
|
111689
111695
|
}
|
|
@@ -111709,13 +111715,14 @@ var ts;
|
|
|
111709
111715
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
111710
111716
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
111711
111717
|
var result_16 = cb(option, target === referenceRedirect);
|
|
111718
|
+
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
|
|
111712
111719
|
if (result_16)
|
|
111713
111720
|
return result_16;
|
|
111714
111721
|
}
|
|
111715
111722
|
});
|
|
111716
111723
|
});
|
|
111717
111724
|
return result || (preferSymlinks
|
|
111718
|
-
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111725
|
+
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111719
111726
|
: undefined);
|
|
111720
111727
|
}
|
|
111721
111728
|
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
@@ -140165,7 +140172,7 @@ var ts;
|
|
|
140165
140172
|
}
|
|
140166
140173
|
function addFunctionDeclaration(changes, context, info) {
|
|
140167
140174
|
var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
|
|
140168
|
-
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, info.token, info.modifierFlags, info.parentDeclaration);
|
|
140175
|
+
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, ts.idText(info.token), info.modifierFlags, info.parentDeclaration);
|
|
140169
140176
|
changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
|
|
140170
140177
|
}
|
|
140171
140178
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -152732,6 +152739,34 @@ var ts;
|
|
|
152732
152739
|
ScriptTarget["ES2020"] = "ES2020";
|
|
152733
152740
|
ScriptTarget["ESNext"] = "ESNext";
|
|
152734
152741
|
})(ScriptTarget = protocol.ScriptTarget || (protocol.ScriptTarget = {}));
|
|
152742
|
+
var ClassificationType;
|
|
152743
|
+
(function (ClassificationType) {
|
|
152744
|
+
ClassificationType[ClassificationType["comment"] = 1] = "comment";
|
|
152745
|
+
ClassificationType[ClassificationType["identifier"] = 2] = "identifier";
|
|
152746
|
+
ClassificationType[ClassificationType["keyword"] = 3] = "keyword";
|
|
152747
|
+
ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral";
|
|
152748
|
+
ClassificationType[ClassificationType["operator"] = 5] = "operator";
|
|
152749
|
+
ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral";
|
|
152750
|
+
ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
|
|
152751
|
+
ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace";
|
|
152752
|
+
ClassificationType[ClassificationType["text"] = 9] = "text";
|
|
152753
|
+
ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation";
|
|
152754
|
+
ClassificationType[ClassificationType["className"] = 11] = "className";
|
|
152755
|
+
ClassificationType[ClassificationType["enumName"] = 12] = "enumName";
|
|
152756
|
+
ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName";
|
|
152757
|
+
ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName";
|
|
152758
|
+
ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName";
|
|
152759
|
+
ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName";
|
|
152760
|
+
ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName";
|
|
152761
|
+
ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName";
|
|
152762
|
+
ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName";
|
|
152763
|
+
ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName";
|
|
152764
|
+
ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
|
|
152765
|
+
ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute";
|
|
152766
|
+
ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText";
|
|
152767
|
+
ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
|
|
152768
|
+
ClassificationType[ClassificationType["bigintLiteral"] = 25] = "bigintLiteral";
|
|
152769
|
+
})(ClassificationType = protocol.ClassificationType || (protocol.ClassificationType = {}));
|
|
152735
152770
|
})(protocol = server.protocol || (server.protocol = {}));
|
|
152736
152771
|
})(server = ts.server || (ts.server = {}));
|
|
152737
152772
|
})(ts || (ts = {}));
|
package/lib/typescript.js
CHANGED
|
@@ -290,7 +290,7 @@ var ts;
|
|
|
290
290
|
// The following is baselined as a literal template type without intervention
|
|
291
291
|
/** The version of the TypeScript compiler release */
|
|
292
292
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
293
|
-
ts.version = "4.2.
|
|
293
|
+
ts.version = "4.2.3";
|
|
294
294
|
/* @internal */
|
|
295
295
|
var Comparison;
|
|
296
296
|
(function (Comparison) {
|
|
@@ -47238,13 +47238,17 @@ var ts;
|
|
|
47238
47238
|
return result || ts.emptyArray;
|
|
47239
47239
|
}
|
|
47240
47240
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47241
|
-
|
|
47242
|
-
|
|
47243
|
-
|
|
47244
|
-
|
|
47245
|
-
|
|
47246
|
-
|
|
47247
|
-
|
|
47241
|
+
var resolved = type;
|
|
47242
|
+
resolved.members = members;
|
|
47243
|
+
resolved.properties = ts.emptyArray;
|
|
47244
|
+
resolved.callSignatures = callSignatures;
|
|
47245
|
+
resolved.constructSignatures = constructSignatures;
|
|
47246
|
+
resolved.stringIndexInfo = stringIndexInfo;
|
|
47247
|
+
resolved.numberIndexInfo = numberIndexInfo;
|
|
47248
|
+
// This can loop back to getPropertyOfType() which would crash if `callSignatures` & `constructSignatures` are not initialized.
|
|
47249
|
+
if (members !== emptySymbols)
|
|
47250
|
+
resolved.properties = getNamedMembers(members);
|
|
47251
|
+
return resolved;
|
|
47248
47252
|
}
|
|
47249
47253
|
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47250
47254
|
return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
|
|
@@ -55913,7 +55917,7 @@ var ts;
|
|
|
55913
55917
|
if (t.flags & 1048576 /* Union */) {
|
|
55914
55918
|
var origin = t.origin;
|
|
55915
55919
|
if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {
|
|
55916
|
-
|
|
55920
|
+
ts.pushIfUnique(namedUnions, t);
|
|
55917
55921
|
}
|
|
55918
55922
|
else if (origin && origin.flags & 1048576 /* Union */) {
|
|
55919
55923
|
addNamedUnions(namedUnions, origin.types);
|
|
@@ -77548,6 +77552,7 @@ var ts;
|
|
|
77548
77552
|
return true;
|
|
77549
77553
|
}
|
|
77550
77554
|
function checkAliasSymbol(node) {
|
|
77555
|
+
var _a;
|
|
77551
77556
|
var symbol = getSymbolOfNode(node);
|
|
77552
77557
|
var target = resolveAlias(symbol);
|
|
77553
77558
|
if (target !== unknownSymbol) {
|
|
@@ -77575,7 +77580,7 @@ var ts;
|
|
|
77575
77580
|
&& !(node.flags & 8388608 /* Ambient */)) {
|
|
77576
77581
|
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
|
77577
77582
|
}
|
|
77578
|
-
if (ts.isImportSpecifier(node) &&
|
|
77583
|
+
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
|
|
77579
77584
|
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
|
|
77580
77585
|
}
|
|
77581
77586
|
}
|
|
@@ -111680,10 +111685,11 @@ var ts;
|
|
|
111680
111685
|
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
|
|
111681
111686
|
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
|
|
111682
111687
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
111688
|
+
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
111683
111689
|
if (!preferSymlinks) {
|
|
111684
111690
|
// Symlinks inside ignored paths are already filtered out of the symlink cache,
|
|
111685
111691
|
// so we only need to remove them from the realpath filenames.
|
|
111686
|
-
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
|
|
111692
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
111687
111693
|
if (result_15)
|
|
111688
111694
|
return result_15;
|
|
111689
111695
|
}
|
|
@@ -111709,13 +111715,14 @@ var ts;
|
|
|
111709
111715
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
111710
111716
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
111711
111717
|
var result_16 = cb(option, target === referenceRedirect);
|
|
111718
|
+
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
|
|
111712
111719
|
if (result_16)
|
|
111713
111720
|
return result_16;
|
|
111714
111721
|
}
|
|
111715
111722
|
});
|
|
111716
111723
|
});
|
|
111717
111724
|
return result || (preferSymlinks
|
|
111718
|
-
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111725
|
+
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111719
111726
|
: undefined);
|
|
111720
111727
|
}
|
|
111721
111728
|
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
@@ -140165,7 +140172,7 @@ var ts;
|
|
|
140165
140172
|
}
|
|
140166
140173
|
function addFunctionDeclaration(changes, context, info) {
|
|
140167
140174
|
var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
|
|
140168
|
-
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, info.token, info.modifierFlags, info.parentDeclaration);
|
|
140175
|
+
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, ts.idText(info.token), info.modifierFlags, info.parentDeclaration);
|
|
140169
140176
|
changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
|
|
140170
140177
|
}
|
|
140171
140178
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -290,7 +290,7 @@ var ts;
|
|
|
290
290
|
// The following is baselined as a literal template type without intervention
|
|
291
291
|
/** The version of the TypeScript compiler release */
|
|
292
292
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
293
|
-
ts.version = "4.2.
|
|
293
|
+
ts.version = "4.2.3";
|
|
294
294
|
/* @internal */
|
|
295
295
|
var Comparison;
|
|
296
296
|
(function (Comparison) {
|
|
@@ -47238,13 +47238,17 @@ var ts;
|
|
|
47238
47238
|
return result || ts.emptyArray;
|
|
47239
47239
|
}
|
|
47240
47240
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47241
|
-
|
|
47242
|
-
|
|
47243
|
-
|
|
47244
|
-
|
|
47245
|
-
|
|
47246
|
-
|
|
47247
|
-
|
|
47241
|
+
var resolved = type;
|
|
47242
|
+
resolved.members = members;
|
|
47243
|
+
resolved.properties = ts.emptyArray;
|
|
47244
|
+
resolved.callSignatures = callSignatures;
|
|
47245
|
+
resolved.constructSignatures = constructSignatures;
|
|
47246
|
+
resolved.stringIndexInfo = stringIndexInfo;
|
|
47247
|
+
resolved.numberIndexInfo = numberIndexInfo;
|
|
47248
|
+
// This can loop back to getPropertyOfType() which would crash if `callSignatures` & `constructSignatures` are not initialized.
|
|
47249
|
+
if (members !== emptySymbols)
|
|
47250
|
+
resolved.properties = getNamedMembers(members);
|
|
47251
|
+
return resolved;
|
|
47248
47252
|
}
|
|
47249
47253
|
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47250
47254
|
return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
|
|
@@ -55913,7 +55917,7 @@ var ts;
|
|
|
55913
55917
|
if (t.flags & 1048576 /* Union */) {
|
|
55914
55918
|
var origin = t.origin;
|
|
55915
55919
|
if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {
|
|
55916
|
-
|
|
55920
|
+
ts.pushIfUnique(namedUnions, t);
|
|
55917
55921
|
}
|
|
55918
55922
|
else if (origin && origin.flags & 1048576 /* Union */) {
|
|
55919
55923
|
addNamedUnions(namedUnions, origin.types);
|
|
@@ -77548,6 +77552,7 @@ var ts;
|
|
|
77548
77552
|
return true;
|
|
77549
77553
|
}
|
|
77550
77554
|
function checkAliasSymbol(node) {
|
|
77555
|
+
var _a;
|
|
77551
77556
|
var symbol = getSymbolOfNode(node);
|
|
77552
77557
|
var target = resolveAlias(symbol);
|
|
77553
77558
|
if (target !== unknownSymbol) {
|
|
@@ -77575,7 +77580,7 @@ var ts;
|
|
|
77575
77580
|
&& !(node.flags & 8388608 /* Ambient */)) {
|
|
77576
77581
|
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
|
77577
77582
|
}
|
|
77578
|
-
if (ts.isImportSpecifier(node) &&
|
|
77583
|
+
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
|
|
77579
77584
|
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
|
|
77580
77585
|
}
|
|
77581
77586
|
}
|
|
@@ -111680,10 +111685,11 @@ var ts;
|
|
|
111680
111685
|
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
|
|
111681
111686
|
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
|
|
111682
111687
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
111688
|
+
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
111683
111689
|
if (!preferSymlinks) {
|
|
111684
111690
|
// Symlinks inside ignored paths are already filtered out of the symlink cache,
|
|
111685
111691
|
// so we only need to remove them from the realpath filenames.
|
|
111686
|
-
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
|
|
111692
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
111687
111693
|
if (result_15)
|
|
111688
111694
|
return result_15;
|
|
111689
111695
|
}
|
|
@@ -111709,13 +111715,14 @@ var ts;
|
|
|
111709
111715
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
111710
111716
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
111711
111717
|
var result_16 = cb(option, target === referenceRedirect);
|
|
111718
|
+
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
|
|
111712
111719
|
if (result_16)
|
|
111713
111720
|
return result_16;
|
|
111714
111721
|
}
|
|
111715
111722
|
});
|
|
111716
111723
|
});
|
|
111717
111724
|
return result || (preferSymlinks
|
|
111718
|
-
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111725
|
+
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111719
111726
|
: undefined);
|
|
111720
111727
|
}
|
|
111721
111728
|
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
@@ -140165,7 +140172,7 @@ var ts;
|
|
|
140165
140172
|
}
|
|
140166
140173
|
function addFunctionDeclaration(changes, context, info) {
|
|
140167
140174
|
var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
|
|
140168
|
-
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, info.token, info.modifierFlags, info.parentDeclaration);
|
|
140175
|
+
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, ts.idText(info.token), info.modifierFlags, info.parentDeclaration);
|
|
140169
140176
|
changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
|
|
140170
140177
|
}
|
|
140171
140178
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -85,7 +85,7 @@ var ts;
|
|
|
85
85
|
// The following is baselined as a literal template type without intervention
|
|
86
86
|
/** The version of the TypeScript compiler release */
|
|
87
87
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
88
|
-
ts.version = "4.2.
|
|
88
|
+
ts.version = "4.2.3";
|
|
89
89
|
/* @internal */
|
|
90
90
|
var Comparison;
|
|
91
91
|
(function (Comparison) {
|
|
@@ -47033,13 +47033,17 @@ var ts;
|
|
|
47033
47033
|
return result || ts.emptyArray;
|
|
47034
47034
|
}
|
|
47035
47035
|
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47036
|
-
|
|
47037
|
-
|
|
47038
|
-
|
|
47039
|
-
|
|
47040
|
-
|
|
47041
|
-
|
|
47042
|
-
|
|
47036
|
+
var resolved = type;
|
|
47037
|
+
resolved.members = members;
|
|
47038
|
+
resolved.properties = ts.emptyArray;
|
|
47039
|
+
resolved.callSignatures = callSignatures;
|
|
47040
|
+
resolved.constructSignatures = constructSignatures;
|
|
47041
|
+
resolved.stringIndexInfo = stringIndexInfo;
|
|
47042
|
+
resolved.numberIndexInfo = numberIndexInfo;
|
|
47043
|
+
// This can loop back to getPropertyOfType() which would crash if `callSignatures` & `constructSignatures` are not initialized.
|
|
47044
|
+
if (members !== emptySymbols)
|
|
47045
|
+
resolved.properties = getNamedMembers(members);
|
|
47046
|
+
return resolved;
|
|
47043
47047
|
}
|
|
47044
47048
|
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
|
|
47045
47049
|
return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
|
|
@@ -55708,7 +55712,7 @@ var ts;
|
|
|
55708
55712
|
if (t.flags & 1048576 /* Union */) {
|
|
55709
55713
|
var origin = t.origin;
|
|
55710
55714
|
if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {
|
|
55711
|
-
|
|
55715
|
+
ts.pushIfUnique(namedUnions, t);
|
|
55712
55716
|
}
|
|
55713
55717
|
else if (origin && origin.flags & 1048576 /* Union */) {
|
|
55714
55718
|
addNamedUnions(namedUnions, origin.types);
|
|
@@ -77343,6 +77347,7 @@ var ts;
|
|
|
77343
77347
|
return true;
|
|
77344
77348
|
}
|
|
77345
77349
|
function checkAliasSymbol(node) {
|
|
77350
|
+
var _a;
|
|
77346
77351
|
var symbol = getSymbolOfNode(node);
|
|
77347
77352
|
var target = resolveAlias(symbol);
|
|
77348
77353
|
if (target !== unknownSymbol) {
|
|
@@ -77370,7 +77375,7 @@ var ts;
|
|
|
77370
77375
|
&& !(node.flags & 8388608 /* Ambient */)) {
|
|
77371
77376
|
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
|
77372
77377
|
}
|
|
77373
|
-
if (ts.isImportSpecifier(node) &&
|
|
77378
|
+
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
|
|
77374
77379
|
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
|
|
77375
77380
|
}
|
|
77376
77381
|
}
|
|
@@ -111475,10 +111480,11 @@ var ts;
|
|
|
111475
111480
|
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
|
|
111476
111481
|
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
|
|
111477
111482
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
111483
|
+
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
111478
111484
|
if (!preferSymlinks) {
|
|
111479
111485
|
// Symlinks inside ignored paths are already filtered out of the symlink cache,
|
|
111480
111486
|
// so we only need to remove them from the realpath filenames.
|
|
111481
|
-
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
|
|
111487
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
111482
111488
|
if (result_15)
|
|
111483
111489
|
return result_15;
|
|
111484
111490
|
}
|
|
@@ -111504,13 +111510,14 @@ var ts;
|
|
|
111504
111510
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
111505
111511
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
111506
111512
|
var result_16 = cb(option, target === referenceRedirect);
|
|
111513
|
+
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
|
|
111507
111514
|
if (result_16)
|
|
111508
111515
|
return result_16;
|
|
111509
111516
|
}
|
|
111510
111517
|
});
|
|
111511
111518
|
});
|
|
111512
111519
|
return result || (preferSymlinks
|
|
111513
|
-
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111520
|
+
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
|
|
111514
111521
|
: undefined);
|
|
111515
111522
|
}
|
|
111516
111523
|
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
|
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.2.
|
|
5
|
+
"version": "4.2.3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|