-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Import path quick suggestions - jsconfig aliases not recognised #19113
Comments
Tested on TS 2.5.3 and latest TS 2.6.0 dev I see
|
I just checked, and this is what I get
Recreated the same project config here https://github.com/mudrz/jsconfig-tests (This is TS 2.5.3, I haven't updated to TS 2.6 yet, I'll have some more time to test that in the following days) Edit:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"App/*": ["./ClientApp/*"]
}
},
"include": ["**/*.js"]
} |
I just installed TS 2.6 and it fixes the performance issues I've had, but not the aliases resolution Updated the test project also with 2.6 How do you get this response, can you share what {
"compilerOptions": {
"baseUrl": ".",
"paths": {
"App/*": ["./ClientApp/*"]
}
},
"include": ["**/*.js"]
} edit: |
Not sure if anything is happening here, but this is still a big issue with latest VSCode Insiders (1.19-insiders), and Typescript@next: Even trying to not use the alias results in the same bad input (ie. trying to import from 'GLOBAL/..' gives the same incorrect list of suggestions) in tsconig.json:
|
Hey, I provided a minimal reproduction repo on this (duplicate) issue: microsoft/vscode#39983 Edit: saving you a click: https://github.com/Zephir77167/vscode-intellisense-bug |
The bigger issue is that even without using the path alias', VC Code has a problem if you try to do an import on an absolute path. Just try importing from 'app/ ..' and it'll show all sorts of incorrect things. |
Same issue. In my case, TypeScript correctly understands the alias once the full path is set out and is able to pull exports from the file. But autocompletion on the file name returns the name of the alias itself -- e.g. if I have a path for |
From @mudrz on October 10, 2017 7:58
Reproduces without extensions: Yes
Doesn't work properly with aliases added in
jsconfig.json
https://code.visualstudio.com/docs/languages/jsconfigSample
jsconfig.json
Expected behaviour
will pull path intellisense for folder
ClientApp
Existing extension path-intellisense for example can also be configured with aliases in
settings.json
Copied from original issue: microsoft/vscode#35970
The text was updated successfully, but these errors were encountered: