UNPKG

tit

Version:

A simple api framework by use TypeScript & Node.js

43 lines 1.03 kB
import pino, { Logger } from 'pino'; import koa from 'koa'; import koaRouter from '@koa/router'; import { IController, IExtend } from '.'; declare module 'koa' { interface Context { app: Application; config: IConfig; } } export interface IConfig { port: number; log: { level: pino.Level; }; } export interface IScope { } export type ApplicationOpts = { koaJson?: { pretty?: boolean | undefined; param?: string | undefined; spaces?: number | undefined; }; pino?: Logger; }; export declare class Application extends koa { private opts?; rootScope: IScope; readonly config: IConfig; readonly logger: Logger; rootRouter: koaRouter<koa.DefaultState, koa.DefaultContext>; _controllers: { name: string; module: IController; }[]; _extends: { name: string; module: IExtend; }[]; constructor(config: IConfig, opts?: ApplicationOpts | undefined); } //# sourceMappingURL=application.d.ts.map