import type { Hono } from "hono" import type { UpgradeWebSocket } from "hono/ws" export type FetchApp = { fetch(request: Request): Response | Promise } export type Opts = { port: number hostname: string } export type Listener = { port: number stop: (close?: boolean) => Promise } export interface Runtime { upgradeWebSocket: UpgradeWebSocket listen(opts: Opts): Promise } export interface Adapter { create(app: Hono): Runtime createFetch(app: FetchApp): Omit }