@types/prosemirror-keymap
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,6 +7,8 @@ // Type definitions for prosemirror-keymap 1.0 | ||
// Patrick Simmelbauer <https://github.com/patsimm> | ||
// Mike Morearty <https://github.com/mmorearty> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
// TypeScript Version: 2.8 | ||
import { Plugin } from 'prosemirror-state'; | ||
import { Schema } from 'prosemirror-model'; | ||
import { EditorState, Plugin, Transaction } from 'prosemirror-state'; | ||
import { EditorView } from 'prosemirror-view'; | ||
@@ -45,3 +47,10 @@ | ||
*/ | ||
export function keymap(bindings: { [key: string]: any }): Plugin; | ||
export function keymap<S extends Schema = any>(bindings: { | ||
[key: string]: ( | ||
state: EditorState<S>, | ||
dispatch: (tr: Transaction<S>) => void, | ||
view: EditorView<S> | ||
) => boolean; | ||
}): Plugin; | ||
/** | ||
@@ -52,4 +61,8 @@ * Given a set of bindings (using the same format as | ||
*/ | ||
export function keydownHandler(bindings: { | ||
[key: string]: any; | ||
}): (view: EditorView, event: Event) => boolean; | ||
export function keydownHandler<S extends Schema = any>(bindings: { | ||
[key: string]: ( | ||
state: EditorState<S>, | ||
dispatch: (tr: Transaction<S>) => void, | ||
view: EditorView<S> | ||
) => boolean; | ||
}): (view: EditorView, event: KeyboardEvent) => boolean; |
{ | ||
"name": "@types/prosemirror-keymap", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "TypeScript definitions for prosemirror-keymap", | ||
@@ -26,16 +26,24 @@ "license": "MIT", | ||
"githubUsername": "patsimm" | ||
}, | ||
{ | ||
"name": "Mike Morearty", | ||
"url": "https://github.com/mmorearty", | ||
"githubUsername": "mmorearty" | ||
} | ||
], | ||
"main": "", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/prosemirror-keymap" | ||
}, | ||
"scripts": {}, | ||
"dependencies": { | ||
"@types/prosemirror-model": "*", | ||
"@types/prosemirror-state": "*", | ||
"@types/prosemirror-view": "*" | ||
}, | ||
"typesPublisherContentHash": "dc44666b1a308ebff495db8e45e234f7f40c193e6c7b3a2a1433a2f2e6ded916", | ||
"typeScriptVersion": "2.3" | ||
"typesPublisherContentHash": "bc42f512c948a827845cd29fbfbe821fa901a341bdde1d5af00d9f3ad81e8e44", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -8,10 +8,10 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prosemirror-keymap | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prosemirror-keymap. | ||
Additional Details | ||
* Last updated: Fri, 20 Apr 2018 17:40:53 GMT | ||
* Dependencies: prosemirror-state, prosemirror-view | ||
### Additional Details | ||
* Last updated: Thu, 21 May 2020 06:14:58 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) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Bradley Ayers <https://github.com/bradleyayers>, David Hahn <https://github.com/davidka>, Tim Baumann <https://github.com/timjb>, Patrick Simmelbauer <https://github.com/patsimm>. | ||
These definitions were written by [Bradley Ayers](https://github.com/bradleyayers), [David Hahn](https://github.com/davidka), [Tim Baumann](https://github.com/timjb), [Patrick Simmelbauer](https://github.com/patsimm), and [Mike Morearty](https://github.com/mmorearty). |
Sorry, the diff of this file is not supported yet
6288
62
3
+ Added@types/prosemirror-model@*
+ Added@types/prosemirror-model@1.17.0(transitive)