rename Commands to RawCommands

This commit is contained in:
Philipp Kühn
2021-02-16 18:36:37 +01:00
parent 381bc0ce49
commit a705134998
51 changed files with 108 additions and 110 deletions

View File

@@ -2,7 +2,7 @@ import { NodeType } from 'prosemirror-model'
import getNodeType from '../helpers/getNodeType'
import {
Command,
Commands,
RawCommands,
Range,
AnyObject,
} from '../types'
@@ -18,7 +18,7 @@ declare module '@tiptap/core' {
}
}
export const replaceRange: Commands['replaceRange'] = (range, typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {
export const replaceRange: RawCommands['replaceRange'] = (range, typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {
const type = getNodeType(typeOrName, state.schema)
const { from, to } = range
const $from = tr.doc.resolve(from)