feature: add JavaScript codegen
Summary
closes #39
Adds functionality to check the output file type to enable JS codegen. When .js or .mjs, will output JS ESM code, when .cjs, will output CommonJS code.
Both JS format types will output fully typed code using JSDocs.
Additionally, can override the file type with --output-type, which accepts TS, CJS, or ESM and defaults to TS. Will not change the extension used. This was added so you can generate a .js as CommonJS and a way to output CommonJS to stdout.
Why bother
I use JSDocs + the typebox check compiler to get fast runtime checks for external inputs.
@xddq let me know if you want me to squash early, figured you could squash what you want on merge
@xddq im so used to not being able to run formatters x.x mb. ran it / checked wfs on the fork now