Skip to content

Salsa - no support to treat files without a suffix as .js files, they are always treated as .ts files #7291

Description

@egamma

extracted and summarized from microsoft/vscode#3508

Applications generated with the express generator have a file www without suffix but with the shebang

#!/usr/bin/env node

Code detects the file as a JS file and passes it to the tsserver. However, the tsserver treats this file as a .ts file and this results in type errors in a JS file.

To reproduce:

Notice that there are errors from TS reported in this file,

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: APIRelates to the public API for TypeScriptFixedA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions