Defining Our Types

Learn about the project requirements and what types we need to define.

Consider a scenario where our company has decided to add personalization to its products, so it will now need users to register. We’ve been tasked with quickly rolling out the first version of this user registration.

Let’s try working on this project in the proper way, by postponing our coding for a while to first think about our requirements. What does the information we receive look like? What does our user type look like? What functions will we need?

Setting up our project

We need a package.json file with the fp-ts package included as a dependency. We also require a tsconfig.json file with the target set to es6. Take a look at the sample files:

Get hands-on with 1200+ tech skills courses.