11 lines
436 B
TypeScript
11 lines
436 B
TypeScript
import { Express, Router } from "express";
|
|
export default abstract class ApplicationComponent<T> {
|
|
private val?;
|
|
abstract start(app: Express, router: Router): Promise<void>;
|
|
abstract stop(): Promise<void>;
|
|
protected export(val: T): void;
|
|
import(): T;
|
|
protected prepare(name: string, prepare: () => Promise<void>): Promise<void>;
|
|
protected close(thingName: string, thing: any, fn: Function): Promise<void>;
|
|
}
|