tiptap/packages/core/src/commands/selectTextblockStart.ts
Ben Asher e97630c639
Require file extensions for imports and exports (#4001)
* Require .js endings

* add extension alias for cypress to resolve ts files with js endings
2023-06-30 21:03:49 +02:00

21 lines
597 B
TypeScript

// @ts-ignore
// TODO: add types to @types/prosemirror-commands
import { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands'
import { RawCommands } from '../types.js'
declare module '@tiptap/core' {
interface Commands<ReturnType> {
selectTextblockStart: {
/**
* Moves the cursor to the start of current text block.
*/
selectTextblockStart: () => ReturnType
}
}
}
export const selectTextblockStart: RawCommands['selectTextblockStart'] = () => ({ state, dispatch }) => {
return originalSelectTextblockStart(state, dispatch)
}