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
RobertMenke
changed the title
Usage of forwardRef if NestJS decorator is not captured by SWC
Usage of forwardRef in NestJS decorator is not captured by SWC
Oct 2, 2022
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
NestJS has a strategy for dealing with circular dependencies, which is the use of a function called
forwardRef
.Input code
Config
Playground link
https://play.swc.rs/?version=1.3.4&code=H4sIAAAAAAAAA32OTQrCMBCF93OKWSYbuy8oaXZuvcEknYISkjIZrVJ6d6XdFETf8v3wPXfON45KIbGxwM%2BxiGJMVCt2OAN%2BFEuuKveoRcxqbHLb0gxFJpL%2BwoMxFo8n9NbuaqNcH6SMwtSXnF4YWvRrbnFeYAFoGgwHreB%2BX%2FH%2Fr3wxqMVux3gDB1vo%2BeUAAAA%3D&config=H4sIAAAAAAAAA02OMQ7CMAxF7%2BK5QlXHrrCWjQOYxFQtSR3ZrkRU9e4kggo26%2Bu%2F%2F7zBrA76DRKKktRL82L4gh4sJ1InUzJowJNjQWNR6E1W2hswwUUfLLFSgUZ0%2BXK0PqU%2FbCBDj4Y%2FGmUkKxrSru3aongSpXNA1StG0mPhjko3CaV4goJF9mugaqzvldRxjLzMWgbUZHI2sKevZX8D5J%2BHyd8AAAA%3D
Expected behavior
I would expect that the code compiles because
tsc
does not errorActual behavior
ReferenceError: Cannot access 'MyClassName' before initialization
Version
1.3.4
Additional context
No response
The text was updated successfully, but these errors were encountered: