Here is my first simple Hello World angular 2 app from Angular 2 quick start guide.
import {Component} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
@Component({
selector: 'ng2-app',
template: '<h1>My first Angular 2 App</h1>'
})
export class AppComponent { }
bootstrap(AppComponent);
The application runs fine when I run with npm start but my IntelliJ IDE is showing error in the line with bootstrap(AppComponent)
Argument type AppComponent is not assignable to parameter type Type
Looking at the bootstrap function declaration, AppComponent needs to extends Type.
export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef>;
My question is:
Is it expected for Angular components to extend Type?



bootstrap(<Type> AppComponent). Hopefully JetBrains gets it together soon. - pe8terbootstrap, as well as, with references inside directives and within the@RouteConfigsection. I added<any>in front of the problematic references (e.g.bootstrap(<any>App)anddirectives: [...COMMON_DIRECTIVES, <any>RouterOutlet]and@RouteConfig([{ path: '/', component: <any>HomeComponent, as: 'Home'}])), which quieted things down for now. - Aaron Jessen