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
Version: 20.0.0 (removeDefaultImport is unchanged since this version, so it's still applicable i think)
To Reproduce
import{Project}from"ts-morph";constproject=newProject();constsourceFile=project.createSourceFile("test.ts",``);sourceFile.addImportDeclaration({moduleSpecifier: 'foo',defaultImport: 'bar',isTypeOnly: true});constimportDeclaration=sourceFile.getImportDeclarations()[0].removeDefaultImport()// reproduce the problem hereimportDeclaration.removeDefaultImport();
> 1 | import type bar from "foo";
at Object.throwIfNullOrUndefined (node_modules/@ts-morph/common/dist/ts-morph-common.js:438:19)
at Identifier.getNextSiblingIfKindOrThrow (node_modules/ts-morph/dist/ts-morph.js:3841:30)
at ImportDeclaration.removeDefaultImport (node_modules/ts-morph/dist/ts-morph.js:12499:57)
Expected behavior
The default import should be removed.
The text was updated successfully, but these errors were encountered:
Describe the bug
Version: 20.0.0 (removeDefaultImport is unchanged since this version, so it's still applicable i think)
To Reproduce
Expected behavior
The default import should be removed.
The text was updated successfully, but these errors were encountered: