1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 18:09:49 +02:00

fix return type of withHistory

This commit is contained in:
Ian Storm Taylor
2019-12-01 20:18:57 -05:00
parent 2ad3dfeef8
commit 169bfe855e

View File

@@ -8,7 +8,7 @@ import { HistoryEditor } from './history-editor'
* editor as operations are applied to it, using undo and redo stacks. * 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 const { apply, exec } = editor
editor.history = { undos: [], redos: [] } editor.history = { undos: [], redos: [] }
@@ -113,7 +113,7 @@ export const withHistory = (editor: Editor): Editor => {
apply(op) apply(op)
} }
return editor return editor as HistoryEditor
} }
/** /**