The theme was originally written in plain JavaScript by design:
- Faster onboarding for juniors at the time
- JavaScript allowed faster development speed (which aligned with Yard's core strength)
- The theme contained minimal JavaScript so TypeScript felt unnecessary
Meanwhile, all shared and critical packages have been written in TypeScript, making the theme an exception rather than the norm.
Now, the situation has changed:
- TypeScript is the standard and easier to onboard than before (with the help of AI)
- The lack of typing hurts code quality
- Having JS in the theme while everything else is TS is inconsistent
- At this point not using TypeScript here looks outdated and unprofessional
Decision: We should migrate all theme JavaScript to TypeScript.
The theme was originally written in plain JavaScript by design:
Meanwhile, all shared and critical packages have been written in TypeScript, making the theme an exception rather than the norm.
Now, the situation has changed:
Decision: We should migrate all theme JavaScript to TypeScript.