Skip to content

Commit

Permalink
fix: add missing attributes in extension-link
Browse files Browse the repository at this point in the history
Despite `rel` and `class` already being defined as an attribute in `addAttributes()`, the interface was missing these two particular attributes so it wasn't accessible when using TypeScript without workarounds.
  • Loading branch information
Manueljlin committed Sep 8, 2023
1 parent 7832b96 commit b20e7b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/extension-link/src/link.ts
Expand Up @@ -46,11 +46,11 @@ declare module '@tiptap/core' {
/**
* Set a link mark
*/
setLink: (attributes: { href: string; target?: string | null }) => ReturnType
setLink: (attributes: { href: string; target?: string | null; rel?: string | null; class?: string | null }) => ReturnType
/**
* Toggle a link mark
*/
toggleLink: (attributes: { href: string; target?: string | null }) => ReturnType
toggleLink: (attributes: { href: string; target?: string | null; rel?: string | null; class?: string | null }) => ReturnType
/**
* Unset a link mark
*/
Expand Down

0 comments on commit b20e7b6

Please sign in to comment.