From 8cb7c8d36e7b23b21a77ffeca12599e94954cc68 Mon Sep 17 00:00:00 2001 From: David Hahn Date: Tue, 7 Mar 2017 10:18:45 +0100 Subject: [PATCH] Added typings for prosemirror-keymap 0.18.0 --- prosemirror-keymap/index.d.ts | 13 +++++++++++ .../prosemirror-keymap-tests.ts | 3 +++ prosemirror-keymap/tsconfig.json | 23 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 prosemirror-keymap/index.d.ts create mode 100644 prosemirror-keymap/prosemirror-keymap-tests.ts create mode 100644 prosemirror-keymap/tsconfig.json 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