const result = TsTypeInfo.getInfoFromFiles(["V:\\TestFile.ts"], { includeTsNodes: true });
const file = result.getFile("TestFile.ts");
// do some changes with file.tsNode here
// now refresh the definition
file.refresh();
// or:
const newFile = file = file.refreshCopy();
// newFile and file would be updated to reflect changes made to tsNode
It would not be worth it to make the refresh() function also refresh all the children. It might be worth adding a deepRefresh function in the future.
This would be something like this:
It would not be worth it to make therefresh()
function also refresh all the children. It might be worth adding adeepRefresh
function in the future.