Skip to content

Commit

Permalink
fix: include type for data param in onChange callback
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnowack committed Jul 11, 2024
1 parent 55afc1f commit 13f0a12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/signaldb/src/ReplicatedCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import createPersistenceAdapter from './persistence/createPersistenceAdapter'
interface ReplicationOptions<T extends { id: I } & Record<string, any>, I> {
pull: () => Promise<LoadResponse<T>>,
push(changes: Changeset<T>, items: T[]): Promise<void>,
registerRemoteChange?: (onChange: () => void | Promise<void>) => Promise<void>,
registerRemoteChange?: (
onChange: (data?: LoadResponse<T>) => void | Promise<void>
) => Promise<void>,
}
export function createReplicationAdapter<T extends { id: I } & Record<string, any>, I>(
options: ReplicationOptions<T, I>,
Expand Down

0 comments on commit 13f0a12

Please sign in to comment.