Skip to content

Migrate to TypeScript #8262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joeyparrish opened this issue Mar 12, 2025 · 3 comments
Open

Migrate to TypeScript #8262

joeyparrish opened this issue Mar 12, 2025 · 3 comments
Assignees
Labels
component: build system The issue involves the build system of Shaka Player type: code health A code health issue type: enhancement New feature or request
Milestone

Comments

@joeyparrish
Copy link
Member

This project should migrate to TypeScript. We need to decide how to do this with minimal disruption to the project and to our normal releases.

This will be the top-level issue for tracking this effort and plans for it.

Things to think about:

This should also resolve #6017 and make #8056 obsolete.

@MarianoFacundoArch
Copy link
Contributor

+1 Joey

I believe this shift will bring a host of benefits—improved type safety, better tooling, and enhanced code maintainability. Transitioning to TypeScript can also help us catch errors early, streamline our development process, and ultimately lead to a more robust project.
That said, the migration should be approached carefully to minimize disruption. For instance, generating Closure externs from .d.ts could be an effective way to support dependent projects still using Closure. Additionally, maintaining backward compatibility through dual bundles (ES6 and CJS/AMD/) seems like a practical solution, even if it adds some initial complexity.
I’m excited to see how it will improve our project’s structure and reliability.

@avelad
Copy link
Member

avelad commented Mar 13, 2025

  • Maybe generate Closure externs from .d.ts for dependent projects still using Closure (Does anyone need this?)

Since we're removing Closure, this should be removed too, at least that's my opinion.

@avelad avelad added type: code health A code health issue component: build system The issue involves the build system of Shaka Player labels Mar 14, 2025
@loicraux
Copy link
Contributor

A good time to switch to TypeScript, especially since : https://devblogs.microsoft.com/typescript/typescript-native-port/ 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system The issue involves the build system of Shaka Player type: code health A code health issue type: enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

5 participants