Skip to content

Commit

Permalink
Bump version to 4.2.3 and LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Mar 3, 2021
1 parent 47b2632 commit 34f0e32
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 78 deletions.
63 changes: 63 additions & 0 deletions lib/protocol.d.ts
Expand Up @@ -603,6 +603,41 @@ declare namespace ts.server.protocol {
*/
body?: string[];
}
/**
* A request to get encoded semantic classifications for a span in the file
*/
interface EncodedSemanticClassificationsRequest extends FileRequest {
arguments: EncodedSemanticClassificationsRequestArgs;
}
/**
* Arguments for EncodedSemanticClassificationsRequest request.
*/
interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
/**
* Start position of the span.
*/
start: number;
/**
* Length of the span.
*/
length: number;
/**
* Optional parameter for the semantic highlighting response, if absent it
* defaults to "original".
*/
format?: "original" | "2020";
}
/** The response for a EncodedSemanticClassificationsRequest */
interface EncodedSemanticClassificationsResponse extends Response {
body?: EncodedSemanticClassificationsResponseBody;
}
/**
* Implementation response message. Gives series of text spans depending on the format ar.
*/
interface EncodedSemanticClassificationsResponseBody {
endOfLineState: EndOfLineState;
spans: number[];
}
/**
* Arguments in document highlight request; include: filesToSearch, file,
* line, offset.
Expand Down Expand Up @@ -2626,6 +2661,33 @@ declare namespace ts.server.protocol {
ES2020 = "ES2020",
ESNext = "ESNext"
}
const enum ClassificationType {
comment = 1,
identifier = 2,
keyword = 3,
numericLiteral = 4,
operator = 5,
stringLiteral = 6,
regularExpressionLiteral = 7,
whiteSpace = 8,
text = 9,
punctuation = 10,
className = 11,
enumName = 12,
interfaceName = 13,
moduleName = 14,
typeParameterName = 15,
typeAliasName = 16,
parameterName = 17,
docCommentTagName = 18,
jsxOpenTagName = 19,
jsxCloseTagName = 20,
jsxSelfClosingTagName = 21,
jsxAttribute = 22,
jsxText = 23,
jsxAttributeStringLiteralValue = 24,
bigintLiteral = 25
}
}
declare namespace ts.server.protocol {

Expand Down Expand Up @@ -2786,6 +2848,7 @@ declare namespace ts.server.protocol {
}
declare namespace ts {
// these types are empty stubs for types from services and should not be used directly
export type EndOfLineState = never;
export type ScriptKind = never;
export type WatchFileKind = never;
export type WatchDirectoryKind = never;
Expand Down
30 changes: 18 additions & 12 deletions lib/tsc.js
Expand Up @@ -65,7 +65,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
var ts;
(function (ts) {
ts.versionMajorMinor = "4.2";
ts.version = "4.2.2";
ts.version = "4.2.3";
var NativeCollections;
(function (NativeCollections) {
function tryGetNativeMap() {
Expand Down Expand Up @@ -38531,13 +38531,16 @@ var ts;
return result || ts.emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
type.members = members;
type.properties = members === emptySymbols ? ts.emptyArray : getNamedMembers(members);
type.callSignatures = callSignatures;
type.constructSignatures = constructSignatures;
type.stringIndexInfo = stringIndexInfo;
type.numberIndexInfo = numberIndexInfo;
return type;
var resolved = type;
resolved.members = members;
resolved.properties = ts.emptyArray;
resolved.callSignatures = callSignatures;
resolved.constructSignatures = constructSignatures;
resolved.stringIndexInfo = stringIndexInfo;
resolved.numberIndexInfo = numberIndexInfo;
if (members !== emptySymbols)
resolved.properties = getNamedMembers(members);
return resolved;
}
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
return setStructuredTypeMembers(createObjectType(16, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
Expand Down Expand Up @@ -46092,7 +46095,7 @@ var ts;
if (t.flags & 1048576) {
var origin = t.origin;
if (t.aliasSymbol || origin && !(origin.flags & 1048576)) {
namedUnions.push(t);
ts.pushIfUnique(namedUnions, t);
}
else if (origin && origin.flags & 1048576) {
addNamedUnions(namedUnions, origin.types);
Expand Down Expand Up @@ -64692,6 +64695,7 @@ var ts;
return true;
}
function checkAliasSymbol(node) {
var _a;
var symbol = getSymbolOfNode(node);
var target = resolveAlias(symbol);
if (target !== unknownSymbol) {
Expand All @@ -64712,7 +64716,7 @@ var ts;
&& !(node.flags & 8388608)) {
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
}
if (ts.isImportSpecifier(node) && ts.every(target.declarations, function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728); })) {
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728); }))) {
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
}
}
Expand Down Expand Up @@ -91669,8 +91673,9 @@ var ts;
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
if (!preferSymlinks) {
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
if (result_15)
return result_15;
}
Expand All @@ -91695,13 +91700,14 @@ var ts;
var symlinkDirectory = symlinkDirectories_1[_i];
var option = ts.resolvePath(symlinkDirectory, relative);
var result_16 = cb(option, target === referenceRedirect);
shouldFilterIgnoredPaths = true;
if (result_16)
return result_16;
}
});
});
return result || (preferSymlinks
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
: undefined);
}
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
Expand Down
61 changes: 48 additions & 13 deletions lib/tsserver.js
Expand Up @@ -96,7 +96,7 @@ var ts;
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
ts.version = "4.2.2";
ts.version = "4.2.3";
/* @internal */
var Comparison;
(function (Comparison) {
Expand Down Expand Up @@ -47044,13 +47044,17 @@ var ts;
return result || ts.emptyArray;
}
function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
type.members = members;
type.properties = members === emptySymbols ? ts.emptyArray : getNamedMembers(members);
type.callSignatures = callSignatures;
type.constructSignatures = constructSignatures;
type.stringIndexInfo = stringIndexInfo;
type.numberIndexInfo = numberIndexInfo;
return type;
var resolved = type;
resolved.members = members;
resolved.properties = ts.emptyArray;
resolved.callSignatures = callSignatures;
resolved.constructSignatures = constructSignatures;
resolved.stringIndexInfo = stringIndexInfo;
resolved.numberIndexInfo = numberIndexInfo;
// This can loop back to getPropertyOfType() which would crash if `callSignatures` & `constructSignatures` are not initialized.
if (members !== emptySymbols)
resolved.properties = getNamedMembers(members);
return resolved;
}
function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
Expand Down Expand Up @@ -55719,7 +55723,7 @@ var ts;
if (t.flags & 1048576 /* Union */) {
var origin = t.origin;
if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {
namedUnions.push(t);
ts.pushIfUnique(namedUnions, t);
}
else if (origin && origin.flags & 1048576 /* Union */) {
addNamedUnions(namedUnions, origin.types);
Expand Down Expand Up @@ -77354,6 +77358,7 @@ var ts;
return true;
}
function checkAliasSymbol(node) {
var _a;
var symbol = getSymbolOfNode(node);
var target = resolveAlias(symbol);
if (target !== unknownSymbol) {
Expand Down Expand Up @@ -77381,7 +77386,7 @@ var ts;
&& !(node.flags & 8388608 /* Ambient */)) {
error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
}
if (ts.isImportSpecifier(node) && ts.every(target.declarations, function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); })) {
if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
}
}
Expand Down Expand Up @@ -111486,10 +111491,11 @@ var ts;
var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
if (!preferSymlinks) {
// Symlinks inside ignored paths are already filtered out of the symlink cache,
// so we only need to remove them from the realpath filenames.
var result_15 = ts.forEach(targets, function (p) { return !ts.containsIgnoredPath(p) && cb(p, referenceRedirect === p); });
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
if (result_15)
return result_15;
}
Expand All @@ -111515,13 +111521,14 @@ var ts;
var symlinkDirectory = symlinkDirectories_1[_i];
var option = ts.resolvePath(symlinkDirectory, relative);
var result_16 = cb(option, target === referenceRedirect);
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
if (result_16)
return result_16;
}
});
});
return result || (preferSymlinks
? ts.forEach(targets, function (p) { return ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
: undefined);
}
moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
Expand Down Expand Up @@ -139596,7 +139603,7 @@ var ts;
}
function addFunctionDeclaration(changes, context, info) {
var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, info.token, info.modifierFlags, info.parentDeclaration);
var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(251 /* FunctionDeclaration */, context, importAdder, info.call, ts.idText(info.token), info.modifierFlags, info.parentDeclaration);
changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
}
})(codefix = ts.codefix || (ts.codefix = {}));
Expand Down Expand Up @@ -152538,6 +152545,34 @@ var ts;
ScriptTarget["ES2020"] = "ES2020";
ScriptTarget["ESNext"] = "ESNext";
})(ScriptTarget = protocol.ScriptTarget || (protocol.ScriptTarget = {}));
var ClassificationType;
(function (ClassificationType) {
ClassificationType[ClassificationType["comment"] = 1] = "comment";
ClassificationType[ClassificationType["identifier"] = 2] = "identifier";
ClassificationType[ClassificationType["keyword"] = 3] = "keyword";
ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral";
ClassificationType[ClassificationType["operator"] = 5] = "operator";
ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral";
ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace";
ClassificationType[ClassificationType["text"] = 9] = "text";
ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation";
ClassificationType[ClassificationType["className"] = 11] = "className";
ClassificationType[ClassificationType["enumName"] = 12] = "enumName";
ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName";
ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName";
ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName";
ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName";
ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName";
ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName";
ClassificationType[ClassificationType["jsxOpenTagName"] = 19] = "jsxOpenTagName";
ClassificationType[ClassificationType["jsxCloseTagName"] = 20] = "jsxCloseTagName";
ClassificationType[ClassificationType["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
ClassificationType[ClassificationType["jsxAttribute"] = 22] = "jsxAttribute";
ClassificationType[ClassificationType["jsxText"] = 23] = "jsxText";
ClassificationType[ClassificationType["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
ClassificationType[ClassificationType["bigintLiteral"] = 25] = "bigintLiteral";
})(ClassificationType = protocol.ClassificationType || (protocol.ClassificationType = {}));
})(protocol = server.protocol || (server.protocol = {}));
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
Expand Down
62 changes: 62 additions & 0 deletions lib/tsserverlibrary.d.ts
Expand Up @@ -7136,6 +7136,41 @@ declare namespace ts.server.protocol {
*/
body?: string[];
}
/**
* A request to get encoded semantic classifications for a span in the file
*/
interface EncodedSemanticClassificationsRequest extends FileRequest {
arguments: EncodedSemanticClassificationsRequestArgs;
}
/**
* Arguments for EncodedSemanticClassificationsRequest request.
*/
interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
/**
* Start position of the span.
*/
start: number;
/**
* Length of the span.
*/
length: number;
/**
* Optional parameter for the semantic highlighting response, if absent it
* defaults to "original".
*/
format?: "original" | "2020";
}
/** The response for a EncodedSemanticClassificationsRequest */
interface EncodedSemanticClassificationsResponse extends Response {
body?: EncodedSemanticClassificationsResponseBody;
}
/**
* Implementation response message. Gives series of text spans depending on the format ar.
*/
interface EncodedSemanticClassificationsResponseBody {
endOfLineState: EndOfLineState;
spans: number[];
}
/**
* Arguments in document highlight request; include: filesToSearch, file,
* line, offset.
Expand Down Expand Up @@ -9159,6 +9194,33 @@ declare namespace ts.server.protocol {
ES2020 = "ES2020",
ESNext = "ESNext"
}
enum ClassificationType {
comment = 1,
identifier = 2,
keyword = 3,
numericLiteral = 4,
operator = 5,
stringLiteral = 6,
regularExpressionLiteral = 7,
whiteSpace = 8,
text = 9,
punctuation = 10,
className = 11,
enumName = 12,
interfaceName = 13,
moduleName = 14,
typeParameterName = 15,
typeAliasName = 16,
parameterName = 17,
docCommentTagName = 18,
jsxOpenTagName = 19,
jsxCloseTagName = 20,
jsxSelfClosingTagName = 21,
jsxAttribute = 22,
jsxText = 23,
jsxAttributeStringLiteralValue = 24,
bigintLiteral = 25
}
}
declare namespace ts.server {
interface ScriptInfoVersion {
Expand Down

0 comments on commit 34f0e32

Please sign in to comment.