Log inSign up
Andrew Branch
3,224 posts
Image
user avatar
Andrew Branch
@atcb
Working on TypeScript at Microsoft. I appear when someone says “module resolution” three times in the dark. He/him
Marin, CA
blog.andrewbran.ch
Joined January 2013
642
Following
2,867
Followers
RepliesRepliesMediaMedia

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
  • user avatar
    Andrew Branch
    @atcb
    Mar 11, 2023
    Let’s look at each piece of this to go over what it does, why it is (or more often *isn’t*) needed, and why I can tell this package.json is misconfigured just from this small snippet. 🧵
    user avatar
    alistair
    Bun
    @alistaiir
    Mar 10, 2023
    It is *crazy* how ALL of this is needed to just publish a package in today's JS ecosystem...
    A screenshot of a lot of options being used in package.json
    550K
  • user avatar
    Andrew Branch
    @atcb
    Jan 5, 2022
    Want a view of what the TypeScript compiler sees in your project? ⏱ tsc --extendedDiagnostics How long stuff took and how big/complex it is. 📜 tsc --listFiles List of every file included in the compilation. 🧠 tsc --explainFiles List of every file and *why* it’s included.
  • user avatar
    Andrew Branch
    @atcb
    Oct 18, 2023
    Since February, I’ve been spending part of my time rewriting TypeScript’s modules documentation, replacing years-outdated content and adding some that’s never been written down. There’s always more to write, but I’m publishing it officially today. 1/5 typescriptlang.org/docs/handbook/…
    85K
  • user avatar
    Andrew Branch
    @atcb
    May 27, 2021
    One small quality of life improvement for frontend devs in TypeScript 4.3: you can now jump into imported files TypeScript doesn’t understand, like CSS.
    Image
    GIF
  • user avatar
    Andrew Branch
    @atcb
    Feb 24, 2020
    Of the TypeScript features I’ve worked on, this may be the one I’m personally most excited to use: better support for `require` in auto-imports for plain JS.
    Image
    GIF
  • user avatar
    Andrew Branch
    @atcb
    Mar 29, 2019
    New things: I’m joining the #TypeScript team starting next week! Incredibly excited and grateful for the opportunity to work full-time on a product I love and use daily. So much to learn! 😍
  • user avatar
    Andrew Branch
    @atcb
    Sep 23, 2023
    What if TypeScript libraries published just .ts sources to npm instead of .js and .d.ts files? This might already be tempting for Bun-only libraries, but how will that impact users? This is easy to answer by experimenting on existing libraries that ship .js, .d.ts, *and* .ts. 🧵
    user avatar
    Matt Pocock
    @mattpocockuk
    Sep 23, 2023
    What if Node supported TypeScript?
    101K
  • user avatar
    Andrew Branch
    @atcb
    Jul 15, 2019
    Holy smokes, @Netlify’s onboarding experience for an existing @gatsbyjs site is *incredible.* I... think I just migrated my blog in like... 5 minutes (plus waiting for DNS propagation)? 🤯👏🏼
  • user avatar
    Andrew Branch
    @atcb
    Jul 26, 2021
    📢 Feedback wanted! TypeScript 4.4’s auto-imports will show you the proper import specifier, respecting path mappings and node_modules, instead of the direct path to the exporting file. You can try it out now with VS Code Insiders and TS nightly. marketplace.visualstudio.com/items?itemName…
    Image
  • user avatar
    Andrew Branch
    @atcb
    Apr 1, 2021
    This is now shipped in TypeScript 4.3 beta and VS Code Insiders! Help me out by giving it a try and reporting any issues you find on GitHub 😄
    user avatar
    bsky.app/profile/orta.io
    @orta
    Mar 26, 2021
    Folks are going to love this (hopefully 4.3) TypeScript import change from @atcb github.com/microsoft/Type…
    Image
    GIF
  • user avatar
    Andrew Branch
    @atcb
    Jun 29, 2022
    Hey @github you probably know this by now, but it seems like ⌘-enter is now closing issues instead of just posting comments, and chaos is reigning supreme
    Image
  • user avatar
    Andrew Branch
    @atcb
    Aug 30, 2023
    There seems to be a common misconception that this will work. TypeScript will not read JS files inside node_modules by default. Writing JSDoc is great, but you still need to generate declaration files before shipping to npm.
    user avatar
    MJ
    @mjackson
    Aug 30, 2023
    If you write a library in .ts files, when you publish at a minimum you’ll have 2 files for every source file: a .js file with your implementation and a .d.ts file with all your declarations. If you publish source maps (sourceMaps: true) you will also have a .js.map file. If you
    61K
  • user avatar
    Andrew Branch
    @atcb
    Apr 2, 2016
    When #Xamarin joined Microsoft, I knew there would be some changes, but I wasn’t expecting this:
    Image
  • user avatar
    Andrew Branch
    @atcb
    Aug 21, 2023
    If you’re writing TS code and running the output in Node—no bundler, esbuild-kit/tsx—and you don’t have "module": "nodenext", "moduleResolution": "nodenext" things are going to be very broken for you. Node will fight you every step of the way and TS won’t help. Let TS help.
    41K
Advertisement
Advertisement