-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
No type metadata for decorated properties with user defined types #5360
Milestone
Comments
netroy
added a commit
to n8n-io/n8n
that referenced
this issue
May 26, 2023
netroy
added a commit
to n8n-io/n8n
that referenced
this issue
May 26, 2023
netroy
added a commit
to n8n-io/n8n
that referenced
this issue
May 26, 2023
This comment was marked as spam.
This comment was marked as spam.
Closing as the stc is now abandoned. #571 (comment) |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
some ORM libraries e.g sequelize depend on decorated property metadata in order to resolve the model properties for it.
When using swc as a transformer they fail because swc transforms any type into a
"design:type": Object
even for simple types e.gtype a = string
/type b = '123' | '456'
etc...Input code
Config
Playground link
https://play.swc.rs/?version=1.2.222&code=H4sIAAAAAAAAAyupLEhVKM7PTQ0BMWwVikuKMvPSrbkcUlKT84sSS%2FKLuNJK85JLMvPzwMpcYMIamlZQxQrVXApAUJRaUlqUp6AOUqUA161uzVXLxZWck1hcrOCWnw9V64BmFFgQJBZQlF9gBXcPWGt%2BXnF%2BTqpeTn66BsQKkIymNQDlWb%2BOuQAAAA%3D%3D&config=H4sIAAAAAAAAA02NSw7CMAxE7%2BJ1F8COrNn2EFbiVKnyk%2B1KRBV3J2lBsLM8b97ssIoFs0NFFuJxScuKTzCgrZJYDlVhAke2MGphAaO80WsCZcziC6fRirSgbY8vdUJ%2FtZkUHSr%2B2sgLaZ8huV2ud%2BivVNwWadjGdI9sSankVY4w5OAbGI9RujjI%2FKEP3xujmtUiyAAAAA%3D%3D
Expected behavior
same as tsc output:
Actual behavior
Version
1.2.222
Additional context
The said example works properly when the type is inlined into the property, maybe there is a way to evaluate the type metadata in the same manner?
The text was updated successfully, but these errors were encountered: