TypeScript: Auto import in angular typescript is not working
-
VSCode Version: Version 1.29.1 Typescript 3.1.4
-
OS Version: macOS 10.14.1
Steps to Reproduce:
-
Create new angular app:
ng new app -
Add new library:
yarn add @datorama/akita -
Create session.model.ts:
export interface Session {
id: ID;
firstName: string;
lastName: string;
token: string;
}
Auto import is not working. I get this error:
[ts] Cannot find name 'ID'. [2304]
any
Starting VSCode with code --disable-extensions didn’t help 😦
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (11 by maintainers)
The same problem occurs even when I try to import some
Angular modules. For instance, if I want to autoimportOverlayModulefrom@angular/cdk, autoimport is not giving any suggestions either 😦.@mjbvz and @sheetalkamat
I’m having the same issue for Angular Material.
The suggestion for
MatSidenavModuleand the other 2 modules never show up, no light bulb either.VS Code: 1.29.1 (system setup) Typescript 3.1.6 Windows 10