News for hackers. Stuff that matters.
Re:Migrating 300k LOC from Flow to TypeScript by finchisko on Thursday June 20, 2019 @10:42AM (#20233371)
>It doesn't even ensure type safety because there is no runtime type validation for JSON objects received from the API.

what do you mean by type validation of JSON objects? If you mean, that you can for exammple pass string to object property defined as number, then I must warn you, that this is problem in all languages (eg. most java json serializers, will throw exception). Anyway if you need to ensure all object properties have correct type, you should write validator/transformer (there are already libraries that can do it for you).

There are no comments on this comment yet.