👋 I'm Alex & I tweet about web dev stuff Creator of @trpcio, work @square, scout @a16z

Malmö, Sweden
The new major of tRPC is slooowly getting there 👀 Spoiler: it's going to be 🤯 + fully backward compatible with an interoperability mode which will make incremental adoption trivial 🔥
6
6
105
Has anyone written a nice & small TypeScript-based `Promise.props()` util? I've missed this ever since I stopped using bluebirdjs in favor of native promise fns.
8
8
99
Next one! 👇 (apologies for the delay)
Another obvious favorite TypeScript-utility of mine! - Infer the type of a function - Unwrap the return type's promise. ``` type AwaitedReturnType<T extends (...args: any) => any> = Awaited<ReturnType<T>>; ```
1
1
Previous tip:
One of my favorite little ts utils ``` export type Maybe<T> = T | undefined | null; ```
5
Because inferring types is a lot more fun than declaring types. This is the whole premise of tRPC.
2
16
Another obvious favorite TypeScript-utility of mine! - Infer the type of a function - Unwrap the return type's promise. ``` type AwaitedReturnType<T extends (...args: any) => any> = Awaited<ReturnType<T>>; ```
1
5
89
There are some really great takeaways here and, as always, Theo explains the magic of it in much better words than I do myself!
1
7
Thanks @t3dotgg for being the biggest supporter of tRPC! 🙏
I deleted HALF my backend code with this ONE package (yes it's tRPC) youtube.com/watch?v=PYUqYcPM…
4
4
52
Alex / KATT 🐱 retweeted
trpc-openapi is now stable & just released v0.1.0! 🎉 OpenAPI support for @trpcio 🧩 - Easy REST endpoints for your tRPC procedures. - Perfect for incremental adoption. - OpenAPI version 3.0.3. github.com/jlalmes/trpc-open…
10
14
98
Alex / KATT 🐱 retweeted
Replying to @Pruxis
tRPC is still one of the best decisions I’ve ever made for a codebase
1
4
18
I'll be in Berlin next week for @prisma-day! You should come too! 🚀
🔥 Only 7 days left till #PrismaDay! 🎙 June 15th: A workshop session at the Prisma office and online 🎙 June 16th: A whole day of talks prepared by our amazing speakers 🎟 Join us in Berlin or online: prisma.io/day
3
2
10
Hack it until it works -> make it pretty -> 🔁
1
15
tRPC passed 6,000 stars on GitHub today! 🤯 (6,014 as of writing!) 🌟🌟🌟🌟🌟🌟
6
4
63
Is it good that tRPC makes a distinction between queries and mutations?
63% Yes (elaborate 🙏)
5% No (elaborate 🙏)
32% 🍿
204 votes • Final results
9
2
14
Shower-thought: if you have any query waterfalls in your app, serving it on "the edge" will actually make it *slower* compared to hosting your app close to your data. I think I just killed my own hype for serving dynamic sites on the edge. Am I thinking about it wrong?
7
1
33
100% typescript but ~98% is syntax-wise just JavaScript as @prisma & @trpcio do all the heavy lifting behind the scenes.
What percent of the code you write is JavaScript vs TypeScript?
1
2
31
Alex / KATT 🐱 retweeted
So there are tRPC community plugins both for Vue & Svelte now -- where's the @solid_js one at? 👀
2
4
22
Alex / KATT 🐱 retweeted
Replying to @schickling
Honestly the DX is so terrible it killed my motivation to work on rallly.co for years until I finally gave up on it and just used a basic REST API. More recently I switched to trpc.io which is far and a way the best solution I've found.
2
2
14
Got to rename the content of `<label>s and `input name` to obscure values just to get it to be ignored
2