Skip to content

Commit

Permalink
Fix for issue #155
Browse files Browse the repository at this point in the history
  • Loading branch information
RuiSiang committed Mar 15, 2021
1 parent 66d4575 commit 0f3f682
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
});
=============================================== */

import { Middleware } from 'koa'
type viewsOptions = {
/*
* Whether to use ctx.body to receive the rendered template string. Defaults to true.
Expand Down Expand Up @@ -48,7 +48,7 @@ type viewsOptions = {
* @param root Where your views are located. Must be an absolute path. All rendered views are relative to this path
* @param opts (optional)
*/
declare function views(root: string, opts?: viewsOptions): Function
declare function views(root: string, opts?: viewsOptions): Middleware
declare namespace views {
const viewsOptions: viewsOptions;
}
Expand Down
143 changes: 136 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"precommit": "lint, test",
"dependencies": {
"@types/koa": "^2.13.1",
"consolidate": "^0.16.0",
"debug": "^4.1.0",
"get-paths": "0.0.7",
Expand Down

0 comments on commit 0f3f682

Please sign in to comment.