fix type errors of MkMisskeyFlavoredMarkdown.vue

This commit is contained in:
Lhcfl 2024-04-04 16:13:56 +08:00
parent 85e42f7c27
commit 3902b82470
4 changed files with 13 additions and 6 deletions

View File

@ -32,7 +32,7 @@ const props = defineProps<{
emoji: string;
normal?: boolean;
noStyle?: boolean;
customEmojis?: entities.CustomEmoji[];
customEmojis?: entities.EmojiLite[];
isReaction?: boolean;
}>();

View File

@ -19,14 +19,15 @@
import {} from "vue";
import MfmCore from "@/components/mfm";
import { defaultStore } from "@/store";
import type { entities } from "firefish-js";
const props = withDefaults(
withDefaults(
defineProps<{
text: string;
plain?: boolean;
nowrap?: boolean;
author?: any;
customEmojis?: any;
author?: entities.User;
customEmojis?: entities.EmojiLite[];
isNote?: boolean;
advancedMfm?: boolean;
lang?: string;
@ -34,7 +35,6 @@ const props = withDefaults(
{
plain: false,
nowrap: false,
author: null,
isNote: true,
},
);

View File

@ -1,6 +1,6 @@
import { defineComponent, h } from "vue";
import * as mfm from "mfm-js";
import type { VNode } from "vue";
import type { VNode, PropType } from "vue";
import MkUrl from "@/components/global/MkUrl.vue";
import MkLink from "@/components/MkLink.vue";
import MkMention from "@/components/MkMention.vue";
@ -14,6 +14,7 @@ import MkA from "@/components/global/MkA.vue";
import { host } from "@/config";
import { reducedMotion } from "@/scripts/reduced-motion";
import { defaultStore } from "@/store";
import type { entities } from "firefish-js";
export default defineComponent({
props: {
@ -38,6 +39,7 @@ export default defineComponent({
default: null,
},
customEmojis: {
type: Array as PropType<entities.EmojiLite[]>,
required: false,
},
isNote: {

View File

@ -321,6 +321,11 @@ export type CustomEmoji = {
aliases: string[];
};
export type EmojiLite = {
name: string;
url: string;
};
export type LiteInstanceMetadata = {
maintainerName: string | null;
maintainerEmail: string | null;