import { ModuleInfo } from '../module'; import { App } from '../'; export type StartupTaskName = string; /** * StartupTask is a contained stage in the boot up of a tendril application. * * These are used ton configure internals such as middleware, logging, routing, * database connections etc. */ export interface StartupTask { /** * name of the StartupTask. * * This will be displayed in the terminal. */ name: StartupTaskName; /** * execute the task. */ execute(module: ModuleInfo): Promise; } /** * BaseStartupTask providing boilerplate for implementors. */ export declare abstract class BaseStartupTask implements StartupTask { app: App; abstract name: StartupTaskName; constructor(app: App); abstract execute(m: ModuleInfo): Promise; } /** * StartupManager combines the execution of all the tasks into a single * location. */ export declare class StartupManager { tasks: (app: App) => StartupTask[]; constructor(tasks: (app: App) => StartupTask[]); name: string; run(app: App): Promise; }