3 ms·
> TypeScript is indeed Javascript No, no. JavaScript is TypeScript. TypeScript is not JavaScript. > type annotations are not code Of course they are. If they
by KPGv2 10mo ago
> TypeScript is indeed Javascript
No, no. JavaScript is TypeScript. TypeScript is not JavaScript.
> type annotations are not code
Of course they are. If they weren't code, then a malformed type would not trigger an error. You can actually solve the eight-queens problem with TS's type system alone.
https://lemoine-benoit.medium.com/eight-queens-puzzle-in-typescripts-type-system-4c7ff1693545 https://lemoine-benoit.medium.com/eight-queens-puzzle-in-typ...
The type system itself is Turing-complete!