Susan Potter

Node.js :: The original JavaScript runtime for server-side apps


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.


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!


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.


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.


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 */ …


JavaScript Performance: Node CLI flags

These are some notes on performance engineering related to generating insights into Node.js (v8) performance. All material here is specific to the v8 engine found in Node.js, Chrome, and Opera. Generally useful things to learn to tune JavaScript (for the v8 engine) is natives syntax. You can run JS with natives syntax directives sprinkled throughout using the Node.js command-line: --allow-natives-syntax Read more on available natives syntax directives available from the …


Experience report deploying PureScript to AWS Serverless (Lambda)

In this blog post, an experienced software engineer shares their successful deployment of a pure functional serverless function to AWS using PureScript. They spent around $15 per day on API Gateway and Lambda invocations without cost optimization, handling a peak load of 32k invocations per minute with low latency. The engineer highlights the need for adjustment in debugging and deployment processes and discusses challenges with tools and automation. Despite concerns, costs …