1 | import Observable from 'zen-observable-ts';
|
2 | import { PubSubContent } from './PubSub';
|
3 | export interface PubSubOptions {
|
4 | [key: string]: any;
|
5 | ssr?: boolean;
|
6 | PubSub?: {};
|
7 | }
|
8 | export interface ProviderOptions {
|
9 | [key: string]: any;
|
10 | provider?: string | symbol;
|
11 | }
|
12 | export interface PubSubProvider {
|
13 | configure(config: Record<string, unknown>): Record<string, unknown>;
|
14 | getCategory(): string;
|
15 | getProviderName(): string;
|
16 | publish(topics: string[] | string, msg: PubSubContent, options?: ProviderOptions): void;
|
17 | subscribe(topics: string[] | string, options?: ProviderOptions): Observable<PubSubContent>;
|
18 | }
|