UNPKG

707 BTypeScriptView Raw
1import { SourceType } from 'dnd-core';
2import { DndOptions, DndComponentEnhancer, DragSourceSpec, DragSourceCollector } from './types';
3/**
4 * Decorates a component as a dragsource
5 * @param type The dragsource type
6 * @param spec The drag source specification
7 * @param collect The props collector function
8 * @param options DnD options
9 */
10export declare function DragSource<RequiredProps, CollectedProps = any, DragObject = any, DropResult = any>(type: SourceType | ((props: RequiredProps) => SourceType), spec: DragSourceSpec<RequiredProps, DragObject, DropResult>, collect: DragSourceCollector<CollectedProps, RequiredProps>, options?: DndOptions<RequiredProps>): DndComponentEnhancer<CollectedProps>;