diff --git a/packages/core/src/types/modifyReadResponse.ts b/packages/core/src/types/modifyReadResponse.ts index ae552186..356c8b2b 100644 --- a/packages/core/src/types/modifyReadResponse.ts +++ b/packages/core/src/types/modifyReadResponse.ts @@ -3,17 +3,17 @@ import { DocMetadata } from './atoms' /** * Can be used to modify docs that come in from 'stream' or 'fetch' actions, before they are added to your store data. When returning `undefined` they will be discarded & won't be added to the store data. */ -export type OnAddedFn = (docData: Record | undefined, docMetadata: DocMetadata) => Record | void //prettier-ignore +export type OnAddedFn = (docData: Record, docMetadata: DocMetadata) => Record | undefined //prettier-ignore /** * Is triggered only while a 'stream' is open, and can modify docs that were modified on another client, before they are updated to the store data. When returning `undefined` they will be discarded & the modifications won't be applied to the store data. */ -export type OnModifiedFn = (docData: Record | undefined, docMetadata: DocMetadata) => Record | void //prettier-ignore +export type OnModifiedFn = (docData: Record, docMetadata: DocMetadata) => Record | undefined //prettier-ignore /** * Is triggered only while a 'stream' is open, every time a document is either 'deleted' on another client OR if a document doesn't adhere to the clauses of that 'stream' anymore. When returning `undefined` they will not be removed from the store data. */ -export type OnRemovedFn = (docData: Record | string | undefined, docMetadata: DocMetadata) => Record | string | void //prettier-ignore +export type OnRemovedFn = (docData: Record | string, docMetadata: DocMetadata) => Record | string | undefined //prettier-ignore /** * These functions will be executed everytime BEFORE documents are added/modified/deleted in your local data store. The function defined will receive the payload with changes from the server. You can then modify and return this payload.