-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added compat exports and extensibility #76
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, but I'm curious: is there a use case for having the initialization utils (e.g. addComposerAutocomplete) exported, since functions can't be overriden?
I'd be a fan of exporting an object which contains these currently unexported utils, as this can be extended/overridden. |
Functions cannot be extended or overriden. |
@askvortsov1 They can when part of an object. It's what we do in DiscussionControls, isn't it? |
The functions themselves are not changed. What happens is that when we call So, if a function is imported as a function, not dynamically resolved as a member of an object, there is no way to "override" that function. If we were to |
@askvortsov1 this has been done here because it is done like that in |
I think I would prefer not to export those, as they definitely aren't part of the public API |
* Added extensibility * Corrected object export * Exported the `insertMention` util * Return a `Promise` in the `reply` util (for extensibility) * Removed initialization utils Co-authored-by: Rafael Horvat <[email protected]>
* Added extensibility * Corrected object export * Exported the `insertMention` util * Return a `Promise` in the `reply` util (for extensibility) * Removed initialization utils Co-authored-by: Rafael Horvat <[email protected]>
Changes proposed in this pull request:
Added compat exports and extensibility.
Reviewers should focus on:
Check that nothing is broken.
Necessity
Confirmed