Great library by the way!
I use the following code to prefix all variables, functions and enums in my file.
sourceFile.getEnumOrThrow(`MyEnum`).setIsExported(true)
const thingsToRename = [...sourceFile.getVariableDeclarations(), ...sourceFile.getFunctions(), ...sourceFile.getEnums()]
for (const thingToRename of thingsToRename) {
thingToRename.rename(`${prefix}${thingToRename.getName()}`)
}
It works great, everything gets renamed.
However, MyEnum references are not handled (other enums are fine).
If I call setIsExported after doing the renaming, everything is okay.
Great library by the way!
I use the following code to prefix all variables, functions and enums in my file.
It works great, everything gets renamed.
However,
MyEnumreferences are not handled (other enums are fine).If I call
setIsExportedafter doing the renaming, everything is okay.