Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: remove todo comment from
updateClassDeclaration
A transformer should not mutate existing nodes, ever. If you intend to modify some part of the node, the ts.update* methods are correct. Or you can replace a node entirely via ts.create* operations, but there are cases where introducing entirely synthetic nodes will break TS output. Hence using the updateClassDeclaration in this case is the correct approach. This has also been raised in the slack #ts-core channel as TypeScript have been looking to get to the bottom of this microsoft/TypeScript#29365 (comment), which seemed to have been caused by mutating the node.
- Loading branch information