Skip to content

Commit

Permalink
fix(types): add Promise signature for bundleRenderer.renderToString (#…
Browse files Browse the repository at this point in the history
…7098)

* Make callback optional when providing context

Otherwise TypeScript compiler complains about `not assignable to parameter of type 'RenderCallback'`

* Update index.d.ts
  • Loading branch information
sleewoo authored and yyx990803 committed Nov 21, 2017
1 parent b0bbcbd commit 3554eb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vue-server-renderer/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface Renderer {
interface BundleRenderer {
renderToString(callback: RenderCallback): void;
renderToString(context: object, callback: RenderCallback): void;
renderToString(context: object): Promise<string>;

renderToStream(context?: object): Readable;
}
Expand Down

0 comments on commit 3554eb2

Please sign in to comment.