Log inSign up
Dan Vanderkam 🦋
1,326 posts
user avatar
Dan Vanderkam 🦋
@danvdk
Independent software developer, formerly @sidewalklabs and Google. Author of Effective TypeScript, now in its 2nd edition (May 2024): amzn.to/3UjPrsK
Hudson Valley, NY
effectivetypescript.com
Joined February 2009
121
Following
3,119
Followers
  • Pinned
    user avatar
    Dan Vanderkam 🦋
    @danvdk
    May 9, 2024
    It's here! 🎉 The 2nd edition of Effective TypeScript is now available in all formats. The bird on the cover is the same, but the content is throughly revised and expanded to reflect how TS is used in 2024. Get your copy today! @OReillyMedia amzn.to/3UjPrsK
    Image
    12K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Sep 4, 2020
    Another use of @typescript 4.1's template literal types: extracting the URL parameters from an express route. Pretty amazing you can do this in the type system! typescriptlang.org/play?ts=4.1.0-…
    Image
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Feb 21, 2024
    Put up my second #TypeScript PR! It allows the type checker to infer "type predicates" when a function returns a boolean that's tied to a refinement on one of its parameters. I have no idea if it'll be accepted, but I sure learned a lot implementing it! github.com/microsoft/Type…
    Image
    28K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Aug 1, 2022
    New Effective #TypeScript blog post: a command to visualize what TypeScript is compiling using a treemap (the results may surprise you!). Or: how I found out I was compiling 80+ MB of types for Google APIs that I wasn't using. effectivetypescript.com/2022/07/30/tre…
    Image
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    May 21, 2015
    I’m excited to launch oldnyc.org! Browse 40,000 mapped historic photos of #NYC from the @nypl
    Image
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Jul 29, 2023
    Recommendation update: use knip to find dead code, types and dependencies in your @typescript ✂️
    Image
    effectivetypescript.com
    Effective TypeScript › Recommendation Update: ✂️ Use knip to detect dead code and types
    TL;DR: ts-prune is in maintenance mode. Use knip to find dead code instead. It's great!
    13K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Nov 12, 2019
    I wrote a book! Happy to announce that _Effective TypeScript: 62 Specific Ways to Improve Your TypeScript_ is now available for purchase. I learned a lot writing it and I hope you'll have the same experience reading it. amazon.com/Effective-Type…
    Image
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Mar 25, 2024
    After using TypeScript for 8+ years, I had a mind-blowing realization: type inference is implemented completely backwards from how I think about it! Read on for the "missing manual" on Flow Nodes and TS type inference internals.
    Image
    effectivetypescript.com
    Effective TypeScript › Flow Nodes: How Type Inference Is Implemented
    If a variable gets a type but no one looks at it, does it really get a type at all? This post looks at how type inference is implemented in the TypeScript compiler. It's of some interest to anyone...
    12K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Feb 28, 2024
    For my PR to infer type predicates, I needed to understand TypeScript's control flow graph. So I added a graph visualization to @DavidSherret's amazing TypeScript AST Viewer. It's live now and very fun to play with! Edges go backwards in execution order. ts-ast-viewer.com/#code/GYVwdgxg…
    Image
    9.5K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Apr 16, 2024
    One of my goals this year was to become a TypeScript contributor. Over the past three months, I did just that! This post tells the story of how Type Predicate Inference came about and what I learned along the way.
    Image
    effectivetypescript.com
    Effective TypeScript › The Making of a TypeScript Feature: Inferring Type Predicates
    Over the past few months I became a TypeScript contributor and implemented a new feature, type predicate inference, that should be one of the headliners for TypeScript 5.5. This post tells the story...
    6.6K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Feb 3, 2021
    Do you write about @typescript? These four words are my pet peeves. Please avoid them if you can!
    Image
    effectivetypescript.com
    Effective TypeScript › Four words to avoid in TypeScript writing
    I've written many words about TypeScript and I'm sure I've read even more. Here are four words that make me cringe every time I see them. If you write about TypeScript, please steer clear of these!
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Dec 25, 2022
    All I want for Christmas is these seven @TypeScript features 🎄🎄🎄
    Image
    effectivetypescript.com
    Effective TypeScript › All I Want for Christmas Is… These Seven TypeScript Improvements
    It's Christmastime and I've been happily working through this year's Advent of Code in Deno (look forward to a blog post in the new year). What with all the presents, it's a good time to think about...
    11K
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Feb 25, 2022
    Which of these would you rather show your users when they call a function in @TypeScript? As a library writer, you do have some control! Read more about the strange world of type display in the latest Effective TypeScript blog post: effectivetypescript.com/2022/02/25/gen…
    Image
  • user avatar
    Dan Vanderkam 🦋
    @danvdk
    Oct 30, 2023
    A quibble with @mattpocockuk's excellent writeup totaltypescript.com/type-vs-interf…: I'd call the "implicit index signature" for type a bug and a good reason to use interface instead because it can lead to unsoundness: typescriptlang.org/play?#code/MYe…
    Type vs Interface: Which Should You Use?
    Type vs Interface: Which Should You Use?
    From totaltypescript.com
    25K

New to X?

Sign up now to get your own personalized timeline!

Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

Terms·Privacy·Cookies·Accessibility·Ads Info·© 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up
Advertisement
Advertisement