admin管理员组

文章数量:1530842

1.出现报错的几种原因

(1)属性类型不对

(2)没有初始化

(3)undefined或null

2.解决的方法

(1)tsconfig.json中修改

"compilerOptions": {
    "strictPropertyInitialization": false
  }

(2)非空断言!:

(3)?:

(5)联合 

value | undefined | null

本文标签: 报错PropertytszeroValueconstructor