Skip to content

Commit 1aad11e

Browse files
committed
added an empty namespace in koa-bodyparser.d.ts
Without this, there will be `Module '"koa-bodyparser"' resolves to a non-module entity and cannot be imported using this construct. (2497)` error This solution is found (here)[microsoft/TypeScript#5073]. koa-json's `.d.ts` file has such namespace.
1 parent 00e8cf6 commit 1aad11e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

koa-bodyparser/koa-bodyparser.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@ declare module "koa-bodyparser" {
6060
onerror?: (err: Error, ctx: Koa.Context) => void;
6161
}): { (ctx: Koa.Context, next?: () => any): any };
6262

63+
namespace bodyParser {}
6364
export = bodyParser;
6465
}

0 commit comments

Comments
 (0)