News for hackers. Stuff that matters.
Re:Why the New V8 Is So Damn Fast by eropple on Tuesday July 31, 2018 @01:13AM (#17650698)
Aw, man - I'd hoped you'd found something to make this less of a stone-cold pain to do. Instead, it's io-ts again. Which is...interesting...but it really sucks to actually use when you have to manually define every in/out yourself. It's 2018. There's no good reason TypeScript can't emit the type information to just build these (and I don't really mean decorator metadata).
Re:Why the New V8 Is So Damn Fast by sbjs on Tuesday July 31, 2018 @10:12AM (#17653259)
You can add another build step right after the `tsc -w` compilation phase, which takes your .ts files, parses them to find our your types, and emits runtime code that checks your types. That's what you're describing that TypeScript should be doing on its own. But I don't see why you'd want to do this instead of using io-ts? This is more complicated overall.
Re:Why the New V8 Is So Damn Fast by eropple on Wednesday August 01, 2018 @01:38PM (#17664837)
Runtime type information is important. TypeScript is in the best place to provide it. So...it should. Boilerplating our way through io-ts is a waste of my time and yours.