@jsonjoy.com/jit-router
Version:
High-performance HTTP router with JIT compilation.
16 lines • 655 B
TypeScript
import { Codegen } from '@jsonjoy.com/codegen/lib/Codegen';
import { JsExpression } from '@jsonjoy.com/codegen/lib/util/JsExpression';
import type { Match } from './router';
export type RouteMatcher<Data = unknown> = (route: string) => undefined | Match<Data>;
export declare class RouterCodegenCtx {
readonly codegen: Codegen<RouteMatcher>;
constructor();
}
export declare class RouterCodegenOpts {
readonly slice: JsExpression;
readonly offset: string;
readonly depth: number;
constructor(slice: JsExpression, offset: string, depth?: number);
create(offset: string): RouterCodegenOpts;
}
//# sourceMappingURL=codegen.d.ts.map