Skip to content

Commit fa7c0ae

Browse files
committed
revert introduction of generics
1 parent 4d2197d commit fa7c0ae

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/modules/entities.types.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export type RealtimeEventType = "create" | "update" | "delete";
66
/**
77
* Payload received when a realtime event occurs.
88
*/
9-
export interface RealtimeEvent<T = Record<string, any>> {
9+
export interface RealtimeEvent {
1010
/** The type of change that occurred */
1111
type: RealtimeEventType;
12-
/** The entity data (new/updated for create/update, previous for delete) */
13-
data: T;
12+
/** The entity data */
13+
data: any;
1414
/** The unique identifier of the affected entity */
1515
id: string;
1616
/** ISO 8601 timestamp of when the event occurred */
@@ -20,9 +20,7 @@ export interface RealtimeEvent<T = Record<string, any>> {
2020
/**
2121
* Callback function invoked when a realtime event occurs.
2222
*/
23-
export type RealtimeCallback<T = Record<string, any>> = (
24-
event: RealtimeEvent<T>
25-
) => void;
23+
export type RealtimeCallback = (event: RealtimeEvent) => void;
2624

2725
/**
2826
* Function returned from subscribe, call it to unsubscribe.

0 commit comments

Comments
 (0)