docs: update types to reflect setting plugin and pluginkey for meta

This commit is contained in:
Nick the Sick 2024-08-07 17:29:58 +02:00
parent c0e631f875
commit 597c78156a
No known key found for this signature in database
GPG Key ID: F575992F156E5BCC

View File

@ -1,3 +1,5 @@
import type { Plugin, PluginKey } from '@tiptap/pm/state'
import { RawCommands } from '../types.js'
declare module '@tiptap/core' {
@ -9,7 +11,7 @@ declare module '@tiptap/core' {
* @param value The value to store.
* @example editor.commands.setMeta('foo', 'bar')
*/
setMeta: (key: string, value: any) => ReturnType,
setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType,
}
}
}