fix: ServerhandlerInfo type for newer Deno versions (#2419)

Newer Deno versions have an additional `completed` property in there.
This PR allows Fresh to be used with both old and newer Deno versions
without getting type errors.
This commit is contained in:
Marvin Hagemeister
2024-05-02 20:41:33 +02:00
committed by GitHub
parent bc75101dcf
commit 40181142d2
7 changed files with 27 additions and 17 deletions
+2 -1
View File
@@ -289,7 +289,8 @@ export async function fakeServe(
const ctx = await ServerContext.fromManifest(manifest, config);
const handler = ctx.handler();
const conn: ServeHandlerInfo = {
// deno-lint-ignore no-explicit-any
const conn: any = {
remoteAddr: {
transport: "tcp",
hostname: "127.0.0.1",