Ecma International approves ECMAScript 2025: What’s new?
Overview of new features in the ECMAScript 2025 standard, including import attributes for JSON modules, iterator helpers, and new Set methods.
2ality.com is the long-standing blog of Dr. Axel Rauschmayer, devoted to JavaScript, TypeScript and modern web development. The blog was launched in March 2005 and remains one of the deepest and most respected resources for ECMAScript, language fundamentals and evolving JS features. Axel writes detailed, clear, and specification-aware analyses of JavaScript behavior, type system tricks in TypeScript, best practices, and the internal mechanics of web technologies. The content ranges from diving into conditional types, tuple types, ESM-based package publishing, to tutorials on Node.js and shell scripting.
52 articles from this blog
Overview of new features in the ECMAScript 2025 standard, including import attributes for JSON modules, iterator helpers, and new Set methods.
Tips for making JavaScript regex more readable using flags, named capture groups, whitespace, and the Regex+ library.
Explains TypeScript's limitations with Map key checks and Array index access, offering practical solutions and workarounds.
How TypeScript resolved the naming conflict between its existing Iterator type and JavaScript's new global Iterator class from ECMAScript 2025.
Learn how to style console text in Node.js using ANSI escape sequences and the built-in util.styleText() function.
Explores the complexities and pitfalls of converting various values to strings in JavaScript, including Symbols and objects with null prototypes.
Explores current best practices, recent advances, and future directions for deploying TypeScript, including type stripping and isolated declarations.
Explores methods for testing TypeScript types, including libraries like asserttt and potential built-in language features for type-level testing.
Explores the concept of synchronous 'await' in JavaScript, its potential benefits for code duplication, and why it's impractical.
Analysis of Microsoft's Go port of the TypeScript compiler, discussing the timeline, benefits, and technical details of the native implementation.
Exploring how to use union and intersection types with objects in TypeScript, including discriminated unions for type narrowing.
An overview of TypeScript for JavaScript developers, explaining its syntax, how it runs, and IDE benefits.
How to use Node.js's --watch flag to create simple, interactive TypeScript playgrounds for quick code experimentation.
Explores how to test complex TypeScript types using type-level assertions and the asserttt npm package, including implementation details.
Explores how conditional types in TypeScript constrain type variables in unexpected ways, going beyond simple type narrowing.
Exploring the TypeScript `never` type, its role as a bottom type, and practical applications like union filtering and exhaustiveness checks.
Explains how TypeScript handles JavaScript symbols at the type level, covering unique symbols, type inference, and common pitfalls.
Compares TypeScript's T[] and Array<T> array notations, explaining their equivalence and the author's preference for Array<T>.
A guide to TypeScript conditional types, explaining their syntax, usage with examples, and how they work with union and generic types.
A guide to TypeScript mapped types, explaining their syntax and use cases for transforming objects and tuples.