Ayush GoyalA
tRPC3y ago
4 replies
Ayush Goyal

what is "use" keyword

const baseProcedure = t.procedure
  .input(z.object({ townName: z.string() }))
  .use((opts) => {
    const input = opts.input;
           
const input: {
    townName: string;
}
 
    console.log(`Handling request with user from: ${input.townName}`);
 
    return opts.next();
  });


what is this usekeyword any place i can read about it
Was this page helpful?