Section 01 of 05
What JavaScript and TypeScript actually specify
ECMAScript semantics and TypeScript’s type system, read from the specification and the compiler rather than from the documentation.
The documentation describes how a feature is meant to behave. The specification describes what an engine is required to do, and the compiler describes what it will actually accept. These articles work from the second two, and they say which one a claim came from.
- Articles
- 3
- Latest
- Series
- 2
- №03
The TypeScript type systemYour Conditional Type Answered Twice. Both Answers Are Right.
A naked type parameter splits its union before the conditional runs, so IsArray<string[] | number> comes back as 'no' | 'yes'. Read out of TypeScript 7.0.2.
- №02
Async machineryWhat await Compiles To, and What It Costs
One async function compiled three ways — TypeScript's ES5 emit, V8's bytecode and the spec's Await steps — and the microtask turns each one predicts.
- №01
The TypeScript type systemType-Level Narrowing: How TypeScript Decides What You Meant
Control flow analysis is a graph walk over your code. Knowing what widens a type again explains most of the errors that look wrong.
Browse
Other sections
- Runtime and performance3 articles
- Ecosystem and production2 articles
- Frameworks2 articles
- Tooling and build2 articles