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

[Bug] - Typescript intellisense not picking up other .tsx files when importing #90823

Closed
jasonwilliams opened this issue Feb 17, 2020 · 3 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues

Comments

@jasonwilliams
Copy link
Contributor

jasonwilliams commented Feb 17, 2020

  • VSCode Version: 1.42.1
  • OS Version: MacOS 10.14.6

Steps to Reproduce:

  1. clone https://github.com/jasonwilliams/nextjs9-typescript-server-vscode-example
  2. Try to import test.tsx into page pages/index.tsx

no_auto_complete

TS Server trace

It does work if i just type it out in the document without being inside of import braces.

Looks like the difference is a competionInfo request is sent to the typescript server when i type in the document and i get a response with suggestions, but inside of import i get

[Trace  - 14:23:48.406] <semantic> Response received: completionInfo (1416). Request took 5 ms. Success: false . Message: No content available.

Typing inside import

Screenshot 2020-02-17 at 14 28 45

Typing inside document

Screenshot 2020-02-17 at 14 35 27

@jasonwilliams jasonwilliams changed the title Typescript intellisense not picking up other .tsx files when importing [Bug] - Typescript intellisense not picking up other .tsx files when importing Feb 17, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 18, 2020

Auto imports mean that you don't need to write imports at all: just start typing the name of the symbol where you want to use it and accept the suggestion:

Screen Shot 2020-02-18 at 2 41 21 PM

This will add the import to the top of the file:

import { Welcome } from "components/test";

@mjbvz mjbvz closed this as completed Feb 18, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 18, 2020

If you still want to see the auto imports work inside import statements, you can file a feature request upstream against the TypeScript project since it powers this feature

@mjbvz mjbvz added *question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues labels Feb 18, 2020
@jasonwilliams
Copy link
Contributor Author

jasonwilliams commented Feb 19, 2020

@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants
@jasonwilliams @mjbvz and others