From 96bb2e188dcd3f71d71ee02b2579724c5748962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Tue, 16 Feb 2021 22:59:45 +0100 Subject: [PATCH] fix addKeyboardShortcuts type --- packages/core/src/Extension.ts | 3 ++- packages/core/src/Mark.ts | 3 ++- packages/core/src/Node.ts | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/core/src/Extension.ts b/packages/core/src/Extension.ts index f703c57b1..6f3594c59 100644 --- a/packages/core/src/Extension.ts +++ b/packages/core/src/Extension.ts @@ -1,4 +1,5 @@ import { Plugin, Transaction } from 'prosemirror-state' +import { Command as ProseMirrorCommand } from 'prosemirror-commands' import { InputRule } from 'prosemirror-inputrules' import { Editor } from './Editor' import mergeDeep from './utilities/mergeDeep' @@ -37,7 +38,7 @@ export interface ExtensionConfig { options: Options, editor: Editor, }) => { - [key: string]: any + [key: string]: ProseMirrorCommand, }, /** diff --git a/packages/core/src/Mark.ts b/packages/core/src/Mark.ts index df8a1a002..04e19a816 100644 --- a/packages/core/src/Mark.ts +++ b/packages/core/src/Mark.ts @@ -5,6 +5,7 @@ import { MarkType, } from 'prosemirror-model' import { Plugin, Transaction } from 'prosemirror-state' +import { Command as ProseMirrorCommand } from 'prosemirror-commands' import { InputRule } from 'prosemirror-inputrules' import { ExtensionConfig } from './Extension' import mergeDeep from './utilities/mergeDeep' @@ -80,7 +81,7 @@ export interface MarkConfig extends Overwrite { - [key: string]: any + [key: string]: ProseMirrorCommand, }, /** diff --git a/packages/core/src/Node.ts b/packages/core/src/Node.ts index 42ced9f6d..08c1d2568 100644 --- a/packages/core/src/Node.ts +++ b/packages/core/src/Node.ts @@ -1,10 +1,10 @@ -// @ts-nocheck import { DOMOutputSpec, NodeSpec, Node as ProseMirrorNode, NodeType, } from 'prosemirror-model' +import { Command as ProseMirrorCommand } from 'prosemirror-commands' import { Plugin, Transaction } from 'prosemirror-state' import { InputRule } from 'prosemirror-inputrules' import { ExtensionConfig } from './Extension' @@ -138,8 +138,7 @@ export interface NodeConfig extends Overwrite { - // [key: string]: any - [key: string]: () => boolean + [key: string]: ProseMirrorCommand, }, /** @@ -292,6 +291,8 @@ export class Node { onFocus: null, onBlur: null, onDestroy: null, + // TODO: remove, + tableRole: null, } options!: Options