mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 22:44:18 +08:00
Add react-dnd-touch-backend types (#20770)
* Add react-dnd-touch-backend types * CS fixes * Add dom lib
This commit is contained in:
12
types/react-dnd-touch-backend/index.d.ts
vendored
Normal file
12
types/react-dnd-touch-backend/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for react-dnd-touch-backend 0.3
|
||||
// Project: https://github.com/yahoo/react-dnd-touch-backend#readme
|
||||
// Definitions by: Daniel Król <https://github.com/mleko>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as ReactDnd from "react-dnd";
|
||||
|
||||
export default function createTouchBackend(options: TouchBackendOptions): ReactDnd.Backend;
|
||||
|
||||
export interface TouchBackendOptions {
|
||||
enableMouseEvents?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import * as ReactDnd from "react-dnd";
|
||||
import TouchBackend from "react-dnd-touch-backend";
|
||||
|
||||
const component = () => null;
|
||||
|
||||
const dndComponent = ReactDnd.DragDropContext(TouchBackend)(component);
|
||||
const dndComponentMouseEvents = ReactDnd.DragDropContext(TouchBackend({enableMouseEvents: true}))(component);
|
||||
24
types/react-dnd-touch-backend/tsconfig.json
Normal file
24
types/react-dnd-touch-backend/tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-dnd-touch-backend-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/react-dnd-touch-backend/tslint.json
Normal file
1
types/react-dnd-touch-backend/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user