mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
fix return type of withHistory
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user