Skip to content

fix: improve type of the handler parameter in factoryMethod#554

Merged
tbouffard merged 3 commits intomainfrom
fix/type_PopupMenuHandler.factoryMethod
Nov 2, 2024
Merged

fix: improve type of the handler parameter in factoryMethod#554
tbouffard merged 3 commits intomainfrom
fix/type_PopupMenuHandler.factoryMethod

Conversation

@tbouffard
Copy link
Member

The parameter type is now MaxPopupMenu instead of PopupMenuItem which had no relation with what
is implemented in the factoryMethod function.

Also simplify nullish checks in the implementation of MaxPopupMenu and MaxToolbar.
In MaxPopupMenu.addItem, use a more precise type for the "funct" parameter to improve guidance.

Notes

Fixes #308

The parameter type is now `MaxPopupMenu` instead of `PopupMenuItem` which had no relation with what
is implemented in the `factoryMethod` function.

Also simplify nullish checks in the implementation of MaxPopupMenu and MaxToolbar.
In MaxPopupMenu.addItem, use a more precise type for the funct parameter to improve guidance.
@tbouffard tbouffard added the bug Something isn't working label Nov 2, 2024
@tbouffard tbouffard changed the title fix: use the type for the handler parameter in factoryMethod function fix: improve type of the handler parameter in factoryMethod Nov 2, 2024
@tbouffard tbouffard marked this pull request as ready for review November 2, 2024 17:33
@tbouffard tbouffard merged commit a8b9655 into main Nov 2, 2024
@tbouffard tbouffard deleted the fix/type_PopupMenuHandler.factoryMethod branch November 2, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PopupMenuHandler.factoryMethod has a wrong type?

1 participant