TypeScriptAST icon indicating copy to clipboard operation
TypeScriptAST copied to clipboard

[Design] ChangeNode method is too strict

Open remye06 opened this issue 5 years ago • 0 comments

Hello, I came across an implementation that was far away from what I was expecting while using the ChangeNode() method. If the replacement string provided equals the current node's string representation, the method throws an exception with message "Same value". I'm convinced that one would expect a no-op in that particular case, and that this implementation is very unnatural, at the very least.

remye06 avatar Jul 17 '20 10:07 remye06