From 7437a9ab3aab71acaae2db30f627f1d021dcbc62 Mon Sep 17 00:00:00 2001 From: liushigit Date: Thu, 14 Apr 2016 15:53:39 +0800 Subject: [PATCH] added an empty namespace in koa-bodyparser.d.ts (#8979) 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)[https://github.com/Microsoft/TypeScript/issues/5073]. koa-json's `.d.ts` file has such namespace. --- koa-bodyparser/koa-bodyparser.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/koa-bodyparser/koa-bodyparser.d.ts b/koa-bodyparser/koa-bodyparser.d.ts index 4168832199..f8e1b25aae 100644 --- a/koa-bodyparser/koa-bodyparser.d.ts +++ b/koa-bodyparser/koa-bodyparser.d.ts @@ -60,5 +60,6 @@ declare module "koa-bodyparser" { onerror?: (err: Error, ctx: Koa.Context) => void; }): { (ctx: Koa.Context, next?: () => any): any }; + namespace bodyParser {} export = bodyParser; }