UNPKG

next-rest-framework

Version:

Next REST Framework - write type-safe, self-documenting REST APIs in Next.js

9 lines (8 loc) 429 B
import { type NextRequest, NextResponse } from 'next/server'; import { type NextRestFrameworkConfig } from './types'; import { type DefineRouteParams } from './types/define-route'; export declare const defineCatchAllRoute: ({ config }: { config: NextRestFrameworkConfig; }) => (methodHandlers?: DefineRouteParams) => (req: NextRequest, context: { params: Record<string, unknown>; }) => Promise<void | NextResponse<any>>;