react-dnd / react-dnd

Drag and Drop for React

Home Page:http://react-dnd.github.io/react-dnd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent undefined/null types

d07RiV opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
Typescript typings have an inconsistent usage of null vs undefined

DropTarget's drop returns DropResult | undefined, but monitor's getDropResult returns DropResult | null (it also has no mention of dropResult property, which is injected into my object)

DragSource's item is either DragItem, undefined, or a function that returns DragItem | null.

Describe the solution you'd like
Change everything to either null or undefined