Skip to content

Improve BaseControllerV2 messenger type - #556

Merged
Gudahtt merged 3 commits into
mainfrom
improve-base-controller-v2-messenger-type
Aug 18, 2021
Merged

Improve BaseControllerV2 messenger type#556
Gudahtt merged 3 commits into
mainfrom
improve-base-controller-v2-messenger-type

Conversation

@Gudahtt

@GudahttGudahtt commented Aug 11, 2021

Copy link
Copy Markdown
Member

The new base controller now accepts the messenger type as a generic parameter, rather than hard-coding it to be RestrictedControllerMessenger<N, any, any, string, string>. This allows controllers to use the messenger directly without sacrificing any type safety.

Note: this is a breaking change, because anyone extending BaseControllerV2 will now be required to supply an additional generic parameter.

@Gudahtt
Gudahtt requested a review from a team as a code ownerAugust 11, 2021 14:57
The new base controller now accepts the messenger type as a generic
parameter, rather than hard-coding it to be
`RestrictedControllerMessenger<N, any, any, string, string>`. This
allows controllers to use the messenger directly without sacrificing
any type safety.
@Gudahtt
Gudahttforce-pushed the improve-base-controller-v2-messenger-type branch from 869aa30 to c0d7dbcCompareAugust 11, 2021 15:23
@Gudahtt

Copy link
Copy Markdown
MemberAuthor

This was motivated by this discussion: #555 (comment)

@rekmarksrekmarks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@Gudahtt
Gudahtt merged commit b8c8370 into mainAug 18, 2021
@Gudahtt
Gudahtt deleted the improve-base-controller-v2-messenger-type branch August 18, 2021 16:23
@adonesky1adonesky1 mentioned this pull request Aug 27, 2021
Merged
amitabh94 pushed a commit to amitabh94/core that referenced this pull request Jun 16, 2026
* 22.0.0
* release(22.0.0): update CHANGELOG
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: rarquevaux <r.arquevaux@gmail.com>
Sign up for freeto 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

@Gudahtt@rekmarks