diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index edcc529dbe..3d6d0e40df 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -7,6 +7,7 @@ // Brandon Shelton // Irwan Fario Subastian // Sebastian Greaves +// Francesco Agnoletto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import { @@ -14,6 +15,8 @@ import { Editor as Controller, Mark, Node, + Block, + Inline, Operations, Schema, Stack, @@ -40,14 +43,15 @@ export interface RenderMarkProps { } export interface RenderNodeProps { - attributes: RenderAttributes; - children: React.ReactNode; - editor: Controller; - isFocused: boolean; - isSelected: boolean; - node: Node; - parent: Node; - readOnly: boolean; + attributes: RenderAttributes; + children: React.ReactNode; + editor: Controller; + isFocused: boolean; + isSelected: boolean; + key: string; + node: Block | Inline; + parent: Node; + readOnly: boolean; } export interface RenderPlaceholderProps { diff --git a/types/slate-react/slate-react-tests.tsx b/types/slate-react/slate-react-tests.tsx index 76ecb5c579..d8ef3b29be 100644 --- a/types/slate-react/slate-react-tests.tsx +++ b/types/slate-react/slate-react-tests.tsx @@ -12,8 +12,6 @@ class MyPlugin implements Plugin { return
; case "inline": return Hello world; - case "text": - return

Hello world

; default: return undefined; }