ferdy
Explore posts from serversGet tRPC procedure latency?
Hi all, is there a supported mechanism to run common code to all procedures, say if I want to get latency metrics. I want to run the same latency math on all my procedures. I could create a helper function that I just have to remember to wrap all my procedure code in but just wondering if there's some supported tRPC way of doing this?
7 replies
TTCTheo's Typesafe Cult
•Created by ferdy on 4/24/2023 in #questions
Nested keyof
Hi all, I am trying to use a fancy type to get a nested keyof effect. I found this code snippet online:
and when using it on the declaration side it definitely works, but I am having trouble using it to index into the type.
here's a link to the code snippet: https://www.typescriptlang.org/play?#code/C4TwDgpgBAchDOwIBMDSEQHkBmAeTARgFYQDGwAKuNBAB5IB2y8UA9sWcAHxQC8UAbwBQUKAG10IKAEsGUANYZW2KIRLkqkKADIoACkQAnWQHMoAHygMArgFsCEQwEoAugC5VHDdQkYXUOkZmNi9gEVEoAH4oAAMAEgFJAF8AOgS4RBRJHHxQzQhfEBcuJJjw0Q94xIxSgG4hJLFFEGVPdUpqHX0jUwsrOwdnF3qhUC0AMVZWPkFyqAIAQ0MPYQi1+YWALw8ehhM5pIAaOewpneBjPYahIVJWBkQFDA8MpDQMHMnWHn4AIkXDClFptfiM7g9gFBTqwPF8ZqsIgCVsCPP8tr8jiczlBftDfg0oAsWODEGD7o9DAhrAAbSH8aFNPy1IA
2 replies