Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
TypeScript
import type { Backend } from '../../../hooks/backend'
import Git from '../../../hooks/git'
/**
* A backend that holds a working copy at a toplevel and fetches nothing,
* its lister word the toplevel so a test can tell which probe pinned.
*
* @param toplevel the working copy's root
* @returns the backend
*/
export const stubBackendOf = (toplevel: string): Backend => ({
repository: { toplevel },
baseModes: ['uncommitted'],
words: { ...Git.GIT_WORDS, lister: toplevel },
fetchDiff: () => Promise.resolve({ kind: 'unavailable' }),
fetchHunks: () => Promise.resolve(new Map()),
headKeyOf: () => Promise.resolve(''),
})