Skip to content

Using jsconfig.json and custom .d.ts file with non js extensions #37772

Closed

Description

@georgerobo

Hello!

I have a JSConfig.json file in my working directory containing the following:

{
    "compilerOptions": {
        "checkJs": true,
        "lib": ["es6"]
    }
}

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).

Activity

  1. mjbvz commented on Nov 8, 2017

    @mjbvz
    Contributor

    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.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

  2. locked and limited conversation to collaborators on Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicateIssue identified as a duplicate of another issue(s)javascriptJavaScript support issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions