You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unioning null the type on the decorator metadata is Object when for example it is string | null the type should be string. This is causing issues when using type-graphql and typeorm. This is similar to #2703
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.
Describe the bug
When unioning null the type on the decorator metadata is
Object
when for example it isstring | null
the type should bestring
. This is causing issues when using type-graphql and typeorm. This is similar to #2703Input code
Config
Playground link
https://play.swc.rs/?version=1.2.133&code=H4sIAAAAAAAAA02PwWrDMAyG73kK7WQH0jxAQstg9NSNwUYPOw3XUUM2xw6yPDBd3312k5TpZsn6v0%2FDODliEIRng5o3I7LqFCvRFoV21jM8vT5%2FHvYfsIX3OJ6ckUI7I8r7PL3CaNNYlrDdwaWAVIQcyIJ0p6%2BU2oCysYJvjA14psH2%2F77mepvpdYfnweLL4iAXdAXiR5mAooI57xaVDPLqtS2u2cUo7%2BHokZbYx9krSelAhFbHhxUOv2CDMWlxvsEZrI3r5WrRI98VRId%2B6G3Dccr8DKgncuxyI4mt4aIs2z%2FsblknTAEAAA%3D%3D&config=H4sIAAAAAAAAA02OMQ7CMAxF7%2BK5A7CRFVa4g5WYipLEke1KRFXuTiKEyvaH9%2FT%2BBot6cBsUFCUZS2s2fIMDq4XUy7MYTBDIs6CxKDiTldoEJpj1wZKGFWlGX68%2F6gv9aTcyDGi42ygzWc%2BQng7Hc0%2B8iMolouodE%2B2ZxGGNNBrjUBc8p8R5UWjtA3yjCke%2FAAAA
Expected behavior
[Function: String]
is outputActual behavior
[Function: Object]
is outputVersion
@swc/core: 1.2.133
Additional context
Used #2703 as a reference.
The text was updated successfully, but these errors were encountered: