Skip to content

Commit

Permalink
fix(core): fix typing issue for koa-bodyparser
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jun 12, 2021
1 parent 03507fa commit 5fd2228
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/koishi-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"dependencies": {
"@koa/router": "^10.0.0",
"@types/koa__router": "^8.0.4",
"@types/koa-bodyparser": "^4.3.0",
"@types/lru-cache": "^5.1.0",
"@types/ws": "^7.4.2",
"axios": "^0.21.1",
Expand Down
8 changes: 8 additions & 0 deletions packages/koishi-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ export * from './session'

declare const KOISHI_VERSION: string
export const version = KOISHI_VERSION

declare module 'koa' {
// koa-bodyparser
interface Request {
body: any
rawBody: string
}
}

0 comments on commit 5fd2228

Please sign in to comment.