Amy Blankenship
May 29, 2023

--

If you write your tests first, as you write your types first, it's not burdensome at all. If you depend on TS alone to check how your components are used, you're almost certain to get a NPE at some point. For one thing, you're clearly using any, so that's going to get you. For another, you can't ever assume that anything coming in from outside (like an endpoint) is its declared type.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)