diff --git a/src/types.ts b/src/types.ts index d3da740..0e17e43 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,8 @@ import { FlowWindow } from './wm' +export type AppOpenFunction = (data: any) => Promise +export type PluginRunFunction = (element: HTMLDivElement) => void | Promise + /* EVENTS */ export interface AppClosedEvent extends CustomEvent { @@ -46,12 +49,12 @@ export interface Plugins { export interface App { meta: AppMeta - open: (data: any) => Promise + open: AppOpenFunction } export interface Plugin { meta: PluginMeta - run: (element: HTMLDivElement) => void | Promise + run: PluginRunFunction } /* MISC */