Chris Jayden
Chris Jayden
Explore posts from servers
TtRPC
Created by Chris Jayden on 7/24/2023 in #❓-help
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
import type { AppRouter } from "$lib/api/root";

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

// Do stuff
5 replies