core.apply
Home > @medplum/core > apply
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 | The operation to perform on the object. | |
options | (Optional) Optional params. |
Returns:
MissingError | InvalidOperationError | TestError | null
null on success, or error if one occurred.