Skip to content

TypeScript

Sam Robbins edited this page Aug 28, 2020 · 2 revisions

The homepage for this site is implemented using TypeScript, this is a typed version of JavaScript that allows for more robust code. There are a range of files in the repository used to configure typescript

tsconfig.json

This is the main configuration file for TypeScript, it includes sensible options for the repository but can be changed if you wish

next-env.d.ts

This file ensures the Next.js types are picked up by the compiler, you can read about this here

axios.d.ts

As the default types for axios are being overriden by adding latency, the definition of the type also needs updating, you can find this here

Clone this wiki locally