[🔨] 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'
|
import { FlowWindow } from './wm'
|
||||||
|
|
||||||
|
export type AppOpenFunction = (data: any) => Promise<FlowWindow>
|
||||||
|
export type PluginRunFunction = (element: HTMLDivElement) => void | Promise<void>
|
||||||
|
|
||||||
/* EVENTS */
|
/* EVENTS */
|
||||||
|
|
||||||
export interface AppClosedEvent extends CustomEvent {
|
export interface AppClosedEvent extends CustomEvent {
|
||||||
|
|
@ -46,12 +49,12 @@ export interface Plugins {
|
||||||
|
|
||||||
export interface App {
|
export interface App {
|
||||||
meta: AppMeta
|
meta: AppMeta
|
||||||
open: (data: any) => Promise<FlowWindow>
|
open: AppOpenFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Plugin {
|
export interface Plugin {
|
||||||
meta: PluginMeta
|
meta: PluginMeta
|
||||||
run: (element: HTMLDivElement) => void | Promise<void>
|
run: PluginRunFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MISC */
|
/* MISC */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue