fix(components): add type annotations in setLinkInEditor.ts

- Import Editor type from @tiptap/core
- Add DOMRect type for pos parameter
- Add Editor | null | undefined type for editor parameter
This commit is contained in:
kolaente
2025-11-22 16:31:49 +01:00
parent d46afda42b
commit ddf018e791

View File

@@ -1,6 +1,7 @@
import type {Editor} from '@tiptap/core'
import inputPrompt from '@/helpers/inputPrompt'
export async function setLinkInEditor(pos, editor) {
export async function setLinkInEditor(pos: DOMRect, editor: Editor | null | undefined) {
const previousUrl = editor?.getAttributes('link').href || ''
const url = await inputPrompt(pos, previousUrl)