From 3c79046eb38ac02d0d5af3ab8bf390892e045425 Mon Sep 17 00:00:00 2001 From: ThinLiquid Date: Thu, 23 Nov 2023 13:19:05 +0000 Subject: [PATCH] =?UTF-8?q?[=F0=9F=94=A8]=20Adding=20PluginRun=20and=20App?= =?UTF-8?q?Open=20function=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 */