for example,
is declared in koa-bodyparser.declare module "koa" {
interface Request {
body: {} | null | undefined;
rawBody: {} | null | undefined;
}
}
how can I add possible attributes to body? For example,
interface Imsg {
msg: string
}
I also want to use the declaration file that he has already written. I just want to add a type. How can
Imsg be added to the type declaration of body, and how can I tell that the data received is of type Imsg?