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
ts-node src/index.ts
[Function: get name] getter
[Function: sayHi] method
[class Foo] class
hello
hello
Actual behavior
SWCRC=true node -r @swc-node/register src/index.ts
/Users/ola/code/swc-jest-example/src/foo.ts:376
@decorate()
^
SyntaxError: Invalid or unexpected token
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Module._compile (/Users/ola/code/swc-jest-example/node_modules/pirates/lib/index.js:136:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Object.newLoader [as .ts] (/Users/ola/code/swc-jest-example/node_modules/pirates/lib/index.js:141:7)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
Node.js v18.16.0
Version
1.3.56
Additional context
No response
The text was updated successfully, but these errors were encountered:
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
parse error trying to use decorator in an exported class
Input code
Config
Playground link
https://play.swc.rs/?version=1.3.56&code=H4sIAAAAAAAAA32OQQrCQAxF93OKT1ctiGfoSrzGMI11cExkJgWl9O6NrVVBMLvkv%2FdJ21GQ7JXqxtH9JlkRki8FBxGMzgHtFwH0pGB%2FtcVS2GTSITOqM6UklZ2mX6n4xzH%2BM8w5DRw0CuNjLvyL3uJafbYfdhgvkbtp6wzCRRLtk%2FRv4gk0a%2F0M7hpWieYAAAA%3D&config=H4sIAAAAAAAAA1WOwQqDMBBE7%2FkK2XMLwUIP%2FYdeew%2B6KSmayO4KDeK%2Fd43V2tvOvJllJlNV8OIGbtWkp4rBESPtWh3OUdxbHZA8IDcUBoHTRltsEjlJxJoQGrGAeeUg5CL7RP3x4V55IHFIcXld27o%2B2wuY%2F7qjJ8rCkTVhwXwZ9KkdO%2FzNXqatueshFGLwWW3vOsZiBb5vzTJ2%2FgCck9nlAgEAAA%3D%3D
Expected behavior
decorator works, same as in node
Actual behavior
Version
1.3.56
Additional context
No response
The text was updated successfully, but these errors were encountered: