Type 'null' is not assignable to type ''
在ts中如果变量赋值null则编译器不通过,此时只需要在赋值null后面改成null!加上!感叹号即可,即告诉编译器此值永远不会是null
arkts鸿蒙开发Type ‘null‘ is not assignable to type ‘‘
于 2024-03-15 21:15:36 首次发布
Type 'null' is not assignable to type ''
在ts中如果变量赋值null则编译器不通过,此时只需要在赋值null后面改成null!加上!感叹号即可,即告诉编译器此值永远不会是null