---
url: 'https://adk.nht.io/api/@nhtio/adk/lib/patch/interfaces/UpdateOperation.md'
description: >-
  `*** Update File:` (+ optional `*** Move to:`) — apply hunks, optionally
  rename.
---

# Interface: UpdateOperation

Defined in: [src/lib/patch/index.ts:52](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L52)

`*** Update File:` (+ optional `*** Move to:`) — apply hunks, optionally rename.

## Properties

| Property                                   | Type                            | Description                                                                | Defined in                                                                                                  |
| ------------------------------------------ | ------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|  `added`        | `number`                        | How many lines the operation adds across all hunks.                        | [src/lib/patch/index.ts:62](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L62) |
|  `hunks`        | [`ParsedHunk`](ParsedHunk.md)\[] | The hunks to apply, in order.                                              | [src/lib/patch/index.ts:60](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L60) |
|  `movePath?` | `string`                        | When set, the workspace-relative path the file is moved to after updating. | [src/lib/patch/index.ts:58](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L58) |
|  `path`          | `string`                        | Workspace-relative path of the file to update.                             | [src/lib/patch/index.ts:56](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L56) |
|  `removed`    | `number`                        | How many lines the operation removes across all hunks.                     | [src/lib/patch/index.ts:64](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L64) |
|  `type`          | `"update"`                      | Discriminant for an update operation.                                      | [src/lib/patch/index.ts:54](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/lib/patch/index.ts#L54) |
