You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem description
When using replace function to transform code the updated code is said to be printed with the TypeScript Printer.
This seems to get rid of empty lines which are not recovered when formatting the updated code with e.g. Prettier. This results in many diffs in the updated code compared to the original code, even when the same formatter was used before and after.
Suggested solution
Wouldn't it be possible to just do a string replacement if the input to the replace function is a string (not a node)? This would guarantee that the parts of the original string that are not replaced remain the same.
The text was updated successfully, but these errors were encountered:
Problem description
When using replace function to transform code the updated code is said to be printed with the TypeScript Printer.
This seems to get rid of empty lines which are not recovered when formatting the updated code with e.g. Prettier. This results in many diffs in the updated code compared to the original code, even when the same formatter was used before and after.
Suggested solution
Wouldn't it be possible to just do a string replacement if the input to the replace function is a string (not a node)? This would guarantee that the parts of the original string that are not replaced remain the same.
The text was updated successfully, but these errors were encountered: