UNPKG

@mojojs/core

Version:

Real-time web framework

29 lines (28 loc) 1.08 kB
import type { MojoApp } from './types.js'; import { AsyncHooks } from '@mojojs/util'; /** * Hook class. */ export declare class Hooks extends AsyncHooks { _lifecycleHookScore: number; /** * Run `command:before` hook with dependencies. Note that this method is EXPERIMENTAL and might change without * warning! */ commandBefore(app: MojoApp, commandArgs: string[]): Promise<any>; /** * Run `command:after` hook with dependencies. Note that this method is EXPERIMENTAL and might change without * warning! */ commandAfter(app: MojoApp, commandArgs: string[]): Promise<void>; /** * Run `server:start` hook with dependencies. Note that this method is EXPERIMENTAL and might change without warning! */ serverStart(app: MojoApp): Promise<void>; /** * Run `server:stop` hook with dependencies. Note that this method is EXPERIMENTAL and might change without warning! */ serverStop(app: MojoApp): Promise<void>; _appStart(app: MojoApp): Promise<void>; _appStop(app: MojoApp): Promise<void>; }