mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Apply 'no-unnecessary-type-assertion' lint rule (#22005)
* Apply 'no-unnecessary-type-assertion' lint rule * Fix type error * Fix tsconfig.json * Add --format back
This commit is contained in:
@@ -2026,7 +2026,7 @@ namespace ts.server {
|
||||
}
|
||||
else {
|
||||
configFileErrors = project.getAllProjectErrors();
|
||||
this.sendConfigFileDiagEvent(project as ConfiguredProject, fileName);
|
||||
this.sendConfigFileDiagEvent(project, fileName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -765,13 +765,13 @@ namespace ts.server {
|
||||
for (let i = 0; i < splitNodeCount; i++) {
|
||||
splitNodes[i] = new LineNode();
|
||||
}
|
||||
let splitNode = <LineNode>splitNodes[0];
|
||||
let splitNode = splitNodes[0];
|
||||
while (nodeIndex < nodeCount) {
|
||||
splitNode.add(nodes[nodeIndex]);
|
||||
nodeIndex++;
|
||||
if (splitNode.children.length === lineCollectionCapacity) {
|
||||
splitNodeIndex++;
|
||||
splitNode = <LineNode>splitNodes[splitNodeIndex];
|
||||
splitNode = splitNodes[splitNodeIndex];
|
||||
}
|
||||
}
|
||||
for (let i = splitNodes.length - 1; i >= 0; i--) {
|
||||
@@ -785,7 +785,7 @@ namespace ts.server {
|
||||
}
|
||||
this.updateCounts();
|
||||
for (let i = 0; i < splitNodeCount; i++) {
|
||||
(<LineNode>splitNodes[i]).updateCounts();
|
||||
splitNodes[i].updateCounts();
|
||||
}
|
||||
return splitNodes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user