News for hackers. Stuff that matters.
Re:Rewriting TypeScript in Rust? You'D have to be by ajkjk on Thursday December 15, 2022 @12:40PM (#34002966)
Interesting, I thought that wasn't possible, but now I feel like I'm just confused and mixing it up with something else that wasn't possible but can't remember well enough.

But anyway, what I want from TS is

    type UserId = unique string; // or something
    const userId = "1234" as UserId
and no further boilerplate or trickery to get it to work. Would certainly be nice.
Re:Rewriting TypeScript in Rust? You'D have to be by scotty79 on Thursday December 15, 2022 @08:49PM (#34008543)
You can get close to that:

https://github.com/seancroach/ts-opaque