Susan Potter

Deno :: The secure and browser compliant JavaScript runtime

software

Cross-runtime TypeScript Library Development: A Deno-Node Workflow

Are you a TypeScript developer who loves Deno’s safe and sandboxed environment and its out-of-the-box TypeScript, LSP, linting, formatting, stdlib testing and benchmarking support? Join me as I walk you through a possible workflow that combines the best of Deno tooling with Node.js compatibility.

software

Using Conditional Types in TypeScript

Dive into TypeScript's conditional types and discover how they empower developers to create flexible type mappings and enhance type safety. This article explores the mechanics of conditional types, demonstrates their application through practical examples, and showcases their ability to eliminate runtime bugs and improve code resilience. Embrace the power of TypeScript's conditional types and unleash the full potential of your code!

software

TypeScript's keyof operator and possible uses

Discover the incredible potential of the keyof operator in TypeScript and revolutionize your code for a better development experience.

software

JavaScript objects to TypeScript enumerations, const enums, ambient enums

Learn how to leverage TypeScript's enums, const enums, ambient enums and how they impact generated JavaScript code. Unveil the benefits and drawbacks of using const enums.

software

Algebraic Data Types in TypeScript

Note: the code for the TypeScript (to help you follow along) is available here: Encoding Algebraic Data Types in TypeScript code Background Recently I've been reviewing TypeScript code at work. A common pattern I've observed in pull requests and some open source projects is a type that looks like the following: type FooTag = 'Bar' | 'Baz' | 'Qux'; type Foo<A> = { _tag : FooTag, /* Required for the 'Bar' tagged values of Foo */ …