Skip to content

Commit f057a12

Browse files
committed
Use DelegatedMessenger as parent type
1 parent 2930fbb commit f057a12

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/messenger/src/Messenger.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ export class Messenger<
188188
* The parent messenger. All actions/events under this namespace are automatically delegated to
189189
* the parent messenger.
190190
*/
191-
readonly #parent?: Messenger<
192-
string,
193-
Action | ActionConstraint,
194-
Event | EventConstraint
195-
>;
191+
readonly #parent?: DelegatedMessenger<Action, Event>;
196192

197193
readonly #actions = new Map<Action['type'], Action['handler']>();
198194

@@ -247,11 +243,7 @@ export class Messenger<
247243
parent,
248244
}: {
249245
namespace: Namespace;
250-
parent?: Messenger<
251-
string,
252-
Action | ActionConstraint,
253-
Event | EventConstraint
254-
>;
246+
parent?: DelegatedMessenger<Action, Event>;
255247
}) {
256248
this.#namespace = namespace;
257249
this.#parent = parent;

0 commit comments

Comments
 (0)