fix(components): add type annotations in MentionList.vue

- Import PropType and MentionNodeAttrs
- Add MentionItem interface
- Add PropType for items array and command function
This commit is contained in:
kolaente
2025-11-22 16:36:28 +01:00
parent 30101308ea
commit 642cd08b9d

View File

@@ -37,15 +37,25 @@
<script lang="ts">
/* eslint-disable vue/component-api-style */
import type {PropType} from 'vue'
import type {MentionNodeAttrs} from '@tiptap/extension-mention'
interface MentionItem extends MentionNodeAttrs {
id: string
label: string
username: string
avatarUrl: string
}
export default {
props: {
items: {
type: Array,
type: Array as PropType<MentionItem[]>,
required: true,
},
command: {
type: Function,
type: Function as PropType<(item: MentionItem) => void>,
required: true,
},
},