Skip to content

Commit e8e44ec

Browse files
committed
Remove package-level exports for BaseControllerV{1,2}Instance, ControllerInstance, as these are unsuited for general use
1 parent c92f2b1 commit e8e44ec

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/composable-controller/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Add and export functions `isBaseControllerV1` and `isBaseController`, which are type guards for validating controller instances ([#3904](https://github.com/MetaMask/core/pull/3904))
13-
- Add and export types `BaseControllerV1Instance`, `BaseControllerV2Instance`, `ControllerInstance` which are the narrowest supertypes for all controllers extending from, respectively, `BaseControllerV1`, `BaseController`, and both ([#3904](https://github.com/MetaMask/core/pull/3904))
1413

1514
### Changed
1615

packages/composable-controller/src/ComposableController.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export type BaseControllerV1Instance =
2626
* because the generic parameters it expects require knowing the exact shape of the controller's state and messenger.
2727
*
2828
* Instead, we look for an object with the `BaseController` properties that we use in the ComposableController (name and state).
29+
*
30+
* Note that this type is not sufficiently type-safe for general use, and is only intended for use within the ComposableController.
2931
*/
3032
export type BaseControllerV2Instance = {
3133
name: string;
@@ -35,6 +37,8 @@ export type BaseControllerV2Instance = {
3537
// TODO: Remove `BaseControllerV1Instance` member once `BaseControllerV2` migrations are completed for all controllers.
3638
/**
3739
* A type encompassing all controller instances that extend from `BaseControllerV1` or `BaseController`.
40+
*
41+
* Note that this type is not sufficiently type-safe for general use, and is only intended for use within the ComposableController.
3842
*/
3943
export type ControllerInstance =
4044
| BaseControllerV1Instance

packages/composable-controller/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
export type {
2-
BaseControllerV1Instance,
3-
BaseControllerV2Instance,
4-
ControllerInstance,
52
ComposableControllerState,
63
ComposableControllerStateChangeEvent,
74
ComposableControllerEvents,

0 commit comments

Comments
 (0)