diff --git a/prosemirror-keymap/index.d.ts b/prosemirror-keymap/index.d.ts new file mode 100644 index 0000000000..91d2cbd3d9 --- /dev/null +++ b/prosemirror-keymap/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for prosemirror-keymap 0.18.0 +// Project: https://github.com/ProseMirror/prosemirror-keymap +// Definitions by: David Hahn +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Plugin } from 'prosemirror-state' +import { EditorView } from 'prosemirror-view' + +declare module "prosemirror-keymap" { + export function keymap(bindings: Object): Plugin + export function keydownHandler(bindings: Object): (view: EditorView, event: Event) => boolean + +} \ No newline at end of file diff --git a/prosemirror-keymap/prosemirror-keymap-tests.ts b/prosemirror-keymap/prosemirror-keymap-tests.ts new file mode 100644 index 0000000000..47e5f75633 --- /dev/null +++ b/prosemirror-keymap/prosemirror-keymap-tests.ts @@ -0,0 +1,3 @@ +import * as keymap from 'prosemirror-keymap'; + +keymap.keymap({}); diff --git a/prosemirror-keymap/tsconfig.json b/prosemirror-keymap/tsconfig.json new file mode 100644 index 0000000000..b96daa75b6 --- /dev/null +++ b/prosemirror-keymap/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "prosemirror-keymap-tests.ts" + ] +} \ No newline at end of file