Migration to TypeScript #135

Open
opened 2026-07-22 14:09:25 +02:00 by jakob.scheid · 0 comments
Owner

Migrate JavaScript codebase to TypeScript

The entire JavaScript codebase should be migrated to TypeScript to improve the long-term maintainability, scalability, and reliability of the frontend.

Motivation

As the codebase grows, JavaScript's dynamic type system makes it increasingly difficult to reliably understand and maintain the relationships between different parts of the application. Function parameters, return values, object structures, API responses, component properties, and application state can change without the tooling being able to detect all affected usages.

TypeScript provides a static type system on top of JavaScript. This allows many classes of errors to be detected during development and CI rather than only when the affected code is executed. For example, invalid function arguments, incompatible assignments, missing object properties, and incorrect return types can be detected before the application is run.

Type definitions also make the codebase easier to understand and refactor. When an interface, API response, or shared data structure changes, TypeScript can identify many locations that need to be updated. This is particularly valuable as the project grows and more components and features depend on the same data structures.

TypeScript also provides significantly better editor support, including reliable autocompletion, navigation, refactoring, and inline documentation. This reduces the amount of implicit knowledge required to work on the codebase and makes it easier for additional developers to contribute.

What happens if we do not migrate?

If the project remains JavaScript-only, the increasing size and complexity of the codebase will make type-related problems progressively harder to detect and prevent.

Changes to shared data structures may silently break consumers that are not covered by the relevant runtime paths or tests. Developers will also have to rely more heavily on documentation, conventions, tests, and manual verification to determine what types of values a function or component expects.

As the project continues to grow, this can make refactoring more risky and time-consuming. A change that should be straightforward may require manually searching the codebase for all affected usages, while some incompatibilities may only become apparent when a particular code path is executed.

This does not mean that JavaScript is inherently unsuitable for large applications, but retaining a dynamically typed codebase would make the project increasingly dependent on runtime checks and tests for problems that could otherwise be detected statically.

Goal

The project and the tooling used is correctly configured to use TypeScript so that the frontend can still be built and run in development server as usual.

All existing JavaScript source code has been migrated to TypeScript. This establishes TypeScript as the standard language for future frontend development.

The existing functionality and behavior of the application is preserved; the user is not affected by the migration. Appropriate TypeScript configuration and tooling is also included so that type checking is performed as part of the development and CI workflow.

After the migration, newly added frontend code should be written in TypeScript rather than JavaScript.

# Migrate JavaScript codebase to TypeScript The entire JavaScript codebase should be migrated to **TypeScript** to improve the long-term maintainability, scalability, and reliability of the frontend. ## Motivation As the codebase grows, JavaScript's dynamic type system makes it increasingly difficult to reliably understand and maintain the relationships between different parts of the application. Function parameters, return values, object structures, API responses, component properties, and application state can change without the tooling being able to detect all affected usages. TypeScript provides a static type system on top of JavaScript. This allows many classes of errors to be detected during development and CI rather than only when the affected code is executed. For example, invalid function arguments, incompatible assignments, missing object properties, and incorrect return types can be detected before the application is run. Type definitions also make the codebase easier to understand and refactor. When an interface, API response, or shared data structure changes, TypeScript can identify many locations that need to be updated. This is particularly valuable as the project grows and more components and features depend on the same data structures. TypeScript also provides significantly better editor support, including reliable autocompletion, navigation, refactoring, and inline documentation. This reduces the amount of implicit knowledge required to work on the codebase and makes it easier for additional developers to contribute. ## What happens if we do not migrate? If the project remains JavaScript-only, the increasing size and complexity of the codebase will make type-related problems progressively harder to detect and prevent. Changes to shared data structures may silently break consumers that are not covered by the relevant runtime paths or tests. Developers will also have to rely more heavily on documentation, conventions, tests, and manual verification to determine what types of values a function or component expects. As the project continues to grow, this can make refactoring more risky and time-consuming. A change that should be straightforward may require manually searching the codebase for all affected usages, while some incompatibilities may only become apparent when a particular code path is executed. This does not mean that JavaScript is inherently unsuitable for large applications, but retaining a dynamically typed codebase would make the project increasingly dependent on runtime checks and tests for problems that could otherwise be detected statically. ## Goal The project and the tooling used is correctly configured to use TypeScript so that the frontend can still be built and run in development server as usual. All existing JavaScript source code has been migrated to TypeScript. This establishes TypeScript as the standard language for future frontend development. The existing functionality and behavior of the application is preserved; the user is not affected by the migration. Appropriate TypeScript configuration and tooling is also included so that type checking is performed as part of the development and CI workflow. After the migration, newly added frontend code should be written in TypeScript rather than JavaScript.
jakob.scheid added this to the 0.2.0 milestone 2026-07-22 14:09:25 +02:00
jakob.scheid added the Kind/ChoreArea/GlobalCompat/Breaking
Priority
Medium
3
labels 2026-07-22 14:09:25 +02:00
jakob.scheid added this to the Project Board project 2026-07-22 14:09:25 +02:00
jakob.scheid changed title from Migrate to TypeScript to Migration to TypeScript 2026-07-22 14:10:12 +02:00
jakob.scheid added the
Reviewed
Confirmed
1
label 2026-08-02 13:46:47 +02:00
jakob.scheid moved this to To do in Project Board on 2026-10-06 17:26:59 +02:00
jakob.scheid self-assigned this 2026-10-24 19:39:09 +02:00
jakob.scheid started working 2026-10-24 19:39:11 +02:00
jakob.scheid added reference chore/migrate-to-typescript 2026-10-24 19:40:11 +02:00
jakob.scheid moved this to In progress in Project Board on 2026-10-24 19:40:14 +02:00
jakob.scheid worked for 38 minutes 2026-10-24 20:17:18 +02:00
jakob.scheid started working 2026-10-25 01:25:04 +02:00
jakob.scheid worked for 1 hour 22 minutes 2026-10-25 02:47:05 +02:00
jakob.scheid started working 2026-10-25 02:02:52 +01:00
jakob.scheid worked for 3 hours 1 minute 2026-10-25 05:03:53 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 5 hours 1 minute
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Seekra/frontend#135