## apply() function

Switch on `operation.op`, applying the corresponding patch function for each case to `object`.

**Signature:**

```typescript
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](/content/docs/sdk/core.operation) | The operation to perform on the object. |
| options | [PatchOptions](/content/docs/sdk/core.patchoptions) | _(Optional)_ Optional params. |

**Returns:**

[MissingError](/content/docs/sdk/core.missingerror) \| [InvalidOperationError](/content/docs/sdk/core.invalidoperationerror) \| [TestError](/content/docs/sdk/core.testerror) \| null

null on success, or error if one occurred.

- [apply() function](/content/docs/sdk/core.apply#apply-function/index.html)
- [Parameters](/content/docs/sdk/core.apply#parameters/index.html)
