@asaidimu/utils-database 3.1.7 → 3.1.9
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/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +4 -2
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryFilter, PaginationOptions } from '@asaidimu/query';
|
|
2
|
-
import { IndexDefinition,
|
|
2
|
+
import { IndexDefinition, SchemaChange, DataTransform, PredicateMap, SchemaDefinition } from '@asaidimu/anansi';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -821,14 +821,14 @@ interface EventBus<TEventMap extends Record<string, any>> {
|
|
|
821
821
|
* subscription
|
|
822
822
|
* @returns A function to unsubscribe from the event.
|
|
823
823
|
*/
|
|
824
|
-
subscribe
|
|
824
|
+
subscribe<TEventName extends keyof TEventMap | "*">(eventName: TEventName, callback: TEventName extends "*" ? (payload: TEventMap[keyof TEventMap], event: keyof TEventMap) => void : (payload: TEventMap[TEventName]) => void, options?: SubscribeOptions): () => void;
|
|
825
825
|
/**
|
|
826
826
|
* Subscribes to an event and automatically unsubscribes after it fires once.
|
|
827
827
|
* @param eventName - The name of the event to subscribe to.
|
|
828
828
|
* @param callback - The function to call when the event is emitted.
|
|
829
829
|
* @returns A function to cancel the one-shot subscription before it fires.
|
|
830
830
|
*/
|
|
831
|
-
once
|
|
831
|
+
once<TEventName extends keyof TEventMap | "*">(eventName: TEventName, callback: TEventName extends "*" ? (payload: TEventMap[keyof TEventMap], event: keyof TEventMap) => void : (payload: TEventMap[TEventName]) => void, options?: SubscribeOptions): () => void;
|
|
832
832
|
/**
|
|
833
833
|
* Emits an event with a payload to all subscribed listeners.
|
|
834
834
|
* @param event - An object containing the event name and payload.
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryFilter, PaginationOptions } from '@asaidimu/query';
|
|
2
|
-
import { IndexDefinition,
|
|
2
|
+
import { IndexDefinition, SchemaChange, DataTransform, PredicateMap, SchemaDefinition } from '@asaidimu/anansi';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -821,14 +821,14 @@ interface EventBus<TEventMap extends Record<string, any>> {
|
|
|
821
821
|
* subscription
|
|
822
822
|
* @returns A function to unsubscribe from the event.
|
|
823
823
|
*/
|
|
824
|
-
subscribe
|
|
824
|
+
subscribe<TEventName extends keyof TEventMap | "*">(eventName: TEventName, callback: TEventName extends "*" ? (payload: TEventMap[keyof TEventMap], event: keyof TEventMap) => void : (payload: TEventMap[TEventName]) => void, options?: SubscribeOptions): () => void;
|
|
825
825
|
/**
|
|
826
826
|
* Subscribes to an event and automatically unsubscribes after it fires once.
|
|
827
827
|
* @param eventName - The name of the event to subscribe to.
|
|
828
828
|
* @param callback - The function to call when the event is emitted.
|
|
829
829
|
* @returns A function to cancel the one-shot subscription before it fires.
|
|
830
830
|
*/
|
|
831
|
-
once
|
|
831
|
+
once<TEventName extends keyof TEventMap | "*">(eventName: TEventName, callback: TEventName extends "*" ? (payload: TEventMap[keyof TEventMap], event: keyof TEventMap) => void : (payload: TEventMap[TEventName]) => void, options?: SubscribeOptions): () => void;
|
|
832
832
|
/**
|
|
833
833
|
* Emits an event with a payload to all subscribed listeners.
|
|
834
834
|
* @param event - An object containing the event name and payload.
|