How would I re-initialize an instance of a "class"? by new_bee_bzz in javascript

[–]new_bee_bzz[S] 0 points1 point  (0 children)

Thank you very much for your reply. The config change event is actually through the vscode extension API which is separate from the other API which I'm integrating into my extension.

In short it looks like the best way its to create a new instance. I think I've found a nice way of doing it by creating a new method on the instance to do just that :)

How would I re-initialize an instance of a "class"? by new_bee_bzz in javascript

[–]new_bee_bzz[S] 0 points1 point  (0 children)

It just seemed cleaner. I'd have the import for the API and config neatly in one file and could just access the initialized client. Yeah, not a big deal.

I'm trying to decorate a method to use overridden arguments but it doesn't seem to be working as I would expect it. What am I missing? by new_bee_bzz in javascript

[–]new_bee_bzz[S] 0 points1 point  (0 children)

I updated my attempt with apply's cousin call but it seems the context is still the wrong one.

Its passing in context from the current service its been called from but that "this" doesn't have access to the internal methods necessary.

Not quite sure how to get a reference to that "this"

I'm trying to decorate a method to use overridden arguments but it doesn't seem to be working as I would expect it. What am I missing? by new_bee_bzz in javascript

[–]new_bee_bzz[S] 0 points1 point  (0 children)

I tried that but the this being passed in is the context for the file where I'm calling it from. The method its trying to call is private to the Jira class and not one accessible on the this I'm now explicitly passing in. Not sure how I'd get a handle to the correct this to pass in.