Closed samreid closed 4 hours ago
Patch to go into npx tsx:
Current jab script:
Update patch:
This one is a little cleaner:
Some commits in https://github.com/phetsims/chipper/issues/1437 with typescript in chipper/js/grunt/ that we may want to move over here.
In order to accomplish:
Preserve history of tasks over --follow via copying Gruntfile
we will work in a new branch typescript_chipper_1459_b
Current tsx patch:
next one just in case:
Dynamically discover task names and parse doc:
Patch for tsconfig and next steps:
After reverting the patch, I made minor updates until lint-everything and tsc all were passing. It seems we are in a good spot to merge this branch to main, then continue in a subsequent issue and a new branch.
I merged the above commits to main and pushed. I described on slack for other developers to pull and npm update in chipper. I'll open a new issue + new branch for next steps.
Everything completed on tracked in other issues. We now support TypeScript in chipper/js/grunt. But we would like to work on #1463 and #1463 before recommending broader usage to the team. Closing.
From an idea in https://github.com/phetsims/chipper/issues/1437, we could use grunt as a thin wrapper that spawns a new process in a runtime under our control. This will help us modularize and isolate our dependence on grunt, and allow us flexibility to use alternate runtimes such as
tsx
and TypeScript.npx ../chipper/node_modules/.bin/tsx
"allowSyntheticDefaultImports": true
oresModuleInterop
for imports?