After examining this definition file, it seems that extending the exported Request
interface is not possible due to the namespace not being exported. If anyone has any insights or suggestions on how to achieve this, I would greatly appreciate it :)
I made an attempt in my index.d.ts
, but unfortunately, it did not work:
declare module 'koa' {
namespace Koa {
export interface Request {
body: string;
}
}
}
Many thanks, Robin