Matt Pocock
banner
mattpocock.com
Matt Pocock
@mattpocock.com
14K followers 300 following 610 posts
Full-time TypeScript educator. Used to be a voice coach. He/him. Author of Total TypeScript 🧙 Hire me to teach your team TypeScript!
Posts Media Videos Starter Packs
Some smoooooooth template literal types spotted in Vercel's Chat SDK

Gives you automatically typed error codes for multiple features at once.
Men will literally write custom mapped types instead of going to therapy
Damn, I really want to make a "UX Patterns For AI Applications" course

All the hard stuff like stream resuming, generative UI, properly streaming markdown, editable plans, showing LLM progress
Hilarious use case for a mapped type:

Use it to rename an object key your backend developers consistently misspell

parms -> params
Yeah me too, not sure why they designed it like that
Some days my brain doesn't work. Today is one of those days
Could you email [email protected]? Finished for the day but they will handle it
Absolutely! ❤️
Hey Adam, I found this rancid turd that looks like you 😂
Lol how could I not be offended
I think strongly typed metadata is the idea. This is important for meta use cases, like generating open API spec
The theory is to get them the job with free resources, then get their work to pay for the paid course.
Spotted in the wild today: a Mutable<T> type.

Does the opposite of Readonly<T>. Weird that TS doesn't have this built-in.
We'll see, I don't see it yet
I've made a breakthrough today - come up with a new style of course that's ready for the AI-assisted developer era.

It's just unbelievably cool, can't wait to show you.
Yes, that's why it returns an async iterable and not an array, like other libs