better-docs
better-docs copied to clipboard
Add support for ".cts" and ".mts" files
Please update the code to accept ".cts" and ".mts" files as discussed at https://github.com/microsoft/TypeScript/issues/27957#issuecomment-926932331
Currently, I am getting the following error:
ERROR: Unable to parse C:\Users\Gili\Documents\requirements.js\src\ArrayAsserter.mts: Unexpected token, expected "from" (2:0)
in a project that used to work just fine when the extension was .ts
. I cannot use a .ts
extension for reasons discussed in that other GitHub ticket.
Thank you.
As a workaround, I configured my build script to copy all .mts
files into a temporary directory, rename their extension to .ts
and run better-docs
against the temporary directory. This works fine.