You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using jsconfig.json and custom .d.ts file with non js extensions #37772
I also have a custom 'globals.d.ts' file which contains the data I want for the autocomplete options. This works perfectly for .js file extensions, but it seems to ignore it for custom file extensions I associated with the javascript language. The extensions added to the settings like this:
"files.associations": {
"*.sample": "javascript"
},
Should also use these files.
At the moment, the custom file extensions I have just use the standard es6 library for Autocomplete, rather than the file in my working directory (which .js files use).
We currently support single-file intellisense for JavaScript code with a custom file extension, but we do not support module resolution or project wide intellisense for such files. That is why your jsconfig.json has no effect.
This has been won't fixed upstream and there's not much we can do on the VS Code side to work around this. I recommend always using a *.js extension for these cases
Activity
mjbvz commentedon Nov 8, 2017
This is a duplicate of microsoft/TypeScript#10939
We currently support single-file intellisense for JavaScript code with a custom file extension, but we do not support module resolution or project wide intellisense for such files. That is why your
jsconfig.jsonhas no effect.This has been won't fixed upstream and there's not much we can do on the VS Code side to work around this. I recommend always using a
*.jsextension for these cases