I have been using TypeScript 2.3. My vscode has version 2.4.2, so I though I would try swapping to this.
I have a simple page…
import { Component } from '@angular/core';
@Component({
selector: 'page-startup',
templateUrl: 'startup.html'
})
export class StartupPage {
constructor() {}
}
In my app.component.ts, I have the following declaration…
public rootPage: Component = StartupPage;
I always like to have stuff as strongley typed as possible, so I have the page of type Component
.
When I swap to TS 2.4.2, it suddenly does not like this any more. I get the error…
[ts] Type 'typeof StartupPage' has no properties in common with type 'Component'.
I know I can just swap the type to any
, but just wondering why this is suddenly s type error, since the page is a Component?
Thanks in advance