UNPKG

@pixso/plugin-typings

Version:

Typings for the Pixso Plugin API

18 lines (15 loc) 636 B
declare type HostArgFreeEventType = 'mounted' | 'beforeunmount' interface HostAPI { on(type: HostArgFreeEventType, callback: () => void): void once(type: HostArgFreeEventType, callback: () => void): void off(type: HostArgFreeEventType, callback: () => void): void showPluginDockAsync(): Promise<void> sandbox: SandboxAPI } interface SandboxAPI { postMessage: (message: unknown) => void onmessage: (message: any) => void | undefined on: (event: 'message', cb: (message: any) => void) => void once: (event: 'message', cb: (message: any) => void) => void off: (event: 'message', cb: (message: any) => void) => void }