Skip to content

Commit

Permalink
Add render method to Koa Context (DefinitelyTyped#42008)
Browse files Browse the repository at this point in the history
* Add render method to Koa Context

* Add correct return type

* Fix whitespace issues

* Add semi-colon
  • Loading branch information
christyatsegment authored Feb 10, 2020
1 parent 617705a commit 3154fda
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions types/koa-ejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

import * as Koa from "koa";

declare module "Koa" {
interface ExtendableContext {
render: (template: string, properties?: {[name: string]: string}) => Promise<string>;
}
}

/**
* Adds render method to the app context.
*/
Expand Down

0 comments on commit 3154fda

Please sign in to comment.