@nuxthub/core
Version:
Build full-stack Nuxt applications on Cloudflare, with zero configuration.
27 lines (26 loc) • 785 B
TypeScript
export interface HubHooks {
'bindings:ready': () => void;
'database:migrations:done': () => void;
}
/**
* Access Hub lifecycle hooks.
*
* @example ```ts
* hubHooks.hook('bindings:ready', () => {
* console.log('Bindings are ready!')
* })
* ```
* @see https://hub.nuxt.com/docs/recipes/hooks#hubhooks
*/
export declare const hubHooks: import("hookable").Hookable<HubHooks, import("hookable").HookKeys<HubHooks>>;
/**
* Run a callback when the NuxtHub environment bindings are set up.
* @param cb The callback to run
* @example ```ts
* onHubReady(() => {
* console.log('Bindings are ready!')
* })
* ```
* @see https://hub.nuxt.com/docs/recipes/hooks#onhubready
*/
export declare function onHubReady(cb: HubHooks['bindings:ready']): (() => void) | undefined;