I’m sharing best practices on building a truly cross-platform / universal TypeScript library in 2025. TypeScript compiles to JavaScript which runs everywhere, so that should be easy, right? For a simple library, sure, but when you need access to runtime APIs, things become more problematic. I’ll touch on how to use TypeScript project references to achieve lockdown of runtime types and fast incremental builds and how to use static declarations via export conditions instead of imperative checks at runtime, making bundlers happier about the awesome library you’ve built.

Comments

Please login to leave a comment

Kræn Hansen (Speaker) at 07:41 on 21 Mar 2025

I'm looking forward to giving my talk and hope that you'll rate it, ask questions live and here. I'd appreciate any feedback you might have 💙

Kræn Hansen (Speaker) at 14:21 on 21 Mar 2025

Here's a link for my slides: https://github.com/kraenhansen/universal-typescript-library-talk/tree/webdevcon-2025