Recently I had the following situation in VSCode in a typescript project:
file: some-interface.ts
// no import statements have been skipped. This is the whole file:
export interface SomeInterface {
property: AnotherInterface;
}
and file: another-interface.ts
:
export interface AnotherInterface {
// ...
}
Okay - as there is no import statement in the some-interface.ts
VS code showed me the error that the type AnotherInterface
could not be found. Of course this is expected behavior. But as soon I accidently removed the export
keyword from another-interface.ts
- VS code stopped complaining and could correctly resolve the type.
So do anyone know what's going on here? Is this expected behavior or rather a bug of either typescript or vs code?