vlio20 / utils-decorators

Decorators for web and node applications
https://vlio20.github.io/utils-decorators/
MIT License
216 stars 13 forks source link

"utils-decorators" has no exported member 'delegatify'. #125

Closed tripodsgames closed 2 years ago

tripodsgames commented 2 years ago

I'm trying to use the delegate with Function and the following error occurs: "utils-decorators" has no exported member 'delegatify'.

vlio20 commented 2 years ago

Yes, sounds like a bug - thanks for raising it. @tripodsgames Do you want to submit a PR?

tripodsgames commented 2 years ago

Yes, sounds like a bug - thanks for raising it. @tripodsgames Do you want to submit a PR?

Sure!

vlio20 commented 2 years ago

Let me know if you any help.

How are you planning to use the delegator?

tripodsgames commented 2 years ago

Let me know if you any help.

How are you planning to use the delegator?

I use it a lot via decorators, but i want to put it in a rxjs subscribe without needing a new method.

vlio20 commented 2 years ago

It would be interesting to hear the use case of the decorator usage

tripodsgames commented 2 years ago

For example, I have a service that makes multiple requests every 10 seconds, with the delegate, I can ensure that only one request will be executed at a time.

Another use is for asynchronous actions(Buttons, inputs, etc...), I use many asynchronous functions on button clicks, with the delegate I can ensure that a function will only be called once, this prevents double clicks to be executed twice for example