React draggable and react rnd issue

Open
#739 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
frontend

Research direction

Start by comparing the two react-draggable typings paths shown in node_modules/react-draggable/typings/index.d.ts and node_modules/react-rnd/node_modules/react-draggable/typings/index.d.ts, using the reported react-rnd and react-draggable versions. Reproduce the TypeScript compilation error and determine whether the dependency tree can compile without the duplicate DraggableEvent declaration.

Written by the indexing model from the issue text.

Description

I am using
"react-rnd": "^10.4.1" and
"react-draggable": "^4.4.5"

But having

node_modules/react-draggable/typings/index.d.ts:22:15 - error TS2300: Duplicate identifier 'DraggableEvent'.

22   export type DraggableEvent = React.MouseEvent<HTMLElement | SVGElement>
                 ~~~~~~~~~~~~~~

  node_modules/react-rnd/node_modules/react-draggable/typings/index.d.ts:22:15
    22   export type DraggableEvent = React.MouseEvent<HTMLElement | SVGElement>
                     ~~~~~~~~~~~~~~
    'DraggableEvent' was also declared here.

image (2)

Dominant language
JavaScript
Stars
9.3k
Forks
1k
Avg merge
3d 8h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-grid-layout/react-draggable

All issues in react-grid-layout/react-draggable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.