add Commands interface
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { selectAll as originalSelectAll } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
import { Command, Commands } from '../types'
|
||||
|
||||
/**
|
||||
* Select the whole document.
|
||||
*/
|
||||
export const selectAll = (): Command => ({ state, dispatch }) => {
|
||||
export const selectAll: Commands['selectAll'] = () => ({ state, dispatch }) => {
|
||||
return originalSelectAll(state, dispatch)
|
||||
}
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands {
|
||||
selectAll: () => Command,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user