Skip to content

Commit

Permalink
fix: add missing attributes in extension-link (#4429)
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 authored and bdbch committed Sep 14, 2023
1 parent a13a8df commit 74b6444
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 74b6444

Please sign in to comment.