UNPKG

@interopio/browser-worker

Version:

IO Connect Browser service worker module

27 lines (22 loc) 916 B
/* eslint-disable @typescript-eslint/no-explicit-any */ export interface IOConnectNotificationClickHandler { handler: (event: Event, isPlatformOpened: boolean) => Promise<void>; action: string; } export interface WebWorkerConfig { platform?: { url?: string; openIfMissing?: boolean; }; notifications?: { defaultClick?: (event: Event, isPlatformOpened: boolean) => Promise<void>; actionClicks?: IOConnectNotificationClickHandler[]; }; } export type IOConnectWebWorkerFactoryFunction = (config?: WebWorkerConfig) => void; export type OpenCorePlatform = (url: string) => Promise<void>; export type RaiseIONotification = (settings: any) => Promise<void>; declare const IOWorkerFactory: IOConnectWebWorkerFactoryFunction; export const openBrowserPlatform: OpenCorePlatform; export const raiseIONotification: RaiseIONotification; export default IOWorkerFactory;