UNPKG

abi.js

Version:

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

17 lines (16 loc) 1.05 kB
import type { Address, Hostname, Port, ServeHandler, ServeOptions } from './types'; export declare function isPort(port: any): port is Port; export declare function isHostname(host: any): host is Hostname; export declare function isAddress(address: any): address is Address; export declare function isHandler(handler: any): handler is ServeHandler; export declare function hasHandler(options: any): options is { handler: ServeHandler; }; export declare function isServeOptions(options: any): options is ServeOptions; declare function toServeOptions(handler: ServeHandler): ServeOptions; declare function toServeOptions(port: Port, handler: ServeHandler): ServeOptions; declare function toServeOptions(hostname: Hostname, handler: ServeHandler): ServeOptions; declare function toServeOptions(port: Port, hostname: Hostname, handler: ServeHandler): ServeOptions; declare function toServeOptions(address: Address, handler: ServeHandler): ServeOptions; declare function toServeOptions(options: ServeOptions): ServeOptions; export { toServeOptions };