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

feature: make class-transformer compatible with swc output #796

Open
Youmoo opened this issue Jun 29, 2021 · 4 comments
Open

feature: make class-transformer compatible with swc output #796

Youmoo opened this issue Jun 29, 2021 · 4 comments
Labels
flag: needs discussion Issues which needs discussion before implementation. type: feature Issues related to new features.

Comments

@Youmoo
Copy link

Youmoo commented Jun 29, 2021

Description

Hi. After switching from ts-node to swc, I find that class-transformer cannot work properly. After some investigation, I find that this line misses a condition. The full if check should (or might) be like this.

Proposed solution

I have made a repostory to demonstrate the above issue:

If we remove the !('value' in descriptor) check, the swc test will fail.

If you think this feature is acceptable, I'm happy to make a PR. Thank you

@Youmoo Youmoo added flag: needs discussion Issues which needs discussion before implementation. type: feature Issues related to new features. labels Jun 29, 2021
@yharaskrik
Copy link

This would be amazing! I would love for this to be able to be added in so that we can get swc working with nestjs

@alumni
Copy link

alumni commented Dec 22, 2021

I can confirm this works.

@leonard-henriquez
Copy link

Does class-transformer work with SWC now ?

@tonivj5
Copy link

tonivj5 commented Jan 28, 2023

Does class-transformer work with SWC now ?

it was fixed in swc-project/swc#3459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: needs discussion Issues which needs discussion before implementation. type: feature Issues related to new features.
Development

Successfully merging a pull request may close this issue.

5 participants