Betterer and TypeScript work pretty well together 💖. Not only can Betterer be used to help migrate a project to TypeScript, but TypeScript can help validate the types as you write your tests. TypeScript is included as one of Betterer's
optionalDependencies, and it is recommended to use them together.
By default, running the Betterer initialisation script will create a
.betterer.ts test definition file, and add TypeScript as a dependency. You won't ever need to compile the test definition file as Betterer uses
If you don't want to use TypeScript, you can opt out by passing a
.js file to the initialisation script:
# Run this from the root of your project:npx @betterer/cli init --config .betterer.js