diff --git a/plugins/history.ts b/plugins/history.ts index 934ded5..f96a5a6 100644 --- a/plugins/history.ts +++ b/plugins/history.ts @@ -1,5 +1,5 @@ import { invoke } from "@tauri-apps/api/core"; -import type { HistoryItem } from "~/types/types"; +import type { ContentType, HistoryItem } from "~/types/types"; export default defineNuxtPlugin(() => { return { @@ -37,7 +37,7 @@ export default defineNuxtPlugin(() => { async writeAndPaste(data: { content: string; - contentType: string; + contentType: ContentType; }): Promise { await invoke("write_and_paste", data); }, diff --git a/types/plugins.d.ts b/types/plugins.d.ts new file mode 100644 index 0000000..449f78b --- /dev/null +++ b/types/plugins.d.ts @@ -0,0 +1,8 @@ +import { HistoryItem, ContentType } from './types'; + +declare module '#app' { + interface NuxtApp { + $history: ReturnType['provide']['history']; + $settings: ReturnType['provide']['settings']; + } +} \ No newline at end of file