-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
https://github.com/bcmi-labs/create-plugin-communication/blob/d63b22a9073defb9c7663ea849ee013de09b08a0/src/readMessages.js#L193
@eclipse1985 is there a reason to use this syntax, or we can change it to ES6 --> const deferred = ()=> {...}
?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
eclipse1985 commentedon Jun 18, 2018
You're right, here Deferred is used as an old-style ES5 contructor. With ES6 you should use classes, but I don't know if you can just rewrite this like an arrow function. I will do some tests.
eclipse1985 commentedon Jun 18, 2018
Rewriting Deferred as an arrow function, obviously loses the pointer to the functional this, so the only way to avoid the use of a plain constructor function, is to write a class like this:
what do you think @AlbyIanna ?
AlbyIanna commentedon Jun 18, 2018
Okay for me.