I'm experimenting with a React Native + React Query and tRPC + Prisma setup and finding some problems with the typo workflow between tRPC and react
I'm querying my data on one screen
const { data: highline, isFetchedAfterMount } = trpc.highline.getById.useQuery(
highlitedMarker.id
);
and then navigating to a details screen that receives the data highline
as props
navigation.navigate('Details', { highline });
To type this parameter I'm doing
highline: RouterOutput['highline']['createHighline'];
but highline
get the type of Highline | undefined
. Is this the correct way of doing this inference? I want highline
to be typed specifically Highline