Files
speckle-connectors-dui/lib/bindings/definitions/IBinding.ts
T
Kristaps Fabians Geikins f2d7493c2a chore: move package over from speckle-server (#2)
* stuff copied over, but aint workin

* various fixes

* vscode settings

* trigger deploy

* trigger deploy
2025-05-13 16:18:45 +03:00

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
}