Skip to content

Commit

Permalink
Handle type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pvditto committed Apr 18, 2024
1 parent 2ed6a8c commit 7e4031c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mutations/useMutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export interface UpdateByIDParams {
/**
* The _id of the document to remove
*/
// The `DocumentIDValue` type needs to be narrowed in @dittolive/ditto
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
_id: DocumentID | DocumentIDValue
/**
* The update function to perform on the specified document
Expand All @@ -63,7 +65,7 @@ export interface RemoveParams {
export type RemoveFunction = (params: RemoveParams) => Promise<DocumentID[]>

export interface RemoveByIDParams {
_id: unknown | DocumentID
_id?: DocumentID
}

export type RemoveByIDFunction = (params: RemoveByIDParams) => Promise<boolean>
Expand Down

0 comments on commit 7e4031c

Please sign in to comment.