Chris JaydenC
tRPC3y ago
4 replies
Chris Jayden

Typescript helper for router output

is there a helper to do this better? Get the output for a certain route? Or is this the way to do it?

import type { AppRouter } from "$lib/api/root";

type TInitialData = AppRouter['user']['me']['_def']['_output_out']

// Do stuff
Solution
is there a helper to do this better? Get the output for a certain route? Or is this the way to do it?

import type { AppRouter } from "$lib/api/root";

type TInitialData = AppRouter['user']['me']['_def']['_output_out']

// Do stuff
Was this page helpful?