typescript-react-apollo tutorial error
mattsears18 opened this issue · 1 comments
mattsears18 commented
I'm on the Tutorial & boilerplate setup section of the typescript-react-apollo tutorial. When I download the app boilerplate, run yarn and yarn start as instructed, I get this error:
TypeScript error in /Users/matthewsears/code/learn-graphql/tutorials/frontend/typescript-react-apollo/app-boilerplate/src/components/Todo/TodoItem.tsx(44,63):
Argument of type 'MouseEvent<HTMLButtonElement, MouseEvent>' is not assignable to parameter of type 'MouseEvent<Element, MouseEvent>'.
Type 'MouseEvent<HTMLButtonElement, MouseEvent>' is missing the following properties from type 'MouseEvent<Element, MouseEvent>': detail, view TS2345
42 | </div>
43 |
> 44 | <button className="closeBtn" onClick={(e) => removeTodo(e)}>
| ^
45 | x
46 | </button>
47 | </li>
I was able to resolve the error by simply running yarn upgrade to generate an updated yarn.lock file.
mattsears18 commented
I'll make a PR to update yarn.lock