Closed tavisca-kbobade closed 3 years ago
Closing this, as I think it is not related to ttypescript.
@tavisca-kbobade API functionality in TS pre-TS 4 is called through the Typescript instance.
ts 3: ts.updateImportDeclaration
ts 4+: factory.updateImportDeclaration
I created a simple transformer to replace file content. But getting an error
Cannot read property 'updateImportDeclaration' of undefined
. It is because context.factory is null when I am using typescript@3.8.3 and when I install typescript@4.1.2 it works as expected.Is there any other way instead of upgrading to typescript?