mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Merge pull request #8087 from drywolf/master
[react-dnd] added types for collector functions (DragSource, DragTarget, DragLayer)
This commit is contained in:
Vendored
+7
-3
@@ -38,14 +38,14 @@ declare module __ReactDnd {
|
||||
export function DragSource<P>(
|
||||
type: Identifier | ((props: P) => Identifier),
|
||||
spec: DragSourceSpec<P>,
|
||||
collect: (connect: DragSourceConnector, monitor: DragSourceMonitor) => Object,
|
||||
collect: DragSourceCollector,
|
||||
options?: DndOptions<P>
|
||||
): (componentClass: React.ComponentClass<P>) => DndComponentClass<P>;
|
||||
|
||||
export function DropTarget<P>(
|
||||
types: Identifier | Identifier[] | ((props: P) => Identifier | Identifier[]),
|
||||
spec: DropTargetSpec<P>,
|
||||
collect: (connect: DropTargetConnector, monitor: DropTargetMonitor) => Object,
|
||||
collect: DropTargetCollector,
|
||||
options?: DndOptions<P>
|
||||
): (componentClass: React.ComponentClass<P>) => DndComponentClass<P>;
|
||||
|
||||
@@ -54,10 +54,14 @@ declare module __ReactDnd {
|
||||
): (componentClass: React.ComponentClass<P>) => ContextComponentClass<P>;
|
||||
|
||||
export function DragLayer<P>(
|
||||
collect: (monitor: DragLayerMonitor) => Object,
|
||||
collect: DragLayerCollector,
|
||||
options?: DndOptions<P>
|
||||
): (componentClass: React.ComponentClass<P>) => DndComponentClass<P>;
|
||||
|
||||
type DragSourceCollector = (connect: DragSourceConnector, monitor: DragSourceMonitor) => Object;
|
||||
type DropTargetCollector = (connect: DropTargetConnector, monitor: DropTargetMonitor) => Object;
|
||||
type DragLayerCollector = (monitor: DragLayerMonitor) => Object;
|
||||
|
||||
// Shared
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user