Skip to content

TypeScript Language Server False Positive Error Reporting #57585

Closed
@DScheglov

Description

@DScheglov

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.0
  • OS Version: Ubuntu 22.04

Steps to Reproduce:

  1. Clone the project git clone https://github.com/DScheglov/res-test.git
  2. Open the VS Code: code res-test
  3. Install dependencies (in terminal): npm i
  4. Open file ./src/index.ts

The following errors are shown:
image

These errors are false positive:

  1. project is configured to use the same typescript compiler as a project. See .vscode/settings.json
  2. project is compiled successfully via terminal: npx tsc (no errors)
  3. errors are gone after TS Language Server is restared (Ctrl + Shift + P , TypeScript: Restart TS Server)
  4. errors go back after any touch of the file (just add a space).

There is not such problem in WebStorm
image
(Sorry, I have to check)

Errors are not displayed in the TS Playground as well:
Playground

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions