Skip to content

Commit

Permalink
cleanup: remove unused variable assignment (#33917)
Browse files Browse the repository at this point in the history
The initial value in `text` was being immediately overwritten by the next statement
  • Loading branch information
ethanresnick committed Mar 9, 2020
1 parent bf15eac commit 5d6b385
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/buildProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ class DeclarationsWalker {

static getExtraDeclarations(typeChecker: ts.TypeChecker, protocolFile: ts.SourceFile): string {
const walker = new DeclarationsWalker(typeChecker, protocolFile);
let text = "declare namespace ts.server.protocol {\n";
walker.visitTypeNodes(protocolFile);
text = walker.text
let text = walker.text
? `declare namespace ts.server.protocol {\n${walker.text}}`
: "";
if (walker.removedTypes) {
Expand Down

0 comments on commit 5d6b385

Please sign in to comment.