我克隆了一个项目,当我试图启动它时,我会出现打字错误。
Failed to compile.
./src/route/reset-password/reset-password-component.tsx
[tsl] ERROR in src/route/reset-password/reset-password-component.tsx(67,14)
TS2314: Generic type 'SyntheticEvent<T>' requires 1 type argument(s).我怎么能忽略这些错误呢?
发布于 2022-04-27 09:33:07
您可以使用ts-忽略,方法是在上面使用SyntheticEvent的行中添加注释。
所以在线66在src/route/reset-password/reset-password-component.tsx中
示例:
// @ts-ignore
const foo: SyntheticEvent = {
...
};警告--我会谨慎地使用它,因为错误很可能是由于输入错误引起的。
https://stackoverflow.com/questions/72026224
复制相似问题