Closed benlei closed 1 month ago
Thanks @benlei.
I'm not sure about your TypeScript configuration and jest
. We use the native test runner and it's working fine.
Unexpected token 'export'
isn't really a code issue but suggests there's an issue with the setup. I put together a small gist with a TypeScript config that works here:
https://gist.github.com/PatrickHeneise/c21aba158085b5dd1165b6239453c8f8
Feel free to add a d.ts
file in a pull request
Is your feature request related to a problem? Please describe.
I was trying to create a TS action that used this dependency, but it's missing a declaration file... but even if I were to declare a type, the import seems to fail for some reason.
I created an example repo where you can also test it out: https://github.com/benlei/issue-forms-body-parser-bug
Commands ran:
Error Observed:
Describe the solution you would like
I would like to be able to use your dependency in my TS action that I created through GitHub's own TS action template. With that being said, I may also be creating TS applications that will need to also use this dependency that'll also likely run into the same error.
Describe alternatives you have considered
I can pass the data output of your action to my own action/step to export the outputs... but if I have many workflows + need to update one/both of those steps I'd have to update all the workflows too. Would be more convenient if I can just access outputs directly.
Plus if I were to create a TS application... that wouldn't be possible.
Additional context
It's probably the case that this can't really be made to work with CommonJS projects... but at the very least if types can be defined/provided, that'd be great.