@glandjs/http
Version:
A protocol adapter for HTTP built on top of the Gland architecture solution.
33 lines (32 loc) • 984 B
TypeScript
export declare const HTTP_EVENTS: {
ROUTER: string;
PIPELINE: string;
MIDDLEWARE: string;
};
export declare const RouterEvent: {
MATCH: string;
ROUTER_REGISTER: string;
};
export type RouterEventType = keyof typeof RouterEvent;
export declare const PipelineEvent: {
PIPELINE_EXECUTE: string;
PIPELINE_REGISTER: string;
};
export type PipelineEventType = keyof typeof PipelineEvent;
export declare const MiddlewareEvent: {
MIDDLEWARE_REGISTER: string;
MIDDLEWARE_EXECUTE: string;
GLOBAL: string;
RESOLVER: string;
FOR_ROUTE: string;
MOUNT: string;
APPLY_GLOBAL: string;
USE: string;
};
export type MiddlewareEventType = keyof typeof MiddlewareEvent;
export type AllHttpEvents = MiddlewareEventType | PipelineEventType | RouterEventType;
type HttpEventMap = {
[M in AllHttpEvents]: M | `${M}` | AllHttpEvents;
};
export type HttpEventType<T extends string = string> = `${HttpEventMap[keyof HttpEventMap]}` | T;
export {};