【发布时间】:2021-03-18 04:42:26
【问题描述】:
升级后
"react": "^17.0.1",
"react-scripts": "4.0.1"
我的所有类型(或接口)都不再被识别。它与 React "react": "16.13.1" 工作正常@
出现此错误的示例:
Line 18:3: Parsing error: Unexpected token
16 | type Props = {
17 | onCancel: () => void
> 18 | text: string
| ^
19 | userRoleCompanie: UserRoleCompanie
20 | }
21 |
【问题讨论】:
标签: reactjs typescript types upgrade