【发布时间】:2022-01-11 19:23:16
【问题描述】:
我已将我的 Angular 项目移至 ESLint 并修复了除 ElementRef<any> 和 EmbeddedViewRef<any> 之外的所有 linting 错误。
错误:
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
谁能帮助我了解我应该在这些位置输入什么来代替任何内容?
const element = this.refElement.nativeElement.querySelector('.custom-filter-control');
element.appendChild((this.CUSTOMComponentRef.hostView as EmbeddedViewRef<any>).rootNodes[0]);
templateRef: TemplateRef<any>
【问题讨论】:
标签: angular typescript eslint typescript-eslint