From c50bed52f4d74d7fb4ae9acfcdab66bde4ff2b14 Mon Sep 17 00:00:00 2001 From: Dominik <6538827+bdbch@users.noreply.github.com> Date: Mon, 27 Feb 2023 21:23:30 +0100 Subject: [PATCH] fix: update typings for node view decorations (#3783) * fix: update typings for node view decorations * fix(core): update types for NodeView * fix(core): declare props.decorations as decorationWithType --- src/ReactNodeViewRenderer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ReactNodeViewRenderer.tsx b/src/ReactNodeViewRenderer.tsx index d4cfc969be8..a48b79d2fa9 100644 --- a/src/ReactNodeViewRenderer.tsx +++ b/src/ReactNodeViewRenderer.tsx @@ -1,4 +1,5 @@ import { + DecorationWithType, NodeView, NodeViewProps, NodeViewRenderer, @@ -124,7 +125,7 @@ class ReactNodeView extends NodeView< return this.contentDOMElement } - update(node: ProseMirrorNode, decorations: Decoration[]) { + update(node: ProseMirrorNode, decorations: DecorationWithType[]) { const updateProps = (props?: Record) => { this.renderer.updateProps(props) }