'React Typescript Failed to compile (TS error)

I cloned a project and when I'm trying to start it, I have Typescript errors.

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).

How can I ignore these errors please ?



Solution 1:[1]

You can use ts-ignore, by adding the comment on the line above where SyntheticEvent is being used.

So on line 66 in src/route/reset-password/reset-password-component.tsx

Example:

// @ts-ignore
const foo: SyntheticEvent = {
    ...
};

Warning I would use this with caution, as the error is most likely caused by something being incorrectly typed.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Reece Charsville