DEV Community

Discussion on: Catching bugs with stricter TypeScript

 
juliang profile image
Julian Garamendy • Edited

Yes! that would work as well. And it results in a better error report:

  1. The error now is on the messages object declaration (where the banana property is missing) as opposed to where we try to access it by key messages[id]
  2. The error message now reads "Property 'bananas' is missing..." even with TypeScript 2.4. ✅