Refactor base-controller
for type safety and better application of controller-messenger pattern
#2061
Labels
base-controller
for type safety and better application of controller-messenger pattern
#2061
Motivation
The
BaseController
,ControllerMessenger
, andRestrictedControllerMessenger
classes outline the controller-messenger pattern that are implemented by all of our controllers.However, these classes are currently limited by incomplete or unsafe typing, and weak enforcement of best practices. A rigorous overhaul of the types and methods defined in
base-controller
, along with updates to enable more accurate allowlisting of action and events, will unlock type-safe feature development for all of our clients and services.These changes remove blockers for updating controllers to use
BaseControllerV2
, while completely deprecatingBaseControllerV1
. This affects all controllers slated to be consolidated and migrated into the core repo.Tasks
any
usage.ActionConstraint
,ExtractActionParameters
,ExtractActionResponse
SelectorFunction
,EventSubscriptionMap
getState
action andstateChange
event are defined in the base controller.The text was updated successfully, but these errors were encountered: