Skip to content

[WIP] Native Typescript support#50

Open
moufmouf wants to merge 23 commits intoThaUnknown:masterfrom
workadventure:copilot/convert-js-to-typescript
Open

[WIP] Native Typescript support#50
moufmouf wants to merge 23 commits intoThaUnknown:masterfrom
workadventure:copilot/convert-js-to-typescript

Conversation

@moufmouf
Copy link

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[ ] Bug fix
[x] New feature
[ ] Other, please explain:

What changes did you make? (Give an overview)

Converted entire JavaScript codebase to TypeScript with comprehensive type definitions and zero any types, including all test files.

Because airtap does not have proper Typescript support, I also migrated tests to Vitest.
I bumped test unit tests from Node 18 to Node 20 (oldest supported version), and modified the CI so that is runs both Node AND chromium tests.
Note: firefox tests are for now failing in CI, but working locally, I still need to understand why (though that could be part of another PR).

Most of the work was done by Copilot. I reviewed the code, tested it, and manually fine-tuned it. It's working on a test setup of a pretty large project ( https://github.com/workadventure/workadventure ).

There is no "any" type used.

What is lacking:

I'm not a fan of pushing the compiled code to the repo directly, so I still need to set up a Github action that would build, then push the compiled code to NPM (probably using semantic-release).

Before going to far, I thought I would open the "WIP" PR to gather some feedback. Is this something you would be interested to merge?

Copilot AI and others added 23 commits December 9, 2025 20:15
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
…r experience

Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Migrate test framework from tape to vitest
* Migrate from airtap to vitest + playwright for browser testing
* Add test screenshots to gitignore and remove them from git
* Update CI workflow to keep browser testing optional
* Fixing tests so they can run in both NodeJS and browsers
* Run browser tests in CI
* Upgrading to Node 20 (latest supported version)
…we need to declare it as a dependency instead of a dev-dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants