24 ms·
TS tooling won’t tell you when your config value violates the constraint “isBetween(0, 100)” or “matches(Regex(…))”. Among other things.
by mrudolph22 3y ago
TS tooling won’t tell you when your config value violates the constraint “isBetween(0, 100)” or “matches(Regex(…))”. Among other things.
- hot_gril 3y agoA config validator, which can be written in TS, would.
- rockwotj 3y agoAgreed, runtime checks can be implemented in typescript - that’s the beauty of it
- mrudolph22 3y agoIn theory, yes. But I doubt that we’ll see a TS IDE plugin that underlines violated constraints with red squiggles anytime soon. :-)
- hot_gril 3y agoThere are IDEs that auto-run unit tests and highlight exceptions thrown in the main or test code, which wouldn't be far off.