UNPKG

itty-router

Version:

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

9 lines (8 loc) 284 B
import { IRequest } from './IRequest'; import { RequestHandler } from './RequestHandler'; export type RouteEntry<RequestType = IRequest, Args extends any[] = any[]> = [ httpMethod: string, match: RegExp, handlers: RequestHandler<RequestType, Args>[], path?: string ];