import type { BuildProcedure, CreateRouterInner } from '@trpc/server'; import { z } from 'zod'; import type { Trpc } from '../Trpc.js'; /** * Class routes extend to create a TRPC route. * Every route is a name and a controller. * Zod is used to create validation */ export declare abstract class Route { protected readonly trpc: Trpc; /** * quality of life property. Zod is used to validate input in a * typesafe way. * Can be used by `import {z} from 'zod' as well. * * @see https://github.com/colinhacks/zod */ protected readonly z: typeof z; /** * The name of the route will be how it is referenced in client and * show up in api route `/api/version/name?input=...` */ abstract readonly name: string; /** * The handler specifies the typescript types for input and output * and writes the function to fetch the data */ abstract readonly handler: BuildProcedure | CreateRouterInner; constructor(trpc: Trpc); } //# sourceMappingURL=Route.d.ts.map