[🔨] Adding PluginRun and AppOpen function types
This commit is contained in:
parent
75375e410c
commit
3c79046eb3
1 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
import { FlowWindow } from './wm'
|
||||
|
||||
export type AppOpenFunction = (data: any) => Promise<FlowWindow>
|
||||
export type PluginRunFunction = (element: HTMLDivElement) => void | Promise<void>
|
||||
|
||||
/* EVENTS */
|
||||
|
||||
export interface AppClosedEvent extends CustomEvent {
|
||||
|
|
@ -46,12 +49,12 @@ export interface Plugins {
|
|||
|
||||
export interface App {
|
||||
meta: AppMeta
|
||||
open: (data: any) => Promise<FlowWindow>
|
||||
open: AppOpenFunction
|
||||
}
|
||||
|
||||
export interface Plugin {
|
||||
meta: PluginMeta
|
||||
run: (element: HTMLDivElement) => void | Promise<void>
|
||||
run: PluginRunFunction
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue