INNER CODE UNIT · TypeScript

errorCode

totec448-spec/chat-on-steroids · src/main/codex/apply-patch/index.ts:159

function errorCode(error: unknown): string | undefined {
  return typeof error === 'object' && error !== null ? (error as NodeJS.ErrnoException).code : undefined;
}

/** `apply_patch`: applies the patch and writes the result to the given buffers. */
export async function applyPatch(
  patch: string,
  cwd: string,
  stdout: Writer,
  stderr: Writer,
  resolvePath: PatchPathResolver = defaultPathResolver
): Promise<AppliedPatchDelta> {
  return await applyPatchWithMode(
    patch,
    DEFAULT_APPLY_PATCH_FILE_UPDATE_MODE,
    cwd,
    stdout,
    stderr,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…