TypeScript error after dependency upgrade
drxcheng opened this issue · 3 comments
drxcheng commented
Checklist
- This is not covered in the repository examples.
- I am using the package latest version.
- This is a bug report or an enhancement proposal.
Description
After I upgrade dependencies in my project, I get this error
.../node_modules/mui-rte/src/MUIRichTextEditor.tsx
TypeScript error in .../node_modules/mui-rte/src/MUIRichTextEditor.tsx(1017,32):
Argument of type 'KeyboardEvent<{}>' is not assignable to parameter of type 'SyntheticKeyboardEvent'.
Property 'code' is missing in type 'React.KeyboardEvent<{}>' but required in type 'import(".../node_modules/@types/react-redux/node_modules/@types/react/index").KeyboardEvent<{}>'. TS2345
1015 |
1016 | const keyBindingFn = (e: React.KeyboardEvent<{}>): string | null => {
> 1017 | if (hasCommandModifier(e) && props.keyCommands) {
| ^
1018 | const comm = props.keyCommands.find(comm => comm.key === e.keyCode)
1019 | if (comm) {
1020 | return comm.name
mui-rte version: 1.26.2
draft-js version: 0.11.7
@types/draft-js version: 0.10.44
@types/react version: 17.0.0 & 16.14.2
@types/react-redux version: 7.1.11
niuware commented
Duplicated: #214
Hopefully will remove typescript files from the release code in the near future.
drxcheng commented
is there any workaround for now?
drxcheng commented
unifying one react type version fixes it