feat: render function returns string (#89)

This commit is contained in:
Leo Kettmeir
2022-02-15 12:28:09 +01:00
committed by GitHub
parent d334b53320
commit 15f73e3274
3 changed files with 33 additions and 21 deletions
+8
View File
@@ -0,0 +1,8 @@
import { RenderContext, RenderFn } from "../../../server.ts";
export function render(_ctx: RenderContext, render: RenderFn) {
const body = render();
if (typeof body !== "string") {
throw new Error("body is missing");
}
}