-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
- VSCode Version: 1.44.2
- OS Version: macOS 10.14.6
A while back, the importModuleSpecifierEnding
preference was added to specify the preferred path ending for auto imports (see microsoft/vscode#90405).
{
"javascript.preferences.importModuleSpecifierEnding": "js",
}
While this seems to work with auto imports (i.e. referencing an export of another file and letting the editor perform module importing automatically), it does not work with path completions when typing the import statement manually.
import { someFunction } from '../|';
^ when picking a file from path suggestions here,
the file extension seems to always be omitted
Actual Behavior:
import { someFunction } from '../someModule';
Expected Behavior:
import { someFunction } from '../someModule.js';
Steps to Reproduce:
- Set
javascript.preferences.importModuleSpecifierEnding
to"js"
- Start typing an import statement of a relative js module
- When specifying the import source, choose a relative file path from the completions list
- The ".js" extension appears to be omitted
Expected Behavior:
The file chosen from the suggestions list should have the ".js" extension.
Does this issue occur when all extensions are disabled?: Yes
milos201, jacobmischka, ArnaudBarre, hville, silkfire and 6 moremilos201 and jacobmischka
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this