-
Notifications
You must be signed in to change notification settings - Fork 281
Description
Summary description
Migrate project to TypeScript.
Implementation
Looks like an easy win as TS can be adopted incrementally. To add support in this project simply:
yarn add --dev typescript && touch tsconfig.json && dc down && dc up -dNext.js will populate the tsconfig.json file with some sane defaults as the container comes up and you can start renaming source files to end with ts and tsx. (Note at least one TypeScript file is required in the project before the tsconfig.json file will be autopopulated with defaults.)
Step two would be to get rid of the prop-types dependency. If all goes well, start porting other parts of the framework. Consider pairing this work with #643.
Motivation
Type safety. IntelliSense. Better static code analysis resuling in fewer regressions.
Notes
Doesn't seem to work on the v3.1.0 tag but worked for me on trunk. Probably a Next.js update which allows the tsconfig.json file to auto-generate.