Skip to content

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
540 B
Raw Blame
import type Git from '../git'
import type { Host } from '../host'

/**
 * A directory's entries by name with their own kinds, through the host's
 * listing (no link followed); null when it cannot be listed.
 *
 * @param engine the bound host
 * @returns the probe (GitDeps `entryKindsOf`)
 */
export const entryKindsOf =
  (engine: Host) =>
  (dir: string): Promise<ReadonlyMap<string, Git.EntryKind> | null> =>
    engine.listDir(dir).then(
      entries => new Map(entries.map(entry => [entry.name, entry.kind])),
      () => null,
    )