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 } /**