diff --git a/src/sync-plugins/crud.ts b/src/sync-plugins/crud.ts index 36616f71..3fea6264 100644 --- a/src/sync-plugins/crud.ts +++ b/src/sync-plugins/crud.ts @@ -72,11 +72,14 @@ export type CrudOnErrorFn = (error: Error, params: CrudErrorParams) => void; export interface SyncedCrudPropsBase extends Omit, 'get' | 'set' | 'initial' | 'subscribe' | 'waitForSet' | 'onError'> { + /** **Note:** `input` fields named by `fieldUpdatedAt`/`fieldCreatedAt` will be `Date` at runtime, not the declared type — clone()'s JSON reviver converts ISO 8601 strings. */ create?(input: TRemote, params: SyncedSetParams): Promise | null | undefined | void>; + /** **Note:** `input` fields named by `fieldUpdatedAt`/`fieldCreatedAt` will be `Date` at runtime, not the declared type — clone()'s JSON reviver converts ISO 8601 strings. */ update?( input: Partial, params: SyncedSetParams, ): Promise | null | undefined | void>>; + /** **Note:** `input` fields named by `fieldUpdatedAt`/`fieldCreatedAt` will be `Date` at runtime, not the declared type — clone()'s JSON reviver converts ISO 8601 strings. */ delete?(input: TRemote, params: SyncedSetParams): Promise; onSaved?(params: SyncedCrudOnSavedParams): Partial | void; fieldId?: string;