mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Fix RenderNodeProps to only accept Block | Inline as node
https://github.com/ianstormtaylor/slate/blob/8dd919dc3457c62ea2aa72f31b83faf42cbaba72/packages/slate-react/src/plugins/react.js#L73
This commit is contained in:
Vendored
+3
-2
@@ -5,9 +5,10 @@
|
||||
// Jan Löbel <https://github.com/JanLoebel>
|
||||
// Patrick Sachs <https://github.com/PatrickSachs>
|
||||
// Brandon Shelton <https://github.com/YangusKhan>
|
||||
// Francesco Agnoletto <https://github.com/Kornil>
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ class MyPlugin implements Plugin {
|
||||
return <div id="slate-block-test"/>;
|
||||
case "inline":
|
||||
return <span id="slate-inline-test">Hello world</span>;
|
||||
case "text":
|
||||
return <p id="slate-text-test">Hello world</p>;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user