Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why isTypeOnly returns false for a named type import ? #1381

Closed
PenghaiZhang opened this issue Jan 12, 2023 · 1 comment
Closed

Why isTypeOnly returns false for a named type import ? #1381

PenghaiZhang opened this issue Jan 12, 2023 · 1 comment

Comments

@PenghaiZhang
Copy link

Hi, I am new to this library.

I have been searching for the answer to my question for a while but could not find any so I hope I can ask here.

I have an import like this

import type {A} from 'B'.

I expect isTypeOnly returns true but the result is false.

May I ask why ?

THank you!

@PenghaiZhang
Copy link
Author

Oh OK I found the answer. I should call namedImport.getParent().getParent().isTypeOnly()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant