Skip to content

Commit

Permalink
added an empty namespace in koa-bodyparser.d.ts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
liushigit committed Apr 14, 2016
1 parent 00e8cf6 commit 1aad11e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions koa-bodyparser/koa-bodyparser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 1aad11e

Please sign in to comment.