UNPKG

winterspec

Version:

Write Winter-CG compatible routes with filesystem routing and tons of features

21 lines (20 loc) 814 B
import { Project, Type, ts } from "ts-morph"; type ExtractRouteSpecsFromASTOptions = { tsConfigFilePath: string; routesDirectory: string; }; export declare const extractRouteSpecsFromAST: ({ tsConfigFilePath, routesDirectory, }: ExtractRouteSpecsFromASTOptions) => Promise<{ routes: { route: string; httpMethods: string[]; jsonResponseZodOutputType: Type<ts.Type> | undefined; jsonBodyZodInputType: Type<ts.Type> | undefined; commonParamsZodInputType: Type<ts.Type> | undefined; queryParamsZodInputType: Type<ts.Type> | undefined; urlEncodedFormDataZodInputType: Type<ts.Type> | undefined; }[]; globalRouteSpecType: Type<ts.Type>; renderType: <TType extends ts.Type>(type: Type<TType>) => string; project: Project; }>; export {};