Skip to content

False-Positive noUnusedLocals-checks in watch-mode #21713

@tho-graf

Description

@tho-graf

I found some related issues. But I am pretty sure all of them are related to normal mode and not watch-mode. My bug occours only in watch-mode.

TypeScript Version: 2.7.1

Search Terms:
noUnusedLocals, is declared but its value is never read, Write-only references now flagged as unused

Code
Checkout the repo https://github.com/thomaskempel/tsc2.7.1-bug and run tsc --noEmit -w -p .

Expected behavior:
It runs without errors. Because all impors are acutally called or read.

Actual behavior:
Shows error

08:47:04 - Starting compilation in watch mode...
src/fileWithError.ts(2,3): error TS6133: 'IActionType' is declared but its value is never read.
08:47:06 - Compilation complete. Watching for file changes.

Playground Link:
https://github.com/thomaskempel/tsc2.7.1-bug

Related Issues:
This could be related. But my error only shows up in watch-mode
#19700

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions