Skip to content

Tsc in watch mode does not seem to observe changes when compiler errors due to project references are fixed #27685

Closed
@ThomasKiesel

Description

@ThomasKiesel

TscBugOutdatedErrors.zip

TypeScript Version: 3.2.0-dev.20181010

**Search Terms: watch project reference **

Please find attached a folder with some files to reproduce the Problem.
The folder contains two subfolders:

  1. A folder 'library' with an typescript file and a simple tsconfig.json
  2. A folder 'app' with an typescript file and a tsconfig.json, referencing the library Project.

For observing the bug, please open a command prompt and navigate to the root Folder.

  1. From command line, run "tsc -v --watch App" to transpile the files. Initially, there are no errors.
  2. Edit Library\Library.ts: Rename the property 'message" of 'SomeObject' to 'message1' in the interface declaration as well as in the method 'createSomeObject()'. Save the file. The compiler reports an error in App/app.ts stating that the property 'message' cannot be found. This is correct.
  3. Undo the changes from step 2, i.e. replace 'message1' by 'message' in both occurences and save the file.
    Expected behavior:
    Now I expect no errors.

Actual behavior:
However, the error message from step 2 still remains, as if the compiler did not notice the changes.

If I kill the watch process and restart the compiler again, everything is fine.

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueNeeds InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions