//#region src/utils/fast-json-patch/src/core.d.ts type Operation = AddOperation | RemoveOperation | ReplaceOperation | MoveOperation | CopyOperation | TestOperation | GetOperation; interface Validator { (operation: Operation, index: number, document: T, existingPathFragment: string): void; } interface OperationResult { removed?: any; test?: boolean; newDocument: T; } interface BaseOperation { path: string; } interface AddOperation extends BaseOperation { op: "add"; value: T; } interface RemoveOperation extends BaseOperation { op: "remove"; } interface ReplaceOperation extends BaseOperation { op: "replace"; value: T; } interface MoveOperation extends BaseOperation { op: "move"; from: string; } interface CopyOperation extends BaseOperation { op: "copy"; from: string; } interface TestOperation extends BaseOperation { op: "test"; value: T; } interface GetOperation extends BaseOperation { op: "_get"; value: T; } interface PatchResult extends Array> { newDocument: T; } /** * Apply a full JSON Patch array on a JSON document. * Returns the {newDocument, result} of the patch. * It modifies the `document` object and `patch` - it gets the values by reference. * If you would like to avoid touching your values, clone them: * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`. * * @param document The document to patch * @param patch The patch to apply * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation. * @param mutateDocument Whether to mutate the original document or clone it before applying * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`. * @return An array of `{newDocument, result}` after the patch */ declare function applyPatch(document: T, patch: ReadonlyArray, validateOperation?: boolean | Validator, mutateDocument?: boolean, banPrototypeModifications?: boolean): PatchResult; //#endregion export { Operation, applyPatch }; //# sourceMappingURL=core.d.ts.map