News for hackers. Stuff that matters.
Re:Branded Types for TypeScript by sapling-ginger on Wednesday May 15, 2024 @10:25PM (#40374641)
All valid javascript programs are valid typescript programs, so typescript necessarily must have structural type, it cannot have nominal type without breaking compatibility with javascript, which is a hard requirement.
Re:Branded Types for TypeScript by RussianCow on Wednesday May 15, 2024 @11:40PM (#40374997)
Correct. My comment was about programming languages in general and not specific to TypeScript. :)