Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support legacy parameter decorators for typescript #29

Merged
merged 11 commits into from
Apr 9, 2021

Conversation

LukeCSamuel-RV
Copy link
Contributor

During further investigation, I discovered that the @babel/plugin-proposal-decorators plugin does not enable support decorators applied to method/constructor properties. This PR is to enable support for these decorators as well.

@pi0
Copy link
Member

pi0 commented Apr 6, 2021

Hi @LukeCSamuel-RV thanks for PR. Would you please create a fixture in test/fixtures/typescript/decoratos.ts covering both usecases? (tests are locally only now)

@LukeCSamuel-RV
Copy link
Contributor Author

@pi0 I might need some guidance, running node ./test/jiti.js as shown in the README doesn't work as the file doesn't exist. Do I need to add a file similar to the one under bench/jiti.js to initialize Jiti and test the typescript module?

@pi0
Copy link
Member

pi0 commented Apr 6, 2021

You can try it out via yarn jiti ./test/path/to/file.ts (a yarn build step is necessary). BTW sorry for lack of enough contrib docs. We need to have better testing.

@LukeCSamuel-RV
Copy link
Contributor Author

All good and thanks for the help, this is my first time contributing to OSS so I appreciate your quick responses!

@pi0 pi0 merged commit 6586a1c into unjs:main Apr 9, 2021
@pi0
Copy link
Member

pi0 commented Apr 9, 2021

Thanks for PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants