Skip to content

Extension vscode.typescript-language-features setting option to disable the check on the TS 8006 error #226176

@Lerri-Cofannos

Description

@Lerri-Cofannos

Context

When migrating a codebase from Flow to Typescript, I have files in .js with type annotations. I would like to use all of the possibilities offered by the typescript built-in extension, but each type declaration or annotation is highlighted as an error for example 'import...type' declarations can only be used in TypeScript files.ts(8006). This makes the extension unusable...
This feature would resolve the issue raised by these fellow developers: microsoft/TypeScript#35470

Feature request

Would it be possible to have a setting option in the extension vscode.typescript-language-features to disable the check on the TS 8006 and TS 8010 error?

Example:

index.js

// @flow

const foo: string = 'foo';
            ^^^^
console.log(foo);

Metadata

Metadata

Assignees

Labels

upstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions