react-sortablejs
react-sortablejs copied to clipboard
[bug] Error running Typescript compiler
Hi!
Straight to the point, I'm getting below errors when running Typescript compiler ie. on the project repo.
yarn run v1.21.1 node_modules/react-sortablejs/dist/react-sortable.d.ts:12:17 - error TS1086: An accessor cannot be declared in an ambient context. 12 private get sortable(); ~~~~~~~~ node_modules/react-sortablejs/dist/react-sortable.d.ts:12:17 - error TS7033: Property 'sortable' implicitly has type 'any', because its get accessor lacks a return type annotation. 12 private get sortable(); ~~~~~~~~ Found 2 errors. error Command failed with exit code 1. --
I'm not sure if this is required, but I got @types/sortablejs installed as well but dont think it does anything to get rid of the issue. There is react-sortablejs-typescript also to handle Typescript related issues, but that has been deprecated.
I have looked at https://github.com/SortableJS/react-sortablejs/issues/83 and previously https://github.com/SortableJS/react-sortablejs/issues/71, but none provide me with direct solution or that I can naively understand I guess 😬
Can anyone helps to suggest what should I do next please?
@ashrafaa remove @types/react-react-sortablejs. I've include definitions in the package itself so adding any others may cause conflicts. Let me know if this worked.