mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-28 20:20:09 +08:00
17 lines
347 B
TypeScript
17 lines
347 B
TypeScript
import { Command, RawCommands } from '../types'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands {
|
|
command: {
|
|
/**
|
|
* Define a command inline.
|
|
*/
|
|
command: (fn: (props: Parameters<Command>[0]) => boolean) => Command,
|
|
}
|
|
}
|
|
}
|
|
|
|
export const command: RawCommands['command'] = fn => props => {
|
|
return fn(props)
|
|
}
|