Skip to main content

notify

通知器, 解决跨模块依赖问题

安装

npm install @jelper/notify

样例

notify 使用

=> 数字:0

themeNotify 使用

主题: ===

type

type MoudleType = <T = void>() => {
    notify: (data: T) => void;
    on: (callback: (data: T) => void) => Unsubscribe;
    once: (callback: (data: T) => void) => Unsubscribe;
    destroy: () => void;
};