Arrange Act Assert

Jag Reehals thinking on things, mostly product development

Posts about “typescript”

Building TypeScript Libraries' A Guide to Explicit Exports, Tree Shaking, and Common Pitfalls

20 Feb 2025

builder building typescript sign

Building a TypeScript library that is both maintainable and optimised for modern bundlers requires careful consideration of exporting functions, types, and other constructs from your modules.

With several strategies available, from wildcard re-exports to namespaced exports, explicitly named re-exports have emerged as the clear winner. This post explores the alternatives with examples based on an order management system.

We'll discuss the benefits of exporting types, how to organise multiple entry routes (such as in /src/orders and /src/users), and review the necessary TypeScript configuration options (such as verbatimModuleSyntax) and package.json tweaks. Additionally, we'll explain how this approach helps prevent circular dependency challenges by enforcing a clear dependency graph.

Read More →

Introducing Typescript at Cambridge University Press

22 Feb 2021

Having worked with many clients who struggled to maintain Javascript projects, Typescript was a no brainer when choosing what to use for the project I was leading.

In this post, I'll share what and how I managed the challenges of introducing and using Typescript.

Read More →