timetable-app

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

trpc.ts (556B)


      1 import { initTRPC } from '@trpc/server';
      2 // import superjson from 'superjson';
      3 
      4 import type { Context } from './context';
      5 
      6 // Avoid exporting the entire t-object
      7 // since it's not very descriptive.
      8 // For instance, the use of a t variable
      9 // is common in i18n libraries.
     10 const t = initTRPC.context<Context>().create({
     11 	// transformer: superjson,
     12 });
     13 
     14 // Base router and procedure helpers
     15 export const router = t.router;
     16 export const procedure = t.procedure;
     17 export const middleware = t.middleware;
     18 export const createCallerFactory = t.createCallerFactory;