@@ -10,7 +10,6 @@ import type { Patch } from 'immer';
10
10
11
11
export const controllerName = 'ComposableController' ;
12
12
13
- // TODO: Remove this type once `BaseControllerV2` migrations are completed for all controllers.
14
13
/**
15
14
* A type encompassing all controller instances that extend from `BaseControllerV1`.
16
15
*/
@@ -34,7 +33,6 @@ export type BaseControllerV2Instance = {
34
33
state : StateConstraint ;
35
34
} ;
36
35
37
- // TODO: Remove `BaseControllerV1Instance` member once `BaseControllerV2` migrations are completed for all controllers.
38
36
/**
39
37
* A type encompassing all controller instances that extend from `BaseControllerV1` or `BaseController`.
40
38
*
@@ -48,7 +46,6 @@ export type ControllerInstance =
48
46
* Determines if the given controller is an instance of BaseControllerV1
49
47
* @param controller - Controller instance to check
50
48
* @returns True if the controller is an instance of BaseControllerV1
51
- * TODO: Deprecate once `BaseControllerV2` migrations are completed for all controllers.
52
49
*/
53
50
export function isBaseControllerV1 (
54
51
controller : ControllerInstance ,
@@ -86,10 +83,10 @@ export function isBaseController(
86
83
) ;
87
84
}
88
85
86
+ // TODO: Replace `any` with `Json` once `BaseControllerV2` migrations are completed for all controllers.
89
87
export type ComposableControllerState = {
90
88
// `any` is used here to disable the `BaseController` type constraint which expects state properties to extend `Record<string, Json>`.
91
89
// `ComposableController` state needs to accommodate `BaseControllerV1` state objects that may have properties wider than `Json`.
92
- // TODO: Replace `any` with `Json` once `BaseControllerV2` migrations are completed for all controllers.
93
90
// eslint-disable-next-line @typescript-eslint/no-explicit-any
94
91
[ name : string ] : Record < string , any > ;
95
92
} ;
@@ -171,7 +168,6 @@ export class ComposableController extends BaseController<
171
168
/**
172
169
* Constructor helper that subscribes to child controller state changes.
173
170
* @param controller - Controller instance to update
174
- * TODO: Remove `isBaseControllerV1` branch once `BaseControllerV2` migrations are completed for all controllers.
175
171
*/
176
172
#updateChildController( controller : ControllerInstance ) : void {
177
173
if ( ! isBaseController ( controller ) && ! isBaseControllerV1 ( controller ) ) {
0 commit comments