core.apply | Medplum
apply() function
Switch on operation.op, applying the corresponding patch function for each case to object.
Signature:
export declare function apply(object: any, operation: Operation, options?: PatchOptions): MissingError | InvalidOperationError | TestError | null;
Parameters
| Parameter | Type | Description |
|---|---|---|
| object | any | The object being patched. |
| operation | Operation | The operation to perform on the object. |
| options | PatchOptions | (Optional) Optional params. |
Returns:
MissingError | InvalidOperationError | TestError | null
null on success, or error if one occurred.