theo (t3.gg)
Explore posts from serversTTCTheo's Typesafe Cult
•Created by theo (t3.gg) on 4/16/2023 in #questions
Mapped Types Not Inferring From Promise Correctly
TS mapped types not behaving as expected on promise inference
Desired DX
Package types
Currently have "unknown" coming through in the onUpload type. If I manually define the type on request (i.e.
onUpload: async (request: {metadata: {userId: string}})
), it will "backfill" correctly
Failing to get the type to infer off Promise<T> to the onUpload input162 replies
TTCTheo's Typesafe Cult
•Created by theo (t3.gg) on 9/17/2022 in #questions
How do I ONLY call my tRPC queries when a condition is met?
1. You might be looking for
useMutation
- https://tanstack.com/query/v4/docs/reference/useMutation?from=reactQueryV3&original=https://react-query-v3.tanstack.com/reference/useMutation
2. If you're NOT looking for useMutation
, you were probably looking for the enabled
key - https://tanstack.com/query/v4/docs/guides/disabling-queries#lazy-queries
THIS QUESTION IS ASKED A LOT SO I DECIDED TO ANSWER IT AHEAD OF TIME1 replies
TTCTheo's Typesafe Cult
•Created by theo (t3.gg) on 9/17/2022 in #questions
WELCOME FRIENDS
We're going to be rolling out this forum soon maybe. Lmk what you think!
9 replies
TTCTheo's Typesafe Cult
•Created by theo (t3.gg) on 9/17/2022 in #questions
Let's try forums
I'm curious enough so here we are
8 replies