flagon-useralejs
flagon-useralejs copied to clipboard
Feature(typescript): Migrate codebase to typescript
Problem
There are an unknown number of lurking type issues (see, for example, #441) all of which would be solved by migrating to typescript. What's more, we employ a strategy pattern in a number of places such as the authHeaderCallbacks and to enforce the strategy we write explicit typechecks in javascript.
Both of these point to the need/desire for type support to improve the developer experience.
Proposal
Migrate the code base to typescript in a single push.
Risks
- This will be a large PR.
- You never know whether one of your dependencies won't play nice with TS.
- Typescript also means that new contributors and developers will need to adhere to the type system, assuming we enforce this via pre-commit hooks/linters.