@astrojs/starlight
Version:
Build beautiful, high-performance documentation websites with Astro
12 lines (9 loc) • 305 B
text/typescript
import type { APIContext } from 'astro';
export type { StarlightRouteData } from './utils/routing/types';
export type RouteMiddlewareHandler = (
context: APIContext,
next: () => Promise<void>
) => void | Promise<void>;
export function defineRouteMiddleware(fn: RouteMiddlewareHandler) {
return fn;
}