Skip to content

Commit f49ebd9

Browse files
Removed duplicate usage of node in fix.
1 parent a6fe9fc commit f49ebd9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/services/codefixes/fixMissingTypeAnnotationOnExports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ function withChanges<T>(
435435
sourceFile,
436436
replacementTarget,
437437
factory.createAsExpression(
438-
tempName,
438+
factory.cloneNode(tempName),
439439
factory.createTypeQueryNode(
440-
tempName,
440+
factory.cloneNode(tempName),
441441
),
442442
),
443443
);

src/services/services.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,7 @@ function addSyntheticNodes(nodes: Node[], pos: number, end: number, parent: Node
508508
if (hasTabstop(parent)) {
509509
continue;
510510
}
511-
// TODO: Not sure why this is here. When I try to make text change that contains only a property assigment this kicks in
512-
// Ex: x: x
513-
// Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`);
511+
Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`);
514512
}
515513
nodes.push(createNode(token, pos, textPos, parent));
516514
}

0 commit comments

Comments
 (0)