Open
Description
Bug Report
🔎 Search Terms
- importModuleSpecifierEnding
- paths
- js es modules
🕗 Version & Regression Information
reproduced with TypeScript 4.4.4 as well as 4.6.0-dev.20211108 (i.e. npm install typescript@next
at the time of writing).
This is a crashThis changed between versions ______ and _______- This is the behavior in every version I tried, and I reviewed the FAQ for entries about __ Modules __
I was unable to test this on prior versions because _______
⏯ Playground Link
I could not figure out how to configure the Bug Workbench to contain multiple files, so I created an example git repository instead:
https://github.com/orzechowskid/ts-example-repo
💻 Code
// ./tsconfig.json
{
"compilerOptions": {
"allowJs": true,
"baseUrl": ".",
"checkJs": true,
"paths": {
"~/*": [ "./src/*" ]
},
"strict": true
},
"include": [
"./src/**/*"
]
}
// ./src/utils/foo/bar/baz.js
export const baz = (a, b) => a + b;
// ./src/components/foo/Bar.js
import * from '~/utils/foo/bar/b
^- wait for auto-suggest
🙁 Actual behavior
baz
suggested as autocomplete text
🙂 Expected behavior
baz.js
suggested as autocomplete text, since it's referring to a module import and I've set importModuleSpecifierEnding: 'js'
in my preferences. (FWIW the file extension is appended if I write a relative path, e.g. 'import * from '../../utils/foo/bar/baz.js
).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment