UNPKG

abi.js

Version:

[![typescript-icon]][typescript-link] [![license-icon]][license-link] [![status-icon]][status-link] [![ci-icon]][ci-link] [![twitter-icon]][twitter-link]

16 lines (15 loc) 546 B
import type { Address, Hostname, Port, ServeHandler } from './types.js'; export declare class Server { #private; protected root: string; protected assets: string; constructor(root: string, assets?: string); pipe(handler: ServeHandler, ...handlers: ServeHandler[]): this; fetch(request: Request): Promise<Response>; start(): void; listen(port: Port): void; listen(hostname: Hostname): void; listen(port: Port, hostname: Hostname): void; listen(address: Address): void; error<T>(err: T): Response; }