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

@@ -1,5 +1,5 @@
import { MarkType } from 'prosemirror-model'
import { AnyObject, Command, Commands } from '../types'
import { AnyObject, Command, RawCommands } from '../types'
import getMarkType from '../helpers/getMarkType'
import isMarkActive from '../helpers/isMarkActive'
@@ -14,7 +14,7 @@ declare module '@tiptap/core' {
}
}
export const toggleMark: Commands['toggleMark'] = (typeOrName, attributes = {}) => ({ state, commands }) => {
export const toggleMark: RawCommands['toggleMark'] = (typeOrName, attributes = {}) => ({ state, commands }) => {
const type = getMarkType(typeOrName, state.schema)
const isActive = isMarkActive(state, type, attributes)