Closed samchon closed 2 years ago
This is a demonstration repo occuring that bug.
https://github.com/samchon/typescript-transform-paths-163
@nonara Same error on v3.4.2
Thanks for the report!
I've cloned and done some preliminary investigation. From what I can tell the PropertyDescriptor
is not being passed from the compiled __decorate()
function in controller.ts
.
Notably, I would point out that 3.3.x did not properly support TS 4.8, because TS merged Decorators and Modifiers in their AST. It also didn't properly support ts-node
when not run in transpileOnly
mode.
There is a chance that what you are seeing is a result of these modes being supported, and it may not be a bug within TSTP, itself.
The best way to track this out is to get at the compiled source for controller.ts
and then determine exactly why it's not passing a property descriptor with one version vs. the other.
Unfortunately, I don't have the time right now to continue tracking this out. I've spent the last two days during a heavy work week doing the fixes I could. If you're able to tag in and do some debugging to figure out more about what is happening, you can keep me in the loop in this thread and I can help get it done. I just don't have the bandwidth right now to do in depth debugging.
Never mind! I had a thought on this and did a little more digging. Thanks for reporting this.
It is corrected in v3,4,3, Let me know if you have any further issues.
After updating to 3.4.1 version, such error occurs.
If I rollback to previous version, the error be disappeard.
The one thing special is, such error occurs only when run by
dynamic import
statement withts-node
, but imported in a JS file. Type of decorator is not a matter.