Gabriel Vergnaud
banner
gabrielvergnaud.com
Gabriel Vergnaud
@gabrielvergnaud.com
TypeScript nerd • Open Source (TS-Pattern, HOTScript) • Teacher • Staff Eng @datadog

Unleash TypeScript's full potential 👉 http://type-level-typescript.com
A new version of TS-Pattern is out 🚨

You can now customize the fallback behavior of `.exhaustive()` if the runtime value you get is unexpected.

upgrade 👉 npm i ts-pattern@5.7.0
March 28, 2025 at 8:50 PM
Here is another reason I like Type Catalogs.

They can easily be transformed with Mapped Types!

Full code snippet in thread 🧵👇
February 23, 2025 at 4:26 PM
Pro tip: Don't write your #TypeScript union types by hand, use a Type Catalog instead!

Why are Type Catalogs better?

Find out in the thread 🧵 👇
February 22, 2025 at 5:03 PM
A new TS-Pattern release is out!

👉 Prevent passing impossible patterns to `isMatching` when used with 2 parameters.
👉 `P.infer` behaves better when used in an argument position.

just run `npm i ts-pattern@v5.6.0` in your project 😊

Release note: github.com/gvergnaud/ts...
December 15, 2024 at 10:26 PM
Type-Level TypeScript is on sale for Black Friday! 🚨

You can get it for 25% off! It's only 74$ to get lifetime access to all course materials.

👉 type-level-typescript.com

Enroll to learn how to craft and transform #TypeScript *types* with the same ease you handle JavaScript values every day!
November 26, 2024 at 3:51 PM
Template Literal Types are awesome.

If you concat `number` and a union of time units, you have a human readable AND type-safe way to provide time values! 👇
November 14, 2024 at 12:30 AM
Hey friends 👋

Trying out @bsky.app, looks great so far!

I'll post TypeScript and programming related things.

to get started, here is an article I wrote a couple of weeks ago explaining how to get optional keys from object types 🤗

type-level-typescript.com/articles/how...
How to get optional keys from object types in TypeScript? — Type-Level TypeScript
Let's build a reusable type helper to get all optional keys from an object type in TypeScript.
type-level-typescript.com
November 5, 2024 at 1:44 PM