f2d7493c2a
* stuff copied over, but aint workin * various fixes * vscode settings * trigger deploy * trigger deploy
25 lines
688 B
TypeScript
25 lines
688 B
TypeScript
import type { ToastNotification } from '@speckle/ui-components'
|
|
|
|
/**
|
|
* Basic interface scaffolding two standard method.
|
|
*/
|
|
export interface IBinding<T> {
|
|
/**
|
|
* Events sent over from the host application.
|
|
*/
|
|
on: <E extends keyof T>(event: E, callback: T[E]) => void
|
|
/**
|
|
* If possible, opens up dev tools from the embedded browser window.
|
|
* Currently needed for CefSharp, as right click inspect doesn't exist.
|
|
*/
|
|
showDevTools: () => Promise<void>
|
|
/**
|
|
* Opens an url in the OS's default browser.
|
|
*/
|
|
openUrl: (url: string) => Promise<void>
|
|
}
|
|
|
|
export interface IBindingSharedEvents {
|
|
setGlobalNotification: (toastNotification: ToastNotification) => void
|
|
}
|