3 ms·
How come?
by snek 8y ago
How come?
- moreira 8y agoQuick - is 'seconds' a valid value for the second parameter? You don't know; there's no easy way to know. If they're constants you can look at all constants available for Intl.RelativeTimeFormat, IDEs can do autocomplete, analysers can check if the value is valid and alert if not. That's just off the top of my head; I imagine there are even more reasons.
- felixfbecker 8y agoTypeScript can check and autocomplete valid values of strings too, but I agree with the other points.
- deleted 8y ago[deleted]