Closed JulianWielga closed 5 years ago
Could you verify it works with TS as well? I remember something about Babel and TS's decorator stuff being different regarding initializers.
I've tested it in my project with @babel/typescript
preset and @babel/plugin-proposal-class-properties
with loose: true
. Did you mean plain typescript compiler? I think it's impossible to decorate field holding function without babel.
A Property Descriptor is not provided as an argument to a property decorator due to how property decorators are initialized in TypeScript(...)
https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators
Aha, then it should be fine
I think that if someone is using decorators or class properties holding arrow function and typescript knows what and how to do it and is prepared for problems :)
Well, if someone encounters an issue with TS I’ll ping you 😄
Thanks for the PR, I’ll merge and publish tomorrow!
Released as 1.0.3, thanks for your contribution! 🎉
I updated your readme assuming that this works.