denoland / deployctl

Command line tool for Deno Deploy
https://deno.com/deploy
MIT License
352 stars 58 forks source link

Rewrite `action/index.js` in TypeScript and generate JS using dnt #322

Open magurotuna opened 4 months ago

magurotuna commented 4 months ago

We write plain JavaScript for the entrypoint of GitHub Actions in action/index.js. It becomes bad in terms of developer experience and more prone to easy bugs, as the code gets bigger. For instance, #319 could have been detected with the type checker if we had written it in TypeScript.

One possible approach to tackle this issue would be to rewrite action/index.js in TypeScript and convert it to Node.js compatible JavaScript using dnt. This way we'd be able to take advantage of type checking during development.