mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[ReactDnd] changes NativeTypes to use string typing
This commit is contained in:
parent
ad6ffc4b5c
commit
b18345f63e
10
react-dnd/react-dnd-html5-backend.d.ts
vendored
10
react-dnd/react-dnd-html5-backend.d.ts
vendored
@ -6,7 +6,11 @@
|
||||
///<reference path='./react-dnd.d.ts' />
|
||||
|
||||
declare module "react-dnd-html5-backend" {
|
||||
export enum NativeTypes { FILE, URL, TEXT }
|
||||
export function getEmptyImage(): any; // Image
|
||||
export default class HTML5Backend implements __ReactDnd.Backend { }
|
||||
export namespace NativeTypes {
|
||||
export const FILE: string;
|
||||
export const URL: string;
|
||||
export const TEXT: string;
|
||||
}
|
||||
export function getEmptyImage(): any; // Image
|
||||
export default class HTML5Backend implements __ReactDnd.Backend { }
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ import DragSource = ReactDnd.DragSource;
|
||||
import DropTarget = ReactDnd.DropTarget;
|
||||
import DragLayer = ReactDnd.DragLayer;
|
||||
import DragDropContext = ReactDnd.DragDropContext;
|
||||
import HTML5Backend, { getEmptyImage } from "react-dnd-html5-backend";
|
||||
import HTML5Backend, { getEmptyImage, NativeTypes } from "react-dnd-html5-backend";
|
||||
import TestBackend from "react-dnd-test-backend";
|
||||
|
||||
// Game Component
|
||||
@ -201,6 +201,7 @@ namespace BoardSquare {
|
||||
}
|
||||
|
||||
export var DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare);
|
||||
export var fileDropTarget = DropTarget(NativeTypes.FILE, boardSquareTarget, boardSquareCollect)(BoardSquare);
|
||||
export var create = React.createFactory(DndBoardSquare);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user