@@ -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.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
- type.members = members;
47048
- type.properties = members === emptySymbols ? ts.emptyArray : getNamedMembers(members);
47049
- type.callSignatures = callSignatures;
47050
- type.constructSignatures = constructSignatures;
47051
- type.stringIndexInfo = stringIndexInfo;
47052
- type.numberIndexInfo = numberIndexInfo;
47053
- return type;
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
- namedUnions.push( t);
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) && ts.every( target.declarations, function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); })) {
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 = {}));
0 commit comments