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

imports: display completions to files with extensions from ambient modules #52409

Closed
zardoy opened this issue Jan 25, 2023 · 0 comments · Fixed by #52406
Closed

imports: display completions to files with extensions from ambient modules #52409

zardoy opened this issue Jan 25, 2023 · 0 comments · Fixed by #52406
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@zardoy
Copy link
Contributor

zardoy commented Jan 25, 2023

Suggestion

🔍 Search Terms

VSCode path intellisense not working

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

✅ Viability Checklist

My suggestion meets these guidelines:

  • [z] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [z] This wouldn't change the runtime behavior of existing JavaScript code
  • [z] This could be implemented without emitting different JS based on the types of the expressions
  • [z] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • [z] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Screenshot 2023-01-25 at 15 41 32

📃 Motivating Example

It seems typescript already can provide definition to such files from import statements (on file path string literal), but it doesn't include these files into completion lists (they are actually valid files imports).

js only environments

In js-only projects module augmentations are not possible (until types module providing them is installed)

I think in such cases it makes sense to display files for any extension but for named imports only, but still not sure.

💻 Use Cases

Without it you need to guess path or use 3rd party ide extensions that don't know of module resolution (aliases and so on) such as popular path intellisense. This is annoying and displaying completions and native way to TS is best option for IDEs

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript In Discussion Not yet reached consensus Domain: Completion Lists The issue relates to showing completion lists in an editor labels Jan 25, 2023
@andrewbranch andrewbranch added this to the TypeScript 5.0.1 milestone Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants