UNPKG

edgerender

Version:
12 lines (11 loc) 474 B
import type { View, ViewFunction } from './handle'; declare const MethodStrings: readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]; export declare type Method = typeof MethodStrings[number]; export interface PathView { path: RegExp | string; allow: Set<Method>; view: ViewFunction; } export declare const clean_path: (pathname: string) => string; export declare function as_path_view([key, view]: [string, View | ViewFunction]): PathView; export {};