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

Add import statement as 'import type' for types and interfaces (typescript) #228

Closed
Treverix opened this issue Jun 15, 2021 · 2 comments · Fixed by #232
Closed

Add import statement as 'import type' for types and interfaces (typescript) #228

Treverix opened this issue Jun 15, 2021 · 2 comments · Fixed by #232

Comments

@Treverix
Copy link

Treverix commented Jun 15, 2021

We can let intellij add a missing import and that also works on svelte source files with lang="ts".

image

The only trouble is: svelte requires that all types and interfaces to be imported as type

import type {SuiteSelectorEvents} from "./types";

while the current plugin adds it like that:

import {SuiteSelectorEvents} from "./types";

That is probably the default behavior of IDEA but it would be great if the plugin could add the import as import type here because otherwise we observe (pretty misleading) compile errors when we miss to fix it immediately.

@SelcukKayahan
Copy link

Same here. Already tried this among others: https://youtrack.jetbrains.com/issue/WEB-43269

@tomblachut
Copy link
Owner

Will be supported in 2021.2 as part of https://youtrack.jetbrains.com/issue/WEB-50851

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

Successfully merging a pull request may close this issue.

3 participants