From 169bfe855ea390e6db060c205179a0e898a8ea17 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Sun, 1 Dec 2019 20:18:57 -0500 Subject: [PATCH] fix return type of `withHistory` --- packages/slate-history/src/with-history.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/slate-history/src/with-history.ts b/packages/slate-history/src/with-history.ts index ec7954d23..bcd54d43a 100644 --- a/packages/slate-history/src/with-history.ts +++ b/packages/slate-history/src/with-history.ts @@ -8,7 +8,7 @@ import { HistoryEditor } from './history-editor' * editor as operations are applied to it, using undo and redo stacks. */ -export const withHistory = (editor: Editor): Editor => { +export const withHistory = (editor: Editor): HistoryEditor => { const { apply, exec } = editor editor.history = { undos: [], redos: [] } @@ -113,7 +113,7 @@ export const withHistory = (editor: Editor): Editor => { apply(op) } - return editor + return editor as HistoryEditor } /**