nest-koa-adapter
Version:
Koa HTTP adapter for Nest.js
9 lines • 584 B
TypeScript
import * as Koa from 'koa';
import { NestMiddleware } from '@nestjs/common';
export type NestKoaFunctionalMiddleware = (req: Koa.Request, res: Koa.Response, next: Koa.Next) => Promise<any> | any;
export interface NestKoaMiddleware {
use(req: Koa.Request, res: Koa.Response, next: Koa.Next): Promise<any> | any;
}
export declare const koaToNestMiddleware: (middleware: Koa.Middleware<any, any>) => NestKoaFunctionalMiddleware;
export declare const nestToKoaMiddleware: (middleware: NestMiddleware["use"]) => Koa.Middleware<any, any>;
//# sourceMappingURL=NestKoaMiddleware.d.ts.map