ステパンスヴォーロフ:
私は角要素を作成してAngular9とVSCode(1.44.0-インサイダー)で奇妙な警告を取得しています:
export class AppModule {
constructor(private injector: Injector) {
const helloElement = createCustomElement(HelloComponent, {injector});
customElements.define('my-hello', helloElement);
}
ngDoBootstrap() {}
}
種類はhelloElement
typescriptですから、エラーメッセージを受け付けられません。
型「NgElementConstructor」の引数はタイプ「CustomElementConstructor」のパラメータに割り当て可能ではありません
drfrontend 1:
次のリリースで修正される予定らしい。https://github.com/angular/angular/pull/35864
あなたは既に次のリリース(9.1.0-next.4)に更新することで、プロジェクトのためにそれをテストすることができます。
ng update @angular/core --next