chore: Upgrade all of prosemirror (#5366)
Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
import { EditorState, Transaction } from "prosemirror-state";
|
||||
import { Dispatch } from "../types";
|
||||
import { Command, Transaction } from "prosemirror-state";
|
||||
|
||||
export default function chainTransactions(
|
||||
...commands: ((state: EditorState, dispatch?: Dispatch) => boolean)[]
|
||||
) {
|
||||
return (state: EditorState, dispatch?: Dispatch): boolean => {
|
||||
export default function chainTransactions(...commands: Command[]): Command {
|
||||
return (state, dispatch): boolean => {
|
||||
const dispatcher = (tr: Transaction): void => {
|
||||
state = state.apply(tr);
|
||||
dispatch?.(tr);
|
||||
|
||||
Reference in New Issue
Block a user