Skip to content

Commit

Permalink
fix(runtime): add correct overload signature to render method
Browse files Browse the repository at this point in the history
  • Loading branch information
davewasmer committed Jun 25, 2017
1 parent 8c01dff commit ee3fd16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/runtime/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export default abstract class Action extends DenaliObject {
*/

async render(body: any, options?: RenderOptions): Promise<void>;
async render(status: number, body?: any, options?: RenderOptions): Promise<void>;
async render(status: number, body?: any, options?: RenderOptions): Promise<void> {
if (typeof status !== 'number') {
options = body;
Expand Down Expand Up @@ -266,7 +267,7 @@ export default abstract class Action extends DenaliObject {
// Autorender if render has not been manually called and a value was returned
if (!this.hasRendered) {
debug(`[${ this.request.id }]: autorendering`);
await this.render(200, result);
await this.render(result);
}
}

Expand Down

0 comments on commit ee3fd16

Please sign in to comment.