If we have multiple .ts files containing various classes, is there an elegant method to extract portions of each file's AST, modify them, combine them into a new AST, and save it as a new .ts file?
Updated 2020-03-08:
In other words, is it feasible to merge the ASTs from two .ts files and then generate two new .ts files with the combined output?