Reputation: 6856
I'm using WebStorm 7.0.2 with tsc 0.9.1.1. Webstorm is showing code in red, and shows a number of errors in a tooltip when I move my mouse over the red text ISystem
below.
/// <reference path="launcher-system.ts" />
module Launcher {
export class SystemStub implements Launcher.ISystem { // ISystem shows as red
....
}
...
}
launcher-system.ts
has the following content:
module Launcher {
export interface ISystem {
...
}
}
But there are no errors output from tsc. And, I can click on the red text of ISystem
, and Webstorm takes me to where Launcher.ISystem
is defined, in another file.
The tooltip shows four Unresolved variable errors.
The multitude of errors is due to me messing about to see what would happen if I intentionally caused an error by trying to implement an interface that I knew did not exist (e.g. I know for sure that ISystemmmm is not a valid).
I do not know why Webstorm seems to keep a history of errors. But while I know that the misspellings are valid errors, they are history ... why is Webstorm still showing these?
And, how can I fix Webstorm of the one error message, that is not a valid error (e.g. ISystem)?
Upvotes: 2
Views: 2313
Reputation: 250922
I'm having to make a few assumptions as you haven't shown a complete working example of the issue.
My guess would be that you may have missed off the export
keyword from the interface? If you leave out the export
keyword, ISystem
wouldn't exist on Launcher
.
First File
module Launcher {
export interface ISystem {
}
}
Second File
module Launcher {
export class SystemStub implements Launcher.ISystem {
}
}
Upvotes: 1