@types/prosemirror-commands
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -15,7 +15,15 @@ // Type definitions for prosemirror-commands 1.0 | ||
/** | ||
* A command function takes an editor state, *optionally* a `dispatch` | ||
* function that it can use to dispatch a transaction and optionally | ||
* an `EditorView` instance. It should return a boolean that indicates | ||
* whether it could perform any action. When no `dispatch` callback is | ||
* passed, the command should do a 'dry run', determining whether it is | ||
* applicable, but not actually doing anything. | ||
*/ | ||
export interface Command<S extends Schema = any> { | ||
( | ||
state: EditorState<S>, | ||
dispatch: (tr: Transaction<S>) => void, | ||
view: EditorView<S> | ||
dispatch?: (tr: Transaction<S>) => void, | ||
view?: EditorView<S> | ||
): boolean; | ||
@@ -222,7 +230,3 @@ } | ||
*/ | ||
export function chainCommands<S extends Schema = any>( | ||
...commands: Array< | ||
(p1: EditorState<S>, p2?: (tr: Transaction<S>) => void, p3?: EditorView<S>) => boolean | ||
> | ||
): (p1: EditorState<S>, p2?: (tr: Transaction<S>) => void, p3?: EditorView<S>) => boolean; | ||
export function chainCommands<S extends Schema = any>(...commands: Array<Command<S>>): Command<S>; | ||
/** | ||
@@ -229,0 +233,0 @@ * A basic keymap containing bindings not specific to any schema. |
{ | ||
"name": "@types/prosemirror-commands", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "TypeScript definitions for prosemirror-commands", | ||
@@ -46,4 +46,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "d02c76865449b3ed563613819bd4dae6ae717573c696a6b73791eb45fd7193f2", | ||
"typesPublisherContentHash": "7121624e443402ae2583e2ba2ef61aedea878ebfe983de1402e260a518a94441", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 08 Jul 2020 19:08:53 GMT | ||
* Last updated: Fri, 10 Jul 2020 14:09:10 GMT | ||
* Dependencies: [@types/prosemirror-model](https://npmjs.com/package/@types/prosemirror-model), [@types/prosemirror-state](https://npmjs.com/package/@types/prosemirror-state), [@types/prosemirror-view](https://npmjs.com/package/@types/prosemirror-view) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13357
251