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

Treat import statements with only inline type as weak #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

denis-sokolov
Copy link

A statement like one below today is treated as a strong import by ts-helper, and triggers cycle detection.

import { type Foo } from "./foo";

However, TypeScript compilation omits the entire statement and as such it is equivalent to this one that does not trigger cycle detection:

import type { Foo } from "./foo";

If you accept this PR, you might also want to adjust the section right below that handles the exports:

https://github.com/quicktype/ts-helper/blob/0ca5a0987c22f03c3c61a8301cf20ca381191efb/src/index.ts#L264-L269

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

Successfully merging this pull request may close these issues.

1 participant