TypeScript guidelines

Use Zod whenever parsing untyped data

Whenever you need to parse data that don’t have types yet, use Zod to make sure they are in the format you expect it to be.

Examples:

  • When working with API where we assume format of data
  • Reading JSON file where we assume shape of data
  • Reading from Firebase document where we assume shape of data