This repository has been archived on 2023-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auth/src/types/KoaContext.ts
2023-04-18 19:35:21 -04:00

13 lines
368 B
TypeScript

import { Context, Request } from 'koa';
interface KoaRequest<RequestBody = any> extends Request {
body?: RequestBody;
}
export interface KoaContext<RequestBody = any, ResponseBody = any> extends Context {
request: KoaRequest<RequestBody>;
body: ResponseBody;
}
export interface KoaResponseContext<ResponseBody> extends KoaContext<any, ResponseBody> {};