4 ms·
i see people writing tests for the structure of returned objects type annotation tests that at compile time
by exit 13y ago
i see people writing tests for the structure of returned objects
type annotation tests that at compile time
- ajanuary 13y agoThat suggests to me they're missing tests that check the data held in the objects. There might be some worth in checking the structure of an object (including attached functions) as it leaves a public api, especially in a language like Javascript that plays it so fast and loose with object construction. That's one of the nice thing about typescript - you can use it where it's most helpful and leave it where it's not.