@baeta/subscriptions-pubsub 2.0.0-next.17 → 2.0.0-next.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region lib/pubsub-engine.d.ts
|
|
2
1
|
/** biome-ignore-all lint/suspicious/noExplicitAny: allow any args*/
|
|
3
2
|
interface PubSubEngine {
|
|
4
3
|
publish: (triggerName: string, payload: any, ...rest: any[]) => Promise<void>;
|
|
@@ -6,8 +5,6 @@ interface PubSubEngine {
|
|
|
6
5
|
unsubscribe: (subId: number, ...rest: any[]) => void;
|
|
7
6
|
asyncIterableIterator: <T>(triggers: string | readonly string[], ...rest: any[]) => AsyncIterableIterator<T>;
|
|
8
7
|
}
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region lib/typed-pubsub.d.ts
|
|
11
8
|
/**
|
|
12
9
|
* Configuration options for TypedPubSub
|
|
13
10
|
*/
|
|
@@ -53,7 +50,7 @@ type RestAsyncIterableIteratorFnArgs<Fn> = Fn extends ((triggers: string | reado
|
|
|
53
50
|
* );
|
|
54
51
|
* ```
|
|
55
52
|
*/
|
|
56
|
-
declare class TypedPubSub<Engine extends PubSubEngine, Map extends PubSubMap> {
|
|
53
|
+
export declare class TypedPubSub<Engine extends PubSubEngine, Map extends PubSubMap> {
|
|
57
54
|
protected channelPrefix: string;
|
|
58
55
|
protected pubsub: Engine;
|
|
59
56
|
protected options?: TypedPubSubOptions;
|
|
@@ -65,6 +62,5 @@ declare class TypedPubSub<Engine extends PubSubEngine, Map extends PubSubMap> {
|
|
|
65
62
|
protected mapChannel: <C extends keyof Map>(channel: C) => string;
|
|
66
63
|
protected mapTriggers: <C extends keyof Map>(triggers: C | C[]) => string | string[];
|
|
67
64
|
}
|
|
68
|
-
|
|
69
|
-
export { TypedPubSub, type TypedPubSubOptions };
|
|
65
|
+
export type { TypedPubSubOptions };
|
|
70
66
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// lib/typed-pubsub.ts
|
|
2
2
|
/**
|
|
3
3
|
* Creates a type-safe wrapper around a PubSub implementation.
|
|
4
4
|
*
|
|
@@ -59,7 +59,6 @@ var TypedPubSub = class {
|
|
|
59
59
|
return Array.isArray(triggers) ? triggers.map(this.mapChannel) : this.mapChannel(triggers);
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { TypedPubSub };
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=index.js.map
|