UNPKG

turtle-express

Version:

`turtle-express` is kinda a framework or a library based on `express.js` with an opinionated express router with type safety and schema validation with zod. Also many [more features](https://github.com/mm-ninja-turtles/turtle-express/discussions/7) planni

22 lines 839 B
import { Express, RequestHandler, Router } from 'express'; import { OpenAPIV3_1 } from 'openapi-types'; import { PathOptions, PathReturnType } from '../path/create-path'; import { Path } from '../types/types'; export interface RouterOptions { basePath?: Path; openApi?: { info: OpenAPIV3_1.InfoObject; tags?: OpenAPIV3_1.TagObject[]; servers?: OpenAPIV3_1.ServerObject[]; }; } export interface SetupOptions { paths: PathReturnType[]; } export interface RouterReturnType { use: (..._handlers: RequestHandler[]) => Router; path: (path: Path, options?: PathOptions) => PathReturnType; setup: (expressApp: Express, options: SetupOptions) => void; } export declare function createRouter(_router: Router, _options?: RouterOptions): RouterReturnType; //# sourceMappingURL=create-router.d.ts.map