Skip to content

Commit

Permalink
fix: Allow the remove operation to have a value
Browse files Browse the repository at this point in the history
* When removing an entry from an array, then value is required, so making value optional.

Eg:
{
   operation: "remove",
   field: "/member/-",
   value: "someEntry",
}

vs

{
   operation: "remove",
   field: "member"
}

Which removes the member field entirely
  • Loading branch information
pearj committed May 20, 2022
1 parent 8eed45b commit 37e142b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/idm-globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type PatchOpts = {
} | {
operation: PatchRemoveOperation;
field: string;
value?: any;
} | {
operation: PatchFromOperation;
from: string;
Expand Down

0 comments on commit 37e142b

Please sign in to comment.