Skip to content

tsc watch mode does not recompile correctly #28328

Closed
@ahagelstein

Description

@ahagelstein

TypeScript Version: 3.2.0-dev.20181103, 3.1.6 and older

Code
Please use the attached sample project.

Steps:

  • start the tsc in the root folder with tsc -w
  • note: currently there is no compiler error
  • goto lib1\tools\tools.interface.ts and remove the comment for title2: string;

Expected behavior:
the compiler detects the file change and generates the following output:

lib2/data.ts:7:15 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'.
Property 'title2' is missing in type '{ title: string; }'.

7 const result: ITest = {
~~~~~~

[6:07:45 PM] Found 1 error. Watching for file changes.

Actual behavior:
the compiler detects the file change and generates a new output but without errors.
if I restart the compiler I see the expected error.

My system:
Windows 10 1803
node v10.12.0

test.zip

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions