Skip to content

Set up TypeScript support while maintaining compatibility with existing JavaScript files #236

@cherylli

Description

@cherylli

What do we need to build or fix?
We need to configure the project to support TypeScript so that future development can leverage its type safety and tooling benefits. The existing JavaScript files should continue to work without needing to be migrated immediately.

Technical details
Install Typescript, setup tsconfig to allow js

References:
Official TypeScript Handbook (TS + JS Projects)
https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html

TypeScript Configuration Options (tsconfig.json)
https://www.typescriptlang.org/tsconfig

Approach suggestions

  • Install TypeScript and necessary type definitions: yarn add -D typescript @types/node
  • Create a tsconfig.json file with allowJs enabled so existing .js files remain functional.
  • Update build scripts and tooling (e.g., ESLint, Babel, Webpack) to handle .ts and .tsx files.
  • Ensure the project compiles and runs with a mix of .js and .ts files.

Deadline
Please keep in mind that once you assign this task to yourself, you'll need to complete it in 10 days.

Acceptance criteria

  • Test the section and components in many screen sizes, you can use the Inspect tool for that.
  • Please test if the new changes added to the components do not affect the other instances.
  • Test the feature in many browsers, such as Chrome, Firefox, Edge, and Safari (MAC).
  • If there are any build problems when submitting your PR, run yarn build locally to solve the issues and commit the changes.
  • Update the CHANGELOG.md file.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions