@mattpocock.com.bsky.social
Full-time TypeScript educator. Used to be a voice coach. He/him. Author of Total TypeScript π§ Hire me to teach your team TypeScript!
Some smoooooooth template literal types spotted in Vercel's Chat SDK
Gives you automatically typed error codes for multiple features at once.
Lol, whoops
27.05.2025 08:25 β π 2 π 0 π¬ 0 π 0Men will literally write custom mapped types instead of going to therapy
27.05.2025 08:25 β π 6 π 0 π¬ 0 π 0Damn, 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
24.05.2025 17:19 β π 1 π 0 π¬ 0 π 0This appears to work:
www.typescriptlang.org/play/#code/C...
Some days my brain doesn't work. Today is one of those days
12.05.2025 17:43 β π 32 π 1 π¬ 4 π 0Thanks John!
11.05.2025 20:34 β π 2 π 0 π¬ 0 π 0Don't know!
09.05.2025 20:33 β π 3 π 0 π¬ 0 π 0Could you email team@totaltypescript.com? Finished for the day but they will handle it
29.04.2025 17:06 β π 3 π 0 π¬ 0 π 0Thank u, nuxt
29.04.2025 12:27 β π 22 π 0 π¬ 0 π 0Absolutely! β€οΈ
21.04.2025 17:27 β π 4 π 0 π¬ 1 π 0Hey Adam, I found this rancid turd that looks like you π
21.04.2025 11:52 β π 2 π 0 π¬ 1 π 0Lol how could I not be offended
20.04.2025 18:32 β π 3 π 0 π¬ 1 π 0I think strongly typed metadata is the idea. This is important for meta use cases, like generating open API spec
16.04.2025 20:04 β π 4 π 0 π¬ 0 π 0The theory is to get them the job with free resources, then get their work to pay for the paid course.
12.04.2025 20:01 β π 22 π 0 π¬ 0 π 0I also hate paywalls, so I spent 9 months writing a TS book and released it for free:
www.totaltypescript.com/books/total-...
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
03.04.2025 08:46 β π 3 π 0 π¬ 0 π 0I'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
01.04.2025 14:30 β π 3 π 0 π¬ 1 π 0Two cool things in this snippet:
1. You can use 'glob' from Node instead of a library! (still experimental, available in 22+)
But glob returns an async iterator, which can be annoying to work with. So...
2. Array.fromAsync lets you turn an async iterator into an array. Beautiful.
Want to enter the world of AI, but don't know where to start?
I've built a roadmap on how to become an AI Engineer.
We cover:
- What AI engineers are
- What LLM's are used for
- Evals
- A directory of 17 techniques
It's the perfect way to get ahead of the curve.
www.aihero.dev/ai-engineer-...
Awesome, glad you enjoyed it!
28.03.2025 13:07 β π 2 π 0 π¬ 0 π 0The book is a printed version of what's available free here:
www.totaltypescript.com/books/total-...
"The AI Engineer Roadmap" dropping soon.
Covering everything you need to enter the AI world:
- What LLM's are used for
- The AI engineer mindset
- Evals
- 17 techniques for improving your LLM-powered apps