UNPKG

itty-router

Version:

A tiny, zero-dependency router, designed to make beautiful APIs in any environment.

11 lines (10 loc) 253 B
interface ErrorLike extends Error { status?: number; [any: string]: any; } type ErrorBody = string | object; export interface ErrorFormatter { (statusCode?: number, body?: ErrorBody): Response; (error: ErrorLike): Response; } export {};