Update TypeScript to version 4.3.5
[email protected]
Bug: none
Change-Id: Ide44ae2b82cebf96d255f7252b3a4c3882711fad
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3060706
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Simon Zünd <[email protected]>
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 5b180ab..f47c000 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -7570,9 +7570,9 @@
}
},
"node_modules/typescript": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz",
- "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==",
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+ "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js
index 83f5475..78c5ec2 100644
--- a/node_modules/typescript/lib/tsc.js
+++ b/node_modules/typescript/lib/tsc.js
@@ -65,7 +65,7 @@
var ts;
(function (ts) {
ts.versionMajorMinor = "4.3";
- ts.version = "4.3.2";
+ ts.version = "4.3.5";
var NativeCollections;
(function (NativeCollections) {
function tryGetNativeMap() {
@@ -13497,56 +13497,43 @@
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
- },
- writeLiteral: function (s) {
+ }, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
- },
- writeStringLiteral: function (s) {
+ }, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
- },
- writeSymbol: function (s, sym) {
+ }, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
- },
- writePunctuation: function (s) {
+ }, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
- },
- writeKeyword: function (s) {
+ }, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
- },
- writeOperator: function (s) {
+ }, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
- },
- writeParameter: function (s) {
+ }, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
- },
- writeSpace: function (s) {
+ }, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
- },
- writeProperty: function (s) {
+ }, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
- },
- writeComment: function (s) {
+ }, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
- },
- writeLine: function () {
+ }, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
- },
- increaseIndent: function () {
+ }, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
- },
- decreaseIndent: function () {
+ }, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -23614,8 +23601,8 @@
visitNode(cbNode, node.typeExpression) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
: visitNode(cbNode, node.typeExpression) ||
- visitNode(cbNode, node.name)) ||
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+ visitNode(cbNode, node.name) ||
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
case 320:
return visitNode(cbNode, node.tagName) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -32857,9 +32844,7 @@
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
- return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
- clear: clear,
- update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+ return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -49122,8 +49107,7 @@
return type;
}
function maybeTypeParameterReference(node) {
- return !(node.kind === 158 ||
- node.parent.kind === 174 && node.parent.typeArguments && node === node.parent.typeName ||
+ return !(node.parent.kind === 174 && node.parent.typeArguments && node === node.parent.typeName ||
node.parent.kind === 196 && node.parent.typeArguments && node === node.parent.qualifier);
}
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -49148,7 +49132,10 @@
return true;
case 166:
case 165:
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
+ return !node.type && !!node.body ||
+ ts.some(node.typeParameters, containsReference) ||
+ ts.some(node.parameters, containsReference) ||
+ !!node.type && containsReference(node.type);
}
return !!ts.forEachChild(node, containsReference);
}
@@ -53779,12 +53766,13 @@
applyToReturnTypes(source, target, inferFromTypes);
}
function inferFromIndexTypes(source, target) {
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32) ? 8 : 0;
var targetStringIndexType = getIndexTypeOfType(target, 0);
if (targetStringIndexType) {
var sourceIndexType = getIndexTypeOfType(source, 0) ||
getImplicitIndexTypeOfType(source, 0);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetStringIndexType);
+ inferWithPriority(sourceIndexType, targetStringIndexType, priority);
}
}
var targetNumberIndexType = getIndexTypeOfType(target, 1);
@@ -53793,7 +53781,7 @@
getIndexTypeOfType(source, 0) ||
getImplicitIndexTypeOfType(source, 1);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetNumberIndexType);
+ inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
}
}
}
@@ -72176,6 +72164,7 @@
case 120:
case 121:
case 125:
+ case 156:
case 84:
case 133:
case 142:
@@ -87991,11 +87980,14 @@
if (nextNode.kind === 11) {
return 0;
}
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
- }
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
+ }
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ }
+ return format & 65536 ? 1 : 0;
}
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
return 1;
@@ -88541,10 +88533,11 @@
}
exitComment();
}
+ function originalNodesHaveSameParent(nodeA, nodeB) {
+ nodeA = ts.getOriginalNode(nodeA);
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+ }
function siblingNodePositionsAreComparable(previousNode, nextNode) {
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
- return false;
- }
if (nextNode.pos < previousNode.end) {
return false;
}
@@ -93180,8 +93173,11 @@
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
var name = _a[_i];
- var optionInfo = optionsNameMap.get(name.toLowerCase());
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
+ var optionKey = name.toLowerCase();
+ var optionInfo = optionsNameMap.get(optionKey);
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+ optionKey === "strict" ||
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
}
}
@@ -96296,7 +96292,7 @@
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -96378,13 +96374,14 @@
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
+ var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
program.backupState();
var declDiagnostics;
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
var outputFiles = [];
- var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers).emitResult;
+ var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
if (declDiagnostics) {
program.restoreState();
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
@@ -96461,6 +96458,7 @@
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
+ var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -96475,7 +96473,7 @@
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
- }, customTransformers);
+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
diff --git a/node_modules/typescript/lib/tsserver.js b/node_modules/typescript/lib/tsserver.js
index 5802894..f9cc0bc 100644
--- a/node_modules/typescript/lib/tsserver.js
+++ b/node_modules/typescript/lib/tsserver.js
@@ -96,7 +96,7 @@
// 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.3.2";
+ ts.version = "4.3.5";
/* @internal */
var Comparison;
(function (Comparison) {
@@ -17321,56 +17321,43 @@
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
- },
- writeLiteral: function (s) {
+ }, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
- },
- writeStringLiteral: function (s) {
+ }, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
- },
- writeSymbol: function (s, sym) {
+ }, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
- },
- writePunctuation: function (s) {
+ }, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
- },
- writeKeyword: function (s) {
+ }, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
- },
- writeOperator: function (s) {
+ }, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
- },
- writeParameter: function (s) {
+ }, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
- },
- writeSpace: function (s) {
+ }, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
- },
- writeProperty: function (s) {
+ }, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
- },
- writeComment: function (s) {
+ }, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
- },
- writeLine: function () {
+ }, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
- },
- increaseIndent: function () {
+ }, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
- },
- decreaseIndent: function () {
+ }, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -29268,8 +29255,8 @@
visitNode(cbNode, node.typeExpression) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
: visitNode(cbNode, node.typeExpression) ||
- visitNode(cbNode, node.name)) ||
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+ visitNode(cbNode, node.name) ||
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
case 320 /* JSDocAuthorTag */:
return visitNode(cbNode, node.tagName) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37382,6 +37369,8 @@
{
name: "strict",
type: "boolean",
+ // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
+ // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
showInSimplifiedHelpView: true,
category: ts.Diagnostics.Strict_Type_Checking_Options,
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -40303,9 +40292,7 @@
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
- return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
- clear: clear,
- update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+ return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -59168,8 +59155,7 @@
return type;
}
function maybeTypeParameterReference(node) {
- return !(node.kind === 158 /* QualifiedName */ ||
- node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
+ return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
}
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59197,7 +59183,10 @@
return true;
case 166 /* MethodDeclaration */:
case 165 /* MethodSignature */:
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
+ return !node.type && !!node.body ||
+ ts.some(node.typeParameters, containsReference) ||
+ ts.some(node.parameters, containsReference) ||
+ !!node.type && containsReference(node.type);
}
return !!ts.forEachChild(node, containsReference);
}
@@ -64580,12 +64569,14 @@
applyToReturnTypes(source, target, inferFromTypes);
}
function inferFromIndexTypes(source, target) {
+ // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
if (targetStringIndexType) {
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 0 /* String */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetStringIndexType);
+ inferWithPriority(sourceIndexType, targetStringIndexType, priority);
}
}
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64594,7 +64585,7 @@
getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 1 /* Number */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetNumberIndexType);
+ inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
}
}
}
@@ -85910,6 +85901,7 @@
case 120 /* PrivateKeyword */:
case 121 /* ProtectedKeyword */:
case 125 /* AbstractKeyword */:
+ case 156 /* OverrideKeyword */:
case 84 /* ConstKeyword */:
case 133 /* DeclareKeyword */:
case 142 /* ReadonlyKeyword */:
@@ -107102,11 +107094,21 @@
// JsxText will be written with its leading whitespace, so don't add more manually.
return 0;
}
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
- }
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
+ }
+ // If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
+ // previous and next node. Instead we naively check whether nodes are on separate lines within the
+ // same node parent. If so, we intend to preserve a single line terminator. This is less precise and
+ // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
+ // effective source lines between two sibling nodes.
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ }
+ // If the two nodes are not comparable, add a line terminator based on the format that can indicate
+ // whether new lines are preferred or not.
+ return format & 65536 /* PreferNewLine */ ? 1 : 0;
}
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
return 1;
@@ -107746,10 +107748,13 @@
}
exitComment();
}
+ function originalNodesHaveSameParent(nodeA, nodeB) {
+ nodeA = ts.getOriginalNode(nodeA);
+ // For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
+ // have a parent node.
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+ }
function siblingNodePositionsAreComparable(previousNode, nextNode) {
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
- return false;
- }
if (nextNode.pos < previousNode.end) {
return false;
}
@@ -113122,8 +113127,14 @@
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
var name = _a[_i];
- var optionInfo = optionsNameMap.get(name.toLowerCase());
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
+ var optionKey = name.toLowerCase();
+ var optionInfo = optionsNameMap.get(optionKey);
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+ // We need to store `strict`, even though it won't be examined directly, so that the
+ // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
+ optionKey === "strict" ||
+ // We need to store these to determine whether `lib` files need to be rechecked.
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
}
}
@@ -116632,7 +116643,7 @@
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -116717,6 +116728,7 @@
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
+ var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
@@ -116727,7 +116739,7 @@
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
/*write*/ undefined,
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken,
- /*emitOnlyDts*/ false, customTransformers).emitResult;
+ /*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
// Don't emit .d.ts if there are decl file errors
if (declDiagnostics) {
program.restoreState();
@@ -116809,6 +116821,7 @@
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
+ var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -116824,7 +116837,7 @@
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
- }, customTransformers);
+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
@@ -120717,9 +120730,7 @@
[8 /* OptionalDependencies */, info.optionalDependencies],
[4 /* PeerDependencies */, info.peerDependencies],
];
- return __assign(__assign({}, info), { parseable: !!content, fileName: fileName,
- get: get,
- has: function (dependencyName, inGroups) {
+ return __assign(__assign({}, info), { parseable: !!content, fileName: fileName, get: get, has: function (dependencyName, inGroups) {
return !!get(dependencyName, inGroups);
} });
function get(dependencyName, inGroups) {
@@ -123986,10 +123997,9 @@
getTypeScriptMemberSymbols();
}
else if (isRightOfOpenTag) {
- var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
- ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined");
+ symbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
+ ts.Debug.assertEachIsDefined(symbols, "getJsxIntrinsicTagNames() should all be defined");
tryGetGlobalSymbols();
- symbols = tagSymbols.concat(symbols);
completionKind = 1 /* Global */;
keywordFilters = 0 /* None */;
}
@@ -124254,7 +124264,7 @@
if (!attrsType)
return 0 /* Continue */;
var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */);
- symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties);
+ symbols = ts.concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));
setSortTextToOptionalMember();
completionKind = 3 /* MemberLike */;
isNewIdentifierLocation = false;
@@ -124305,7 +124315,7 @@
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
isInSnippetScope = isSnippetScope(scopeNode);
var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = ts.concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined");
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
@@ -124605,7 +124615,7 @@
var existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);
var existingMemberEscapedNames = new ts.Set();
existingMembers.forEach(function (s) { return existingMemberEscapedNames.add(s.escapedName); });
- symbols = ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); });
+ symbols = ts.concatenate(symbols, ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); }));
completionKind = 0 /* ObjectPropertyDeclaration */;
isNewIdentifierLocation = true;
return 1 /* Success */;
@@ -124687,7 +124697,7 @@
}
if (typeMembers && typeMembers.length > 0) {
// Add filtered items to the completion list
- symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers));
+ symbols = ts.concatenate(symbols, filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)));
}
setSortTextToOptionalMember();
return 1 /* Success */;
@@ -124722,7 +124732,7 @@
isNewIdentifierLocation = false;
var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
var existing = new ts.Set(namedImportsOrExports.elements.filter(function (n) { return !isCurrentlyEditingNode(n); }).map(function (n) { return (n.propertyName || n.name).escapedText; }));
- symbols = exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); });
+ symbols = ts.concatenate(symbols, exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); }));
return 1 /* Success */;
}
/**
@@ -124797,7 +124807,7 @@
(type === null || type === void 0 ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) :
type && typeChecker.getPropertiesOfType(type);
});
- symbols = filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags);
+ symbols = ts.concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
}
return 1 /* Success */;
}
@@ -127145,9 +127155,7 @@
var name_1 = displayParts_1.map(function (p) { return p.text; }).join("");
var declaration = symbol.declarations && ts.firstOrUndefined(symbol.declarations);
var node = declaration ? (ts.getNameOfDeclaration(declaration) || declaration) : originalNode;
- return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1,
- kind: kind_1,
- displayParts: displayParts_1, context: getContextNode(declaration) });
+ return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1, kind: kind_1, displayParts: displayParts_1, context: getContextNode(declaration) });
}
case 1 /* Label */: {
var node = def.node;
@@ -127182,10 +127190,7 @@
}
})();
var sourceFile = info.sourceFile, textSpan = info.textSpan, name = info.name, kind = info.kind, displayParts = info.displayParts, context = info.context;
- return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind,
- name: name,
- textSpan: textSpan,
- displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
+ return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind, name: name, textSpan: textSpan, displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
}
function getFileAndTextSpanFromNode(node) {
var sourceFile = node.getSourceFile();
@@ -165341,9 +165346,7 @@
var span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo);
var lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1);
var lineText = scriptInfo.getSnapshot().getText(lineSpan.start, ts.textSpanEnd(lineSpan)).replace(/\r|\n/g, "");
- return __assign(__assign({ file: fileName }, span), { lineText: lineText,
- isWriteAccess: isWriteAccess,
- isDefinition: isDefinition });
+ return __assign(__assign({ file: fileName }, span), { lineText: lineText, isWriteAccess: isWriteAccess, isDefinition: isDefinition });
}
function isCompletionEntryData(data) {
return data === undefined || data && typeof data === "object"
@@ -166275,10 +166278,8 @@
var WorkerSession = /** @class */ (function (_super) {
__extends(WorkerSession, _super);
function WorkerSession(host, webHost, options, logger, cancellationToken, hrtime) {
- var _this = _super.call(this, __assign(__assign({ host: host,
- cancellationToken: cancellationToken }, options), { typingsInstaller: server.nullTypingsInstaller, byteLength: ts.notImplemented, // Formats the message text in send of Session which is overriden in this class so not needed
- hrtime: hrtime,
- logger: logger, canUseEvents: false })) || this;
+ var _this = _super.call(this, __assign(__assign({ host: host, cancellationToken: cancellationToken }, options), { typingsInstaller: server.nullTypingsInstaller, byteLength: ts.notImplemented, // Formats the message text in send of Session which is overriden in this class so not needed
+ hrtime: hrtime, logger: logger, canUseEvents: false })) || this;
_this.webHost = webHost;
return _this;
}
@@ -167779,8 +167780,7 @@
var typingsInstaller = disableAutomaticTypingAcquisition
? undefined
: new NodeTypingsInstaller(telemetryEnabled, logger, host, getGlobalTypingsCacheLocation(), typingSafeListLocation, typesMapLocation, npmLocation, validateDefaultNpmLocation, event);
- _this = _super.call(this, __assign(__assign({ host: host,
- cancellationToken: cancellationToken }, options), { typingsInstaller: typingsInstaller || server.nullTypingsInstaller, byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: logger, canUseEvents: true, typesMapLocation: typesMapLocation })) || this;
+ _this = _super.call(this, __assign(__assign({ host: host, cancellationToken: cancellationToken }, options), { typingsInstaller: typingsInstaller || server.nullTypingsInstaller, byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: logger, canUseEvents: true, typesMapLocation: typesMapLocation })) || this;
_this.eventPort = eventPort;
if (_this.canUseEvents && _this.eventPort) {
var s_1 = net.connect({ port: _this.eventPort }, function () {
diff --git a/node_modules/typescript/lib/tsserverlibrary.d.ts b/node_modules/typescript/lib/tsserverlibrary.d.ts
index 6195d66..d6750c4 100644
--- a/node_modules/typescript/lib/tsserverlibrary.d.ts
+++ b/node_modules/typescript/lib/tsserverlibrary.d.ts
@@ -5205,6 +5205,7 @@
* writeFileCallback
*/
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
+ getCustomTransformers?: (project: string) => CustomTransformers | undefined;
getModifiedTime(fileName: string): Date | undefined;
setModifiedTime(fileName: string, date: Date): void;
deleteFile(fileName: string): void;
diff --git a/node_modules/typescript/lib/tsserverlibrary.js b/node_modules/typescript/lib/tsserverlibrary.js
index ee78ce9..8893292 100644
--- a/node_modules/typescript/lib/tsserverlibrary.js
+++ b/node_modules/typescript/lib/tsserverlibrary.js
@@ -290,7 +290,7 @@
// 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.3.2";
+ ts.version = "4.3.5";
/* @internal */
var Comparison;
(function (Comparison) {
@@ -17515,56 +17515,43 @@
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
- },
- writeLiteral: function (s) {
+ }, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
- },
- writeStringLiteral: function (s) {
+ }, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
- },
- writeSymbol: function (s, sym) {
+ }, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
- },
- writePunctuation: function (s) {
+ }, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
- },
- writeKeyword: function (s) {
+ }, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
- },
- writeOperator: function (s) {
+ }, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
- },
- writeParameter: function (s) {
+ }, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
- },
- writeSpace: function (s) {
+ }, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
- },
- writeProperty: function (s) {
+ }, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
- },
- writeComment: function (s) {
+ }, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
- },
- writeLine: function () {
+ }, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
- },
- increaseIndent: function () {
+ }, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
- },
- decreaseIndent: function () {
+ }, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -29462,8 +29449,8 @@
visitNode(cbNode, node.typeExpression) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
: visitNode(cbNode, node.typeExpression) ||
- visitNode(cbNode, node.name)) ||
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+ visitNode(cbNode, node.name) ||
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
case 320 /* JSDocAuthorTag */:
return visitNode(cbNode, node.tagName) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37576,6 +37563,8 @@
{
name: "strict",
type: "boolean",
+ // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
+ // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
showInSimplifiedHelpView: true,
category: ts.Diagnostics.Strict_Type_Checking_Options,
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -40497,9 +40486,7 @@
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
- return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
- clear: clear,
- update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+ return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -59362,8 +59349,7 @@
return type;
}
function maybeTypeParameterReference(node) {
- return !(node.kind === 158 /* QualifiedName */ ||
- node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
+ return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
}
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59391,7 +59377,10 @@
return true;
case 166 /* MethodDeclaration */:
case 165 /* MethodSignature */:
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
+ return !node.type && !!node.body ||
+ ts.some(node.typeParameters, containsReference) ||
+ ts.some(node.parameters, containsReference) ||
+ !!node.type && containsReference(node.type);
}
return !!ts.forEachChild(node, containsReference);
}
@@ -64774,12 +64763,14 @@
applyToReturnTypes(source, target, inferFromTypes);
}
function inferFromIndexTypes(source, target) {
+ // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
if (targetStringIndexType) {
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 0 /* String */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetStringIndexType);
+ inferWithPriority(sourceIndexType, targetStringIndexType, priority);
}
}
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64788,7 +64779,7 @@
getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 1 /* Number */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetNumberIndexType);
+ inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
}
}
}
@@ -86104,6 +86095,7 @@
case 120 /* PrivateKeyword */:
case 121 /* ProtectedKeyword */:
case 125 /* AbstractKeyword */:
+ case 156 /* OverrideKeyword */:
case 84 /* ConstKeyword */:
case 133 /* DeclareKeyword */:
case 142 /* ReadonlyKeyword */:
@@ -107296,11 +107288,21 @@
// JsxText will be written with its leading whitespace, so don't add more manually.
return 0;
}
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
- }
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
+ }
+ // If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
+ // previous and next node. Instead we naively check whether nodes are on separate lines within the
+ // same node parent. If so, we intend to preserve a single line terminator. This is less precise and
+ // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
+ // effective source lines between two sibling nodes.
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ }
+ // If the two nodes are not comparable, add a line terminator based on the format that can indicate
+ // whether new lines are preferred or not.
+ return format & 65536 /* PreferNewLine */ ? 1 : 0;
}
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
return 1;
@@ -107940,10 +107942,13 @@
}
exitComment();
}
+ function originalNodesHaveSameParent(nodeA, nodeB) {
+ nodeA = ts.getOriginalNode(nodeA);
+ // For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
+ // have a parent node.
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+ }
function siblingNodePositionsAreComparable(previousNode, nextNode) {
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
- return false;
- }
if (nextNode.pos < previousNode.end) {
return false;
}
@@ -113316,8 +113321,14 @@
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
var name = _a[_i];
- var optionInfo = optionsNameMap.get(name.toLowerCase());
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
+ var optionKey = name.toLowerCase();
+ var optionInfo = optionsNameMap.get(optionKey);
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+ // We need to store `strict`, even though it won't be examined directly, so that the
+ // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
+ optionKey === "strict" ||
+ // We need to store these to determine whether `lib` files need to be rechecked.
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
}
}
@@ -116826,7 +116837,7 @@
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -116911,6 +116922,7 @@
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
+ var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
@@ -116921,7 +116933,7 @@
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
/*write*/ undefined,
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken,
- /*emitOnlyDts*/ false, customTransformers).emitResult;
+ /*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
// Don't emit .d.ts if there are decl file errors
if (declDiagnostics) {
program.restoreState();
@@ -117003,6 +117015,7 @@
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
+ var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -117018,7 +117031,7 @@
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
- }, customTransformers);
+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
@@ -121286,9 +121299,7 @@
[8 /* OptionalDependencies */, info.optionalDependencies],
[4 /* PeerDependencies */, info.peerDependencies],
];
- return __assign(__assign({}, info), { parseable: !!content, fileName: fileName,
- get: get,
- has: function (dependencyName, inGroups) {
+ return __assign(__assign({}, info), { parseable: !!content, fileName: fileName, get: get, has: function (dependencyName, inGroups) {
return !!get(dependencyName, inGroups);
} });
function get(dependencyName, inGroups) {
@@ -124555,10 +124566,9 @@
getTypeScriptMemberSymbols();
}
else if (isRightOfOpenTag) {
- var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
- ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined");
+ symbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
+ ts.Debug.assertEachIsDefined(symbols, "getJsxIntrinsicTagNames() should all be defined");
tryGetGlobalSymbols();
- symbols = tagSymbols.concat(symbols);
completionKind = 1 /* Global */;
keywordFilters = 0 /* None */;
}
@@ -124823,7 +124833,7 @@
if (!attrsType)
return 0 /* Continue */;
var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */);
- symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties);
+ symbols = ts.concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));
setSortTextToOptionalMember();
completionKind = 3 /* MemberLike */;
isNewIdentifierLocation = false;
@@ -124874,7 +124884,7 @@
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
isInSnippetScope = isSnippetScope(scopeNode);
var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = ts.concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined");
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
@@ -125174,7 +125184,7 @@
var existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);
var existingMemberEscapedNames = new ts.Set();
existingMembers.forEach(function (s) { return existingMemberEscapedNames.add(s.escapedName); });
- symbols = ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); });
+ symbols = ts.concatenate(symbols, ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); }));
completionKind = 0 /* ObjectPropertyDeclaration */;
isNewIdentifierLocation = true;
return 1 /* Success */;
@@ -125256,7 +125266,7 @@
}
if (typeMembers && typeMembers.length > 0) {
// Add filtered items to the completion list
- symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers));
+ symbols = ts.concatenate(symbols, filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)));
}
setSortTextToOptionalMember();
return 1 /* Success */;
@@ -125291,7 +125301,7 @@
isNewIdentifierLocation = false;
var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
var existing = new ts.Set(namedImportsOrExports.elements.filter(function (n) { return !isCurrentlyEditingNode(n); }).map(function (n) { return (n.propertyName || n.name).escapedText; }));
- symbols = exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); });
+ symbols = ts.concatenate(symbols, exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); }));
return 1 /* Success */;
}
/**
@@ -125366,7 +125376,7 @@
(type === null || type === void 0 ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) :
type && typeChecker.getPropertiesOfType(type);
});
- symbols = filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags);
+ symbols = ts.concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
}
return 1 /* Success */;
}
@@ -127714,9 +127724,7 @@
var name_1 = displayParts_1.map(function (p) { return p.text; }).join("");
var declaration = symbol.declarations && ts.firstOrUndefined(symbol.declarations);
var node = declaration ? (ts.getNameOfDeclaration(declaration) || declaration) : originalNode;
- return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1,
- kind: kind_1,
- displayParts: displayParts_1, context: getContextNode(declaration) });
+ return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1, kind: kind_1, displayParts: displayParts_1, context: getContextNode(declaration) });
}
case 1 /* Label */: {
var node = def.node;
@@ -127751,10 +127759,7 @@
}
})();
var sourceFile = info.sourceFile, textSpan = info.textSpan, name = info.name, kind = info.kind, displayParts = info.displayParts, context = info.context;
- return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind,
- name: name,
- textSpan: textSpan,
- displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
+ return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind, name: name, textSpan: textSpan, displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
}
function getFileAndTextSpanFromNode(node) {
var sourceFile = node.getSourceFile();
@@ -165535,9 +165540,7 @@
var span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo);
var lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1);
var lineText = scriptInfo.getSnapshot().getText(lineSpan.start, ts.textSpanEnd(lineSpan)).replace(/\r|\n/g, "");
- return __assign(__assign({ file: fileName }, span), { lineText: lineText,
- isWriteAccess: isWriteAccess,
- isDefinition: isDefinition });
+ return __assign(__assign({ file: fileName }, span), { lineText: lineText, isWriteAccess: isWriteAccess, isDefinition: isDefinition });
}
function isCompletionEntryData(data) {
return data === undefined || data && typeof data === "object"
diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts
index b86a3a2..0cae150 100644
--- a/node_modules/typescript/lib/typescript.d.ts
+++ b/node_modules/typescript/lib/typescript.d.ts
@@ -5205,6 +5205,7 @@
* writeFileCallback
*/
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
+ getCustomTransformers?: (project: string) => CustomTransformers | undefined;
getModifiedTime(fileName: string): Date | undefined;
setModifiedTime(fileName: string, date: Date): void;
deleteFile(fileName: string): void;
diff --git a/node_modules/typescript/lib/typescript.js b/node_modules/typescript/lib/typescript.js
index 615ad27..85a70c4 100644
--- a/node_modules/typescript/lib/typescript.js
+++ b/node_modules/typescript/lib/typescript.js
@@ -290,7 +290,7 @@
// 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.3.2";
+ ts.version = "4.3.5";
/* @internal */
var Comparison;
(function (Comparison) {
@@ -17515,56 +17515,43 @@
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
- },
- writeLiteral: function (s) {
+ }, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
- },
- writeStringLiteral: function (s) {
+ }, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
- },
- writeSymbol: function (s, sym) {
+ }, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
- },
- writePunctuation: function (s) {
+ }, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
- },
- writeKeyword: function (s) {
+ }, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
- },
- writeOperator: function (s) {
+ }, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
- },
- writeParameter: function (s) {
+ }, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
- },
- writeSpace: function (s) {
+ }, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
- },
- writeProperty: function (s) {
+ }, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
- },
- writeComment: function (s) {
+ }, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
- },
- writeLine: function () {
+ }, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
- },
- increaseIndent: function () {
+ }, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
- },
- decreaseIndent: function () {
+ }, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -29462,8 +29449,8 @@
visitNode(cbNode, node.typeExpression) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
: visitNode(cbNode, node.typeExpression) ||
- visitNode(cbNode, node.name)) ||
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+ visitNode(cbNode, node.name) ||
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
case 320 /* JSDocAuthorTag */:
return visitNode(cbNode, node.tagName) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37576,6 +37563,8 @@
{
name: "strict",
type: "boolean",
+ // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
+ // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
showInSimplifiedHelpView: true,
category: ts.Diagnostics.Strict_Type_Checking_Options,
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -40497,9 +40486,7 @@
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
- return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
- clear: clear,
- update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+ return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -59362,8 +59349,7 @@
return type;
}
function maybeTypeParameterReference(node) {
- return !(node.kind === 158 /* QualifiedName */ ||
- node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
+ return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
}
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59391,7 +59377,10 @@
return true;
case 166 /* MethodDeclaration */:
case 165 /* MethodSignature */:
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
+ return !node.type && !!node.body ||
+ ts.some(node.typeParameters, containsReference) ||
+ ts.some(node.parameters, containsReference) ||
+ !!node.type && containsReference(node.type);
}
return !!ts.forEachChild(node, containsReference);
}
@@ -64774,12 +64763,14 @@
applyToReturnTypes(source, target, inferFromTypes);
}
function inferFromIndexTypes(source, target) {
+ // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
if (targetStringIndexType) {
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 0 /* String */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetStringIndexType);
+ inferWithPriority(sourceIndexType, targetStringIndexType, priority);
}
}
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64788,7 +64779,7 @@
getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 1 /* Number */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetNumberIndexType);
+ inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
}
}
}
@@ -86104,6 +86095,7 @@
case 120 /* PrivateKeyword */:
case 121 /* ProtectedKeyword */:
case 125 /* AbstractKeyword */:
+ case 156 /* OverrideKeyword */:
case 84 /* ConstKeyword */:
case 133 /* DeclareKeyword */:
case 142 /* ReadonlyKeyword */:
@@ -107296,11 +107288,21 @@
// JsxText will be written with its leading whitespace, so don't add more manually.
return 0;
}
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
- }
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
+ }
+ // If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
+ // previous and next node. Instead we naively check whether nodes are on separate lines within the
+ // same node parent. If so, we intend to preserve a single line terminator. This is less precise and
+ // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
+ // effective source lines between two sibling nodes.
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ }
+ // If the two nodes are not comparable, add a line terminator based on the format that can indicate
+ // whether new lines are preferred or not.
+ return format & 65536 /* PreferNewLine */ ? 1 : 0;
}
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
return 1;
@@ -107940,10 +107942,13 @@
}
exitComment();
}
+ function originalNodesHaveSameParent(nodeA, nodeB) {
+ nodeA = ts.getOriginalNode(nodeA);
+ // For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
+ // have a parent node.
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+ }
function siblingNodePositionsAreComparable(previousNode, nextNode) {
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
- return false;
- }
if (nextNode.pos < previousNode.end) {
return false;
}
@@ -113316,8 +113321,14 @@
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
var name = _a[_i];
- var optionInfo = optionsNameMap.get(name.toLowerCase());
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
+ var optionKey = name.toLowerCase();
+ var optionInfo = optionsNameMap.get(optionKey);
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+ // We need to store `strict`, even though it won't be examined directly, so that the
+ // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
+ optionKey === "strict" ||
+ // We need to store these to determine whether `lib` files need to be rechecked.
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
}
}
@@ -116826,7 +116837,7 @@
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -116911,6 +116922,7 @@
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
+ var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
@@ -116921,7 +116933,7 @@
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
/*write*/ undefined,
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken,
- /*emitOnlyDts*/ false, customTransformers).emitResult;
+ /*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
// Don't emit .d.ts if there are decl file errors
if (declDiagnostics) {
program.restoreState();
@@ -117003,6 +117015,7 @@
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
+ var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -117018,7 +117031,7 @@
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
- }, customTransformers);
+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
@@ -121286,9 +121299,7 @@
[8 /* OptionalDependencies */, info.optionalDependencies],
[4 /* PeerDependencies */, info.peerDependencies],
];
- return __assign(__assign({}, info), { parseable: !!content, fileName: fileName,
- get: get,
- has: function (dependencyName, inGroups) {
+ return __assign(__assign({}, info), { parseable: !!content, fileName: fileName, get: get, has: function (dependencyName, inGroups) {
return !!get(dependencyName, inGroups);
} });
function get(dependencyName, inGroups) {
@@ -124555,10 +124566,9 @@
getTypeScriptMemberSymbols();
}
else if (isRightOfOpenTag) {
- var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
- ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined");
+ symbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
+ ts.Debug.assertEachIsDefined(symbols, "getJsxIntrinsicTagNames() should all be defined");
tryGetGlobalSymbols();
- symbols = tagSymbols.concat(symbols);
completionKind = 1 /* Global */;
keywordFilters = 0 /* None */;
}
@@ -124823,7 +124833,7 @@
if (!attrsType)
return 0 /* Continue */;
var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */);
- symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties);
+ symbols = ts.concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));
setSortTextToOptionalMember();
completionKind = 3 /* MemberLike */;
isNewIdentifierLocation = false;
@@ -124874,7 +124884,7 @@
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
isInSnippetScope = isSnippetScope(scopeNode);
var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = ts.concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined");
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
@@ -125174,7 +125184,7 @@
var existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);
var existingMemberEscapedNames = new ts.Set();
existingMembers.forEach(function (s) { return existingMemberEscapedNames.add(s.escapedName); });
- symbols = ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); });
+ symbols = ts.concatenate(symbols, ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); }));
completionKind = 0 /* ObjectPropertyDeclaration */;
isNewIdentifierLocation = true;
return 1 /* Success */;
@@ -125256,7 +125266,7 @@
}
if (typeMembers && typeMembers.length > 0) {
// Add filtered items to the completion list
- symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers));
+ symbols = ts.concatenate(symbols, filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)));
}
setSortTextToOptionalMember();
return 1 /* Success */;
@@ -125291,7 +125301,7 @@
isNewIdentifierLocation = false;
var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
var existing = new ts.Set(namedImportsOrExports.elements.filter(function (n) { return !isCurrentlyEditingNode(n); }).map(function (n) { return (n.propertyName || n.name).escapedText; }));
- symbols = exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); });
+ symbols = ts.concatenate(symbols, exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); }));
return 1 /* Success */;
}
/**
@@ -125366,7 +125376,7 @@
(type === null || type === void 0 ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) :
type && typeChecker.getPropertiesOfType(type);
});
- symbols = filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags);
+ symbols = ts.concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
}
return 1 /* Success */;
}
@@ -127714,9 +127724,7 @@
var name_1 = displayParts_1.map(function (p) { return p.text; }).join("");
var declaration = symbol.declarations && ts.firstOrUndefined(symbol.declarations);
var node = declaration ? (ts.getNameOfDeclaration(declaration) || declaration) : originalNode;
- return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1,
- kind: kind_1,
- displayParts: displayParts_1, context: getContextNode(declaration) });
+ return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1, kind: kind_1, displayParts: displayParts_1, context: getContextNode(declaration) });
}
case 1 /* Label */: {
var node = def.node;
@@ -127751,10 +127759,7 @@
}
})();
var sourceFile = info.sourceFile, textSpan = info.textSpan, name = info.name, kind = info.kind, displayParts = info.displayParts, context = info.context;
- return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind,
- name: name,
- textSpan: textSpan,
- displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
+ return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind, name: name, textSpan: textSpan, displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
}
function getFileAndTextSpanFromNode(node) {
var sourceFile = node.getSourceFile();
diff --git a/node_modules/typescript/lib/typescriptServices.d.ts b/node_modules/typescript/lib/typescriptServices.d.ts
index 2d44d60..af98131 100644
--- a/node_modules/typescript/lib/typescriptServices.d.ts
+++ b/node_modules/typescript/lib/typescriptServices.d.ts
@@ -5205,6 +5205,7 @@
* writeFileCallback
*/
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
+ getCustomTransformers?: (project: string) => CustomTransformers | undefined;
getModifiedTime(fileName: string): Date | undefined;
setModifiedTime(fileName: string, date: Date): void;
deleteFile(fileName: string): void;
diff --git a/node_modules/typescript/lib/typescriptServices.js b/node_modules/typescript/lib/typescriptServices.js
index 59f7d01..668927c 100644
--- a/node_modules/typescript/lib/typescriptServices.js
+++ b/node_modules/typescript/lib/typescriptServices.js
@@ -290,7 +290,7 @@
// 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.3.2";
+ ts.version = "4.3.5";
/* @internal */
var Comparison;
(function (Comparison) {
@@ -17515,56 +17515,43 @@
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
- },
- writeLiteral: function (s) {
+ }, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
- },
- writeStringLiteral: function (s) {
+ }, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
- },
- writeSymbol: function (s, sym) {
+ }, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
- },
- writePunctuation: function (s) {
+ }, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
- },
- writeKeyword: function (s) {
+ }, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
- },
- writeOperator: function (s) {
+ }, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
- },
- writeParameter: function (s) {
+ }, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
- },
- writeSpace: function (s) {
+ }, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
- },
- writeProperty: function (s) {
+ }, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
- },
- writeComment: function (s) {
+ }, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
- },
- writeLine: function () {
+ }, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
- },
- increaseIndent: function () {
+ }, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
- },
- decreaseIndent: function () {
+ }, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -29462,8 +29449,8 @@
visitNode(cbNode, node.typeExpression) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
: visitNode(cbNode, node.typeExpression) ||
- visitNode(cbNode, node.name)) ||
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+ visitNode(cbNode, node.name) ||
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
case 320 /* JSDocAuthorTag */:
return visitNode(cbNode, node.tagName) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37576,6 +37563,8 @@
{
name: "strict",
type: "boolean",
+ // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
+ // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
showInSimplifiedHelpView: true,
category: ts.Diagnostics.Strict_Type_Checking_Options,
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -40497,9 +40486,7 @@
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
- return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
- clear: clear,
- update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+ return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -59362,8 +59349,7 @@
return type;
}
function maybeTypeParameterReference(node) {
- return !(node.kind === 158 /* QualifiedName */ ||
- node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
+ return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
}
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59391,7 +59377,10 @@
return true;
case 166 /* MethodDeclaration */:
case 165 /* MethodSignature */:
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
+ return !node.type && !!node.body ||
+ ts.some(node.typeParameters, containsReference) ||
+ ts.some(node.parameters, containsReference) ||
+ !!node.type && containsReference(node.type);
}
return !!ts.forEachChild(node, containsReference);
}
@@ -64774,12 +64763,14 @@
applyToReturnTypes(source, target, inferFromTypes);
}
function inferFromIndexTypes(source, target) {
+ // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
if (targetStringIndexType) {
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 0 /* String */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetStringIndexType);
+ inferWithPriority(sourceIndexType, targetStringIndexType, priority);
}
}
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64788,7 +64779,7 @@
getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 1 /* Number */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetNumberIndexType);
+ inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
}
}
}
@@ -86104,6 +86095,7 @@
case 120 /* PrivateKeyword */:
case 121 /* ProtectedKeyword */:
case 125 /* AbstractKeyword */:
+ case 156 /* OverrideKeyword */:
case 84 /* ConstKeyword */:
case 133 /* DeclareKeyword */:
case 142 /* ReadonlyKeyword */:
@@ -107296,11 +107288,21 @@
// JsxText will be written with its leading whitespace, so don't add more manually.
return 0;
}
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
- }
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
+ }
+ // If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
+ // previous and next node. Instead we naively check whether nodes are on separate lines within the
+ // same node parent. If so, we intend to preserve a single line terminator. This is less precise and
+ // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
+ // effective source lines between two sibling nodes.
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ }
+ // If the two nodes are not comparable, add a line terminator based on the format that can indicate
+ // whether new lines are preferred or not.
+ return format & 65536 /* PreferNewLine */ ? 1 : 0;
}
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
return 1;
@@ -107940,10 +107942,13 @@
}
exitComment();
}
+ function originalNodesHaveSameParent(nodeA, nodeB) {
+ nodeA = ts.getOriginalNode(nodeA);
+ // For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
+ // have a parent node.
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+ }
function siblingNodePositionsAreComparable(previousNode, nextNode) {
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
- return false;
- }
if (nextNode.pos < previousNode.end) {
return false;
}
@@ -113316,8 +113321,14 @@
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
var name = _a[_i];
- var optionInfo = optionsNameMap.get(name.toLowerCase());
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
+ var optionKey = name.toLowerCase();
+ var optionInfo = optionsNameMap.get(optionKey);
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+ // We need to store `strict`, even though it won't be examined directly, so that the
+ // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
+ optionKey === "strict" ||
+ // We need to store these to determine whether `lib` files need to be rechecked.
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
}
}
@@ -116826,7 +116837,7 @@
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -116911,6 +116922,7 @@
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
+ var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
@@ -116921,7 +116933,7 @@
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
/*write*/ undefined,
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken,
- /*emitOnlyDts*/ false, customTransformers).emitResult;
+ /*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
// Don't emit .d.ts if there are decl file errors
if (declDiagnostics) {
program.restoreState();
@@ -117003,6 +117015,7 @@
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
+ var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -117018,7 +117031,7 @@
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
- }, customTransformers);
+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
@@ -121286,9 +121299,7 @@
[8 /* OptionalDependencies */, info.optionalDependencies],
[4 /* PeerDependencies */, info.peerDependencies],
];
- return __assign(__assign({}, info), { parseable: !!content, fileName: fileName,
- get: get,
- has: function (dependencyName, inGroups) {
+ return __assign(__assign({}, info), { parseable: !!content, fileName: fileName, get: get, has: function (dependencyName, inGroups) {
return !!get(dependencyName, inGroups);
} });
function get(dependencyName, inGroups) {
@@ -124555,10 +124566,9 @@
getTypeScriptMemberSymbols();
}
else if (isRightOfOpenTag) {
- var tagSymbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
- ts.Debug.assertEachIsDefined(tagSymbols, "getJsxIntrinsicTagNames() should all be defined");
+ symbols = typeChecker.getJsxIntrinsicTagNamesAt(location);
+ ts.Debug.assertEachIsDefined(symbols, "getJsxIntrinsicTagNames() should all be defined");
tryGetGlobalSymbols();
- symbols = tagSymbols.concat(symbols);
completionKind = 1 /* Global */;
keywordFilters = 0 /* None */;
}
@@ -124823,7 +124833,7 @@
if (!attrsType)
return 0 /* Continue */;
var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */);
- symbols = filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties);
+ symbols = ts.concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));
setSortTextToOptionalMember();
completionKind = 3 /* MemberLike */;
isNewIdentifierLocation = false;
@@ -124874,7 +124884,7 @@
var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
isInSnippetScope = isSnippetScope(scopeNode);
var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = ts.concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
ts.Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined");
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
@@ -125174,7 +125184,7 @@
var existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);
var existingMemberEscapedNames = new ts.Set();
existingMembers.forEach(function (s) { return existingMemberEscapedNames.add(s.escapedName); });
- symbols = ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); });
+ symbols = ts.concatenate(symbols, ts.filter(members, function (s) { return !existingMemberEscapedNames.has(s.escapedName); }));
completionKind = 0 /* ObjectPropertyDeclaration */;
isNewIdentifierLocation = true;
return 1 /* Success */;
@@ -125256,7 +125266,7 @@
}
if (typeMembers && typeMembers.length > 0) {
// Add filtered items to the completion list
- symbols = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers));
+ symbols = ts.concatenate(symbols, filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)));
}
setSortTextToOptionalMember();
return 1 /* Success */;
@@ -125291,7 +125301,7 @@
isNewIdentifierLocation = false;
var exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
var existing = new ts.Set(namedImportsOrExports.elements.filter(function (n) { return !isCurrentlyEditingNode(n); }).map(function (n) { return (n.propertyName || n.name).escapedText; }));
- symbols = exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); });
+ symbols = ts.concatenate(symbols, exports.filter(function (e) { return e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName); }));
return 1 /* Success */;
}
/**
@@ -125366,7 +125376,7 @@
(type === null || type === void 0 ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) :
type && typeChecker.getPropertiesOfType(type);
});
- symbols = filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags);
+ symbols = ts.concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
}
return 1 /* Success */;
}
@@ -127714,9 +127724,7 @@
var name_1 = displayParts_1.map(function (p) { return p.text; }).join("");
var declaration = symbol.declarations && ts.firstOrUndefined(symbol.declarations);
var node = declaration ? (ts.getNameOfDeclaration(declaration) || declaration) : originalNode;
- return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1,
- kind: kind_1,
- displayParts: displayParts_1, context: getContextNode(declaration) });
+ return __assign(__assign({}, getFileAndTextSpanFromNode(node)), { name: name_1, kind: kind_1, displayParts: displayParts_1, context: getContextNode(declaration) });
}
case 1 /* Label */: {
var node = def.node;
@@ -127751,10 +127759,7 @@
}
})();
var sourceFile = info.sourceFile, textSpan = info.textSpan, name = info.name, kind = info.kind, displayParts = info.displayParts, context = info.context;
- return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind,
- name: name,
- textSpan: textSpan,
- displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
+ return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind, name: name, textSpan: textSpan, displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context));
}
function getFileAndTextSpanFromNode(node) {
var sourceFile = node.getSourceFile();
diff --git a/node_modules/typescript/lib/typingsInstaller.js b/node_modules/typescript/lib/typingsInstaller.js
index 6810860..14d9f58 100644
--- a/node_modules/typescript/lib/typingsInstaller.js
+++ b/node_modules/typescript/lib/typingsInstaller.js
@@ -85,7 +85,7 @@
// 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.3.2";
+ ts.version = "4.3.5";
/* @internal */
var Comparison;
(function (Comparison) {
@@ -17310,56 +17310,43 @@
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
- },
- writeLiteral: function (s) {
+ }, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
- },
- writeStringLiteral: function (s) {
+ }, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
- },
- writeSymbol: function (s, sym) {
+ }, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
- },
- writePunctuation: function (s) {
+ }, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
- },
- writeKeyword: function (s) {
+ }, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
- },
- writeOperator: function (s) {
+ }, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
- },
- writeParameter: function (s) {
+ }, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
- },
- writeSpace: function (s) {
+ }, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
- },
- writeProperty: function (s) {
+ }, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
- },
- writeComment: function (s) {
+ }, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
- },
- writeLine: function () {
+ }, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
- },
- increaseIndent: function () {
+ }, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
- },
- decreaseIndent: function () {
+ }, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -29257,8 +29244,8 @@
visitNode(cbNode, node.typeExpression) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
: visitNode(cbNode, node.typeExpression) ||
- visitNode(cbNode, node.name)) ||
- (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+ visitNode(cbNode, node.name) ||
+ (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
case 320 /* JSDocAuthorTag */:
return visitNode(cbNode, node.tagName) ||
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37371,6 +37358,8 @@
{
name: "strict",
type: "boolean",
+ // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
+ // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
showInSimplifiedHelpView: true,
category: ts.Diagnostics.Strict_Type_Checking_Options,
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -40292,9 +40281,7 @@
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
- return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
- clear: clear,
- update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+ return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -59157,8 +59144,7 @@
return type;
}
function maybeTypeParameterReference(node) {
- return !(node.kind === 158 /* QualifiedName */ ||
- node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
+ return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
}
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59186,7 +59172,10 @@
return true;
case 166 /* MethodDeclaration */:
case 165 /* MethodSignature */:
- return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
+ return !node.type && !!node.body ||
+ ts.some(node.typeParameters, containsReference) ||
+ ts.some(node.parameters, containsReference) ||
+ !!node.type && containsReference(node.type);
}
return !!ts.forEachChild(node, containsReference);
}
@@ -64569,12 +64558,14 @@
applyToReturnTypes(source, target, inferFromTypes);
}
function inferFromIndexTypes(source, target) {
+ // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
+ var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
if (targetStringIndexType) {
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 0 /* String */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetStringIndexType);
+ inferWithPriority(sourceIndexType, targetStringIndexType, priority);
}
}
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64583,7 +64574,7 @@
getIndexTypeOfType(source, 0 /* String */) ||
getImplicitIndexTypeOfType(source, 1 /* Number */);
if (sourceIndexType) {
- inferFromTypes(sourceIndexType, targetNumberIndexType);
+ inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
}
}
}
@@ -85899,6 +85890,7 @@
case 120 /* PrivateKeyword */:
case 121 /* ProtectedKeyword */:
case 125 /* AbstractKeyword */:
+ case 156 /* OverrideKeyword */:
case 84 /* ConstKeyword */:
case 133 /* DeclareKeyword */:
case 142 /* ReadonlyKeyword */:
@@ -107091,11 +107083,21 @@
// JsxText will be written with its leading whitespace, so don't add more manually.
return 0;
}
- else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
- return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
- }
- else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
- return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+ if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
+ return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
+ }
+ // If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
+ // previous and next node. Instead we naively check whether nodes are on separate lines within the
+ // same node parent. If so, we intend to preserve a single line terminator. This is less precise and
+ // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
+ // effective source lines between two sibling nodes.
+ else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+ return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+ }
+ // If the two nodes are not comparable, add a line terminator based on the format that can indicate
+ // whether new lines are preferred or not.
+ return format & 65536 /* PreferNewLine */ ? 1 : 0;
}
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
return 1;
@@ -107735,10 +107737,13 @@
}
exitComment();
}
+ function originalNodesHaveSameParent(nodeA, nodeB) {
+ nodeA = ts.getOriginalNode(nodeA);
+ // For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
+ // have a parent node.
+ return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+ }
function siblingNodePositionsAreComparable(previousNode, nextNode) {
- if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
- return false;
- }
if (nextNode.pos < previousNode.end) {
return false;
}
@@ -113111,8 +113116,14 @@
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
var name = _a[_i];
- var optionInfo = optionsNameMap.get(name.toLowerCase());
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
+ var optionKey = name.toLowerCase();
+ var optionInfo = optionsNameMap.get(optionKey);
+ if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+ // We need to store `strict`, even though it won't be examined directly, so that the
+ // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
+ optionKey === "strict" ||
+ // We need to store these to determine whether `lib` files need to be rechecked.
+ optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
}
}
@@ -116621,7 +116632,7 @@
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
- return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+ return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -116706,6 +116717,7 @@
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
+ var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
@@ -116716,7 +116728,7 @@
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
/*write*/ undefined,
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken,
- /*emitOnlyDts*/ false, customTransformers).emitResult;
+ /*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
// Don't emit .d.ts if there are decl file errors
if (declDiagnostics) {
program.restoreState();
@@ -116798,6 +116810,7 @@
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
+ var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -116813,7 +116826,7 @@
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
- }, customTransformers);
+ }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json
index 9464133..2c1d8ca 100644
--- a/node_modules/typescript/package.json
+++ b/node_modules/typescript/package.json
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
- "version": "4.3.2",
+ "version": "4.3.5",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
diff --git a/package-lock.json b/package-lock.json
index f1d6e82..e810403 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,8 +22,8 @@
"@types/node": "15.6.2",
"@types/rimraf": "3.0.1",
"@types/sinon": "10.0.2",
- "@typescript-eslint/eslint-plugin": "^4.28.5",
- "@typescript-eslint/parser": "^4.28.5",
+ "@typescript-eslint/eslint-plugin": "4.28.5",
+ "@typescript-eslint/parser": "4.28.5",
"@web/rollup-plugin-import-meta-assets": "1.0.7",
"bl": "4.1.0",
"chai": "4.3.4",
@@ -31,10 +31,10 @@
"clean-css": "5.1.3",
"convert-source-map": "1.7.0",
"escodegen": "2.0.0",
- "eslint": "^7.31.0",
- "eslint-plugin-import": "^2.23.4",
+ "eslint": "7.31.0",
+ "eslint-plugin-import": "2.23.4",
"eslint-plugin-lit-a11y": "1.0.1",
- "eslint-plugin-mocha": "^9.0.0",
+ "eslint-plugin-mocha": "9.0.0",
"eslint-plugin-rulesdir": "0.2.0",
"istanbul-lib-instrument": "4.0.3",
"istanbul-lib-report": "3.0.0",
@@ -62,7 +62,7 @@
"stylelint-config-standard": "21.0.0",
"svgo": "2.3.1",
"terser": "5.6.1",
- "typescript": "4.3.2",
+ "typescript": "^4.3.5",
"ws": "7.5.3",
"yargs": "16.2.0"
}
@@ -7634,9 +7634,9 @@
}
},
"node_modules/typescript": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz",
- "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==",
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+ "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -14164,9 +14164,9 @@
}
},
"typescript": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz",
- "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==",
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+ "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true
},
"ua-parser-js": {
diff --git a/scripts/deps/manage_node_deps.py b/scripts/deps/manage_node_deps.py
index 0f6e5dd..38a0a0d 100755
--- a/scripts/deps/manage_node_deps.py
+++ b/scripts/deps/manage_node_deps.py
@@ -95,7 +95,7 @@
"stylelint-config-standard": "21.0.0",
"svgo": "2.3.1",
"terser": "5.6.1",
- "typescript": "4.3.2",
+ "typescript": "4.3.5",
"ws": "7.5.3",
"yargs": "16.2.0",
}