码云 前端开发 解决TS报Type ‘HTMLElement | null’ is not assignable to type ‘HTMLElement’. Type ‘null’ is not assignable to type ‘HTMLElement’ 我们在使用 typescript3.9 时,以下代码编译时会提示错误: const ... HTMLElement strict模式 TypeScript 类型断言