diff --git a/packages/announcement-controller/src/AnnouncementController.test.ts b/packages/announcement-controller/src/AnnouncementController.test.ts index a0834bd0449..56991f6ff53 100644 --- a/packages/announcement-controller/src/AnnouncementController.test.ts +++ b/packages/announcement-controller/src/AnnouncementController.test.ts @@ -1,4 +1,4 @@ -import { ControllerMessenger } from '@metamask/base-controller'; +import { Messenger } from '@metamask/base-controller'; import type { AnnouncementControllerState, @@ -17,11 +17,11 @@ const name = 'AnnouncementController'; * @returns A restricted controller messenger. */ function getRestrictedMessenger() { - const controllerMessenger = new ControllerMessenger< + const messenger = new Messenger< AnnouncementControllerActions, AnnouncementControllerEvents >(); - return controllerMessenger.getRestricted({ + return messenger.getRestricted({ name, allowedActions: [], allowedEvents: [], diff --git a/packages/announcement-controller/src/AnnouncementController.ts b/packages/announcement-controller/src/AnnouncementController.ts index 3e114ff3247..8bb1bb35c65 100644 --- a/packages/announcement-controller/src/AnnouncementController.ts +++ b/packages/announcement-controller/src/AnnouncementController.ts @@ -1,7 +1,7 @@ import type { ControllerGetStateAction, ControllerStateChangeEvent, - RestrictedControllerMessenger, + RestrictedMessenger, } from '@metamask/base-controller'; import { BaseController } from '@metamask/base-controller'; @@ -66,7 +66,7 @@ const metadata = { }, }; -export type AnnouncementControllerMessenger = RestrictedControllerMessenger< +export type AnnouncementControllerMessenger = RestrictedMessenger< typeof controllerName, AnnouncementControllerActions, AnnouncementControllerEvents, diff --git a/packages/announcement-controller/src/index.ts b/packages/announcement-controller/src/index.ts index f3ce26e85e4..86cac4c8a2f 100644 --- a/packages/announcement-controller/src/index.ts +++ b/packages/announcement-controller/src/index.ts @@ -1 +1,11 @@ -export * from './AnnouncementController'; +export type { + AnnouncementMap, + StateAnnouncementMap, + AnnouncementControllerState, + AnnouncementControllerActions, + AnnouncementControllerEvents, + AnnouncementControllerGetStateAction, + AnnouncementControllerStateChangeEvent, + AnnouncementControllerMessenger, +} from './AnnouncementController'; +export { AnnouncementController } from './AnnouncementController';