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 https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types
miniblog.
Related Posts
I'm changing method definition syntax in my language:
// old
fun (this: Int) inc(): Int { this + 1 }
// new
method inc(this: Int): Int { this + 1 }
The original syntax was inspired by Go, but the new syntax is more grep-friendly and perhaps more readable. Not sure about the verbosity though. Thoughts?
Explaining syntax-aware diffing is tricky, so I'm trying to add some compelling screenshots to the difftastic readme.
They need to demonstrate weaknesses in text diffing, and be small enough to be mobile friendly. Here's the current examples.
Generating type-safe Go code from hand-written SQL: https://github.com/kyleconroy/sqlc
Really interesting approach, but I wonder if generated code is the right approach? It's certainly IDE friendly.





