/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/projects/protocol/src/lib/message-bus.ts
16 строк
558 B
hawkgs
fix(devtools): MessageBus.on return type (#62898)
31 июл 2025, 12:16
31 июл 2025, 12:16
b5fc949
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export type Parameters<F> = F extends (...args: infer T) => any ? T : never; export abstract class MessageBus<T> { abstract on<E extends keyof T>(topic: E, cb: T[E]): () => void; abstract once<E extends keyof T>(topic: E, cb: T[E]): void; abstract emit<E extends keyof T>(topic: E, args?: Parameters<T[E]>): boolean; abstract destroy(): void; }