Skip to main content
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

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

models.ApplyPatchDeleteFileOperation

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

models.ApplyPatchUpdateFileOperation

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