[🔨] Adding PluginRun and AppOpen function types

This commit is contained in:
ThinLiquid 2023-11-23 13:19:05 +00:00 committed by GitHub
parent 75375e410c
commit 3c79046eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 */