Function: applyOperations()
ts
function applyOperations(
files: Map<string, WorkspaceFile>,
patch: ParsedApplyPatch,
): {
files: Map<string, WorkspaceFile>;
modifiedFiles: number;
};Defined in: src/lib/patch/index.ts:360
Apply a parsed structured patch to a virtual workspace of files keyed by normalized path.
Parameters
| Parameter | Type | Description |
|---|---|---|
files | Map<string, WorkspaceFile> | The workspace (mutated in place). |
patch | ParsedApplyPatch | The parsed envelope. |
Returns
ts
{
files: Map<string, WorkspaceFile>;
modifiedFiles: number;
}The workspace and the number of files touched.
| Name | Type | Defined in |
|---|---|---|
files | Map<string, WorkspaceFile> | src/lib/patch/index.ts:363 |
modifiedFiles | number | src/lib/patch/index.ts:363 |