diff --git a/init.ts b/init.ts
index a1fa7f7a..5575537c 100644
--- a/init.ts
+++ b/init.ts
@@ -239,7 +239,9 @@ let MAIN_TS = `///
///
///
-import { start } from "$fresh/server.ts";
+import { ${
+ useTwind ? "InnerRenderFunction, RenderContext, " : ""
+}start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
`;
@@ -252,7 +254,7 @@ const sheet = virtualSheet();
sheet.reset();
setup({ ...config, sheet });
-function render(ctx, render) {
+function render(ctx: RenderContext, render: InnerRenderFunction) {
const snapshot = ctx.state.get("twind") as unknown[] | null;
sheet.reset(snapshot || undefined);
render();
diff --git a/tests/cli_test.ts b/tests/cli_test.ts
index d270c440..c91941cf 100644
--- a/tests/cli_test.ts
+++ b/tests/cli_test.ts
@@ -104,7 +104,7 @@ Deno.test({
await t.step("start up the server and access the root page", async () => {
const serverProcess = Deno.run({
- cmd: ["deno", "run", "-A", "main.ts"],
+ cmd: ["deno", "run", "-A", "--check", "main.ts"],
stdout: "piped",
stderr: "inherit",
cwd: tmpDirName,
@@ -231,7 +231,7 @@ Deno.test({
await t.step("start up the server and access the root page", async () => {
const serverProcess = Deno.run({
- cmd: ["deno", "run", "-A", "main.ts"],
+ cmd: ["deno", "run", "-A", "--check", "main.ts"],
stdout: "piped",
stderr: "inherit",
cwd: tmpDirName,