diff --git a/packages/core/src/commands/first.ts b/packages/core/src/commands/first.ts index fe4f27b6..6bd33368 100644 --- a/packages/core/src/commands/first.ts +++ b/packages/core/src/commands/first.ts @@ -1,4 +1,4 @@ -import { Command, RawCommands } from '../types' +import { Command, CommandProps, RawCommands } from '../types' declare module '@tiptap/core' { interface Commands { @@ -6,7 +6,7 @@ declare module '@tiptap/core' { /** * Runs one command after the other and stops at the first which returns true. */ - first: (commands: Command[] | ((props: Parameters[0]) => Command[])) => ReturnType, + first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType, } } } diff --git a/packages/core/src/commands/forEach.ts b/packages/core/src/commands/forEach.ts index 5b383ac0..5d95b40e 100644 --- a/packages/core/src/commands/forEach.ts +++ b/packages/core/src/commands/forEach.ts @@ -1,4 +1,4 @@ -import { Command, RawCommands } from '../types' +import { CommandProps, RawCommands } from '../types' declare module '@tiptap/core' { interface Commands { @@ -10,7 +10,7 @@ declare module '@tiptap/core' { items: T[], fn: ( item: T, - props: Parameters[0] & { + props: CommandProps & { index: number, }, ) => boolean,