From 88c55ad5786bc53f321dab21c42383964a3ad447 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2018 00:04:17 +0800 Subject: [PATCH] [slate-html-serialzier] fix deserialize args type --- types/slate-html-serializer/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/slate-html-serializer/index.d.ts b/types/slate-html-serializer/index.d.ts index a0bd15f186..44af25d36d 100644 --- a/types/slate-html-serializer/index.d.ts +++ b/types/slate-html-serializer/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; -import { BlockProperties, ValueJSON, Value, Node, Mark, Leaf } from 'slate'; +import { BlockProperties, ValueJSON, Value, Node as SlateNode, Mark, Leaf } from 'slate'; export interface Rule { deserialize?: (el: Element, next: (elements: Element[] | NodeList | Array) => any) => any; @@ -30,11 +30,11 @@ export default class Html { protected defaultBlock: BlockProperties; protected parseHtml: (html: string) => HTMLElement; - protected deserializeElements: (elements: HTMLElement[]) => Node[]; + protected deserializeElements: (elements: HTMLElement[]) => SlateNode[]; protected deserializeElement: (element: HTMLElement) => any; - protected deserializeMark: (mark: Mark) => Node[]; + protected deserializeMark: (mark: Mark) => SlateNode[]; - protected serializeNode: (node: Node) => string; + protected serializeNode: (node: SlateNode) => string; protected serializeLeaf: (leaf: Leaf) => string; protected serializeString: (string: string) => string; }