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,6 +1,6 @@
import { lift as originalLift } from 'prosemirror-commands'
import { NodeType } from 'prosemirror-model'
import { Command, Commands, AnyObject } from '../types'
import { Command, RawCommands, AnyObject } from '../types'
import isNodeActive from '../helpers/isNodeActive'
import getNodeType from '../helpers/getNodeType'
@@ -15,7 +15,7 @@ declare module '@tiptap/core' {
}
}
export const lift: Commands['lift'] = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
export const lift: RawCommands['lift'] = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
const type = getNodeType(typeOrName, state.schema)
const isActive = isNodeActive(state, type, attributes)