Skip to content

Conversation

SaintPepsi
Copy link
Contributor

No description provided.

* and will provide the value passed to this function.
*/
public delete(at: Rectangle | Point) {
public delete(at: Rectangle | Point, shouldEmitEvent: boolean = true) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are still passing a rectangle, so this doesn't accomplish anything other than no longer creating an extra function on the rectangle when it is made. This seems like a premature optimization to me. In addition, every change should trigger events, it is up to subscribers to determine whether the event is relevant. Think of it like a proxy, the caller of this function should not be aware that there are any subscribers in my opinion - the same as any other store that has a subscriber. If you want to avoid an infinite loop of events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants