3 ms·
TypeScript does nothing like that with any strict settings, because it doesn't provide any JSON parsing alternative, so that is always unsafe. I bet there are
by the_gipsy 5y ago
TypeScript does nothing like that with any strict settings, because it doesn't provide any JSON parsing alternative, so that is always unsafe.
I bet there are runtime checkers that use some kind of reflection, that would be the next best thing. But I also bet that those force you to annotate/decorate everything.