diff --git a/src/stores/plugin.ts b/src/stores/plugin.ts index f808483eb..0b1f35bf3 100644 --- a/src/stores/plugin.ts +++ b/src/stores/plugin.ts @@ -1,12 +1,16 @@ import { defineStore } from "pinia"; +import type { Plugin } from "@halo-dev/api-client"; + +interface PluginStoreState { + plugins: Plugin[]; +} export const usePluginStore = defineStore("plugin", { - state: () => ({ + state: (): PluginStoreState => ({ plugins: [], }), actions: { - registerPlugin(plugin) { - // @ts-ignore + registerPlugin(plugin: Plugin) { this.plugins.push(plugin); }, },