tiptap/packages/core/src/commands/command.ts
2021-02-16 18:39:37 +01:00

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)
}