Flowtyping

This commit is contained in:
Tom Moor
2017-12-03 11:13:35 -08:00
parent 15e8e50601
commit 802f6e6594
23 changed files with 168 additions and 189 deletions

View File

@ -16,14 +16,14 @@ import {
Heading6,
} from './components/Heading';
import Paragraph from './components/Paragraph';
import type { props } from 'slate-prop-types';
import type { SlateNodeProps } from './types';
type Options = {
onInsertImage: *,
};
export default function createRenderNode({ onChange, onInsertImage }: Options) {
return function renderNode(props: props) {
return function renderNode(props: SlateNodeProps) {
const { attributes } = props;
switch (props.node.type) {