diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index c79b945a5b..48dc0db0be 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -5,9 +5,10 @@ // Jan Löbel // Patrick Sachs // Brandon Shelton +// Francesco Agnoletto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Mark, Node, Block, Change, Schema, Value, Stack } from 'slate'; +import { Mark, Node, Block, Inline, Change, Schema, Value, Stack } from 'slate'; import * as Immutable from 'immutable'; import * as React from 'react'; @@ -33,7 +34,7 @@ export interface RenderNodeProps { editor: Editor; isSelected: boolean; key: string; - node: Node; + node: Block | Inline; parent: Node; } diff --git a/types/slate-react/slate-react-tests.tsx b/types/slate-react/slate-react-tests.tsx index d8c8ea0073..4b6e6429c0 100644 --- a/types/slate-react/slate-react-tests.tsx +++ b/types/slate-react/slate-react-tests.tsx @@ -11,8 +11,6 @@ class MyPlugin implements Plugin { return
; case "inline": return Hello world; - case "text": - return

Hello world

; default: return undefined; }