ApplyPatchCallOperation - TypeScript SDK

ApplyPatchCallOperation type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

The patch operation requested by an apply_patch_call. create_file and update_file carry a V4A diff; delete_file omits it.

Supported Types

models.ApplyPatchCreateFileOperation

1const value: models.ApplyPatchCreateFileOperation = {
2 diff: "@@ function main() {\n+ console.log(\"hi\");\n }",
3 path: "/src/main.ts",
4 type: "create_file",
5};

models.ApplyPatchDeleteFileOperation

1const value: models.ApplyPatchDeleteFileOperation = {
2 path: "/src/main.ts",
3 type: "delete_file",
4};

models.ApplyPatchUpdateFileOperation

1const value: models.ApplyPatchUpdateFileOperation = {
2 diff: "@@ function main() {\n+ console.log(\"hi\");\n }",
3 path: "/src/main.ts",
4 type: "update_file",
5};