3 ms·
Yeah, that's really something that feels like it should be a part of the language, because it would be so useful!
by dlbucci 7y ago
Yeah, that's really something that feels like it should be a part of the language, because it would be so useful!
- eyelidlessness 7y agoIt's explicitly one of the language's non-goals[1]. > Add or rely on run-time type information in programs, or emit different code based on the results of the type system. Instead, encourage programming patterns that do not require run-time metadata. [1] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals#non-goals https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
- williamdclt 7y agoI understand it (there's already enough to do at type level that runtime level is a non-goal), but types are purely indicative at IO boundaries. Validation still needs to happen
- eyelidlessness 7y agoThat's right. So since it won't be a part of the language, libraries like this are being developed.