Typescript does a really good job with type aliases.
I hover over a value and get `Parsimmon.Result<any>`. I then import Parsimmon but with the name P, and hover types are now `P.Result<any>`. I'm impressed.
The TypeScript docs have IDE-like hover types on all the examples, which is really impressive.
I also like how the second example always shows the type of the relevant part, regardless of mouse position. It's clear and mobile friendly.
Screenshot from
Switching between Rust and TypeScript, I really miss the Result type in TypeScript. I can kludge something with nullable types or exceptions, but it's not as nice for the caller.
Wilfred Hughes
Shared words: Typescript, really, type, Result
Score: 145.2
Typescript's union types are really nice for writing interpreters.
type Value = NumberValue | StringValue;
function add(array<Value> args): NumberValue { ... }
I often find that primitive functions get little checking (e.g. just returning a Value) in the host language.
Wilfred Hughes
Shared words: Typescript, really, type, value
Score: 142.9