Description
Search Terms
TypeScript suggestions show path
TypeScript can provide completions that also add an import statement. However, when there are multiple symbols with the same name, it is hard to pick the right completion. This release makes this simpler because paths of auto-import completions are shown with the label.
Suggestion
As description above. I think the path should be show as import
form, not show path like 'node_modules/xxx/index' but 'xxx'
And sort it as the "show fixes" menu I post below.
Use Cases
Here is the current result
It is not very easy to choose which one to import Table
, because the path is too long and very same. (Actually I want the 3rd one, it is 'antd')
Here is the "show fixes" menu
It is much more clear.
Here is the "show fixes" menu, when I already import something from 'antd'
Examples
no example.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.