mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Add type definitions for prosemirror-dropcursor
This commit is contained in:
20
types/prosemirror-dropcursor/index.d.ts
vendored
Normal file
20
types/prosemirror-dropcursor/index.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// Type definitions for prosemirror-dropcursor 1.0
|
||||
// Project: https://github.com/ProseMirror/prosemirror-dropcursor
|
||||
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>
|
||||
// David Hahn <https://github.com/davidka>
|
||||
// Daniil Dotsev <https://github.com/dddotsev>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Plugin } from 'prosemirror-state';
|
||||
|
||||
/**
|
||||
* Create a plugin that, when added to a ProseMirror instance,
|
||||
* causes a decoration to show up at the drop position when something
|
||||
* is dragged over the editor.
|
||||
*
|
||||
* @param options These options are supported:
|
||||
* @param options.color The color of the cursor. Defaults to `black`.
|
||||
* @param options.width The precise width of the cursor in pixels. Defaults to 1.
|
||||
*/
|
||||
export function dropCursor(options?: { color?: string | null, width?: number | null }): Plugin;
|
||||
@@ -0,0 +1,4 @@
|
||||
import { dropCursor } from 'prosemirror-dropcursor';
|
||||
import { Plugin } from 'prosemirror-state';
|
||||
|
||||
const dropCursorPlugin: Plugin = dropCursor();
|
||||
24
types/prosemirror-dropcursor/tsconfig.json
Normal file
24
types/prosemirror-dropcursor/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",
|
||||
"prosemirror-dropcursor-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/prosemirror-dropcursor/tslint.json
Normal file
3
types/prosemirror-dropcursor/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user