News for hackers. Stuff that matters.
Re:How porting to TypeScript solved our API woes by seanmcdirmid on Wednesday April 08, 2020 @04:12PM (#22816577)
TS has some great typing features that I would miss going back to C#, but I miss the better type error messages I get in a nominal type system.
Re:How porting to TypeScript solved our API woes by damidekronik on Wednesday April 08, 2020 @04:23PM (#22816686)
Yea, the structural typing nature of TS drives me nuts. One thing I like in TS is the ability to reference individual "parts of a type", for example Account["email"] instead of "string" in function signatures. Is there something like that in C#?
Re:How porting to TypeScript solved our API woes by protonimitate on Wednesday April 08, 2020 @04:17PM (#22816612)
TS errors are my only real complaint about TS.

Otherwise it's a joy to work in, imo.

Trying to go from TS back to JS is a frustrating experience to say the least.

Re:How porting to TypeScript solved our API woes by karatestomp on Wednesday April 08, 2020 @05:14PM (#22817224)
TS can generate such good and natural looking JS that, faced with someone insisting on receiving a JS codebase, I’d consider keeping a shadow-repo in TypeScript and handing them its output.

Doesn’t work so well with an existing codebase, but still.