- Replace standard imports with type-only imports to improve clarity and align with TypeScript best practices. - Ensure consistency across modules by modifying all relevant files.
17 lines
666 B
TypeScript
17 lines
666 B
TypeScript
import type { IContext } from '../Interfaces/IContext.ts';
|
|
import type { IInternalRoute } from '../Interfaces/mod.ts';
|
|
|
|
/**
|
|
* A type alias for the internal route registration function used by the `HttpKernel`.
|
|
*
|
|
* This function accepts a fully constructed internal route, including method, matcher,
|
|
* middleware chain, and final handler, and registers it for dispatching.
|
|
*
|
|
* Typically passed into `RouteBuilder` instances to enable fluent API chaining.
|
|
*
|
|
* @template TContext The context type associated with the route being registered.
|
|
*/
|
|
export type RegisterRoute<TContext extends IContext = IContext> = (
|
|
route: IInternalRoute<TContext>,
|
|
) => void;
|