How to write ATDD tests with cucumber-js, protractor and typescript

ATDD (Acceptance Test Driven Development) has been around for a while now. I use it quite a lot on projects that I work on. It helps me and others translate requirements into automated tests with the minimum amount of ceremony. We can talk to users about what they want and write that down in a format that they understand and we can automate.

One of the ways in which I use ATDD is with AngularJS. There is an end-to-end testing tool for AngularJS called Protractor that supports writing ATDD tests using a testframework called cucumber-js. It works pretty well with just javascript, but since we use Typescript a lot more now I figured, why not use typescript for cucumber tests as well? <!-- more -->