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

Automatic imports break with Flow's import type #46425

Closed
karlhorky opened this issue Mar 23, 2018 · 3 comments
Closed

Automatic imports break with Flow's import type #46425

karlhorky opened this issue Mar 23, 2018 · 3 comments
Assignees
Labels
*extension-candidate Issue identified as good extension implementation javascript JavaScript support issues

Comments

@karlhorky
Copy link

VSCode Version: 1.21.1
OS Version: macOS 10.13.3 (17D102)

Re-submitting @jlyons-bgl's issue to ask for a re-consideration of it. Could an exception not be made for this one syntax?

I would just comment on the issue itself but it has been locked.

Original issue (#39743):

The new automatic import feature is great! But I have an issue when using it with Flow.

Starting with:

import { TAccount } from './TAccount'
import type { SimilarTransactionJson, TAccountJson } from '../../types/BankingTypes'

and selecting an auto import Intellisense option I end up with:

import { TAccount } from './TAccount'
import typeimport { Entry } from './Entry';
 { SimilarTransactionJson, TAccountJson } from '../../types/BankingTypes'

Reproduces without extensions: Yes

@vscodebot
Copy link

vscodebot bot commented Mar 23, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the javascript JavaScript support issues label Mar 23, 2018
@karlhorky
Copy link
Author

I suppose this will just get closed with a "won't fix" like #44150 (comment) or #39743 (comment), but maybe it would be an idea to re-consider making a single exception for import type, since this will probably keep coming up.

@mjbvz
Copy link
Contributor

mjbvz commented Mar 23, 2018

Yes, duplicate of those issues. We can't guarantee that the built-in js/ts extension will ever do the right thing for flow code even though it uses the .js file extension. Both the suggestions and the auto-imports need to come from the Flow vscode extension

@mjbvz mjbvz closed this as completed Mar 23, 2018
@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Mar 23, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

2 participants