react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

remove unnecessary global typescript namespace declaration

Open pgoldberg opened this issue 2 years ago • 0 comments
trafficstars

Declaring a global module with declare module 'react-draggable' is unnecessary, and can cause type pollution if multiple versions of react-draggable end up in a package.

This is exemplified in this repro: https://github.com/pgoldberg/react-draggable-typings-bug

The global module declaration is not necessary. Typescript will appropriately associate the typings with the react-draggable module, since the typings are declared in the package.json here: https://github.com/react-grid-layout/react-draggable/blob/44a8c6ed103ec6c0a4dda5faf7f8ebca16f9b325/package.json#L24

pgoldberg avatar Dec 09 '22 20:12 pgoldberg