mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-25 07:15:19 +00:00
22 lines
391 B
TypeScript
22 lines
391 B
TypeScript
import type { Hono } from "hono"
|
|
import type { UpgradeWebSocket } from "hono/ws"
|
|
|
|
export type Opts = {
|
|
port: number
|
|
hostname: string
|
|
}
|
|
|
|
export type Listener = {
|
|
port: number
|
|
stop: (close?: boolean) => Promise<void>
|
|
}
|
|
|
|
export interface Runtime {
|
|
upgradeWebSocket: UpgradeWebSocket
|
|
listen(opts: Opts): Promise<Listener>
|
|
}
|
|
|
|
export interface Adapter {
|
|
create(app: Hono): Runtime
|
|
}
|