mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 09:25:29 +08:00

* Require .js endings * add extension alias for cypress to resolve ts files with js endings
19 lines
420 B
TypeScript
19 lines
420 B
TypeScript
import { exitCode as originalExitCode } from '@tiptap/pm/commands'
|
|
|
|
import { RawCommands } from '../types.js'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands<ReturnType> {
|
|
exitCode: {
|
|
/**
|
|
* Exit from a code block.
|
|
*/
|
|
exitCode: () => ReturnType
|
|
}
|
|
}
|
|
}
|
|
|
|
export const exitCode: RawCommands['exitCode'] = () => ({ state, dispatch }) => {
|
|
return originalExitCode(state, dispatch)
|
|
}
|