/** * Finds and parses a repo's TODO file. Pure apart from the file-system lookups, so it's testable. */ /** Most bytes read from a TODO file; a longer file is read up to here and the rest is ignored. */ export declare const MAX_TODO_BYTES: number; /** Most items parsed from a TODO file. */ export declare const MAX_TODO_ITEMS = 500; /** File names checked at the repo root, in order. */ export declare const TODO_FILES: string[]; /** The nearest directory at or above `cwd` that contains `.git`, else `cwd`. */ export declare function repoRoot(cwd: string): string; /** Path of the repo's TODO file, or undefined. */ export declare function findTodoFile(cwd: string): string | undefined; /** * Open top-level items: markdown list entries ("- x", "* x", "1. x", "- [ ] x") at the file's * shallowest list indent. Checked boxes ("- [x]") and nested sub-items are left out, as are code * blocks. A file with no list items falls back to its non-heading, non-blank lines. At most * `maxItems` list entries (or plain lines) are looked at; the rest of the text is ignored. */ export declare function parseTodos(content: string, maxItems?: number): string[]; /** * Reads and parses, returning undefined when there is no TODO file. Reads at most `MAX_TODO_BYTES` * and parses at most `MAX_TODO_ITEMS` items, so a huge file in a repo cannot stall the sidebar. * Callers read a project file only when the project is trusted. */ export declare function readTodos(cwd: string): { path: string; items: string[]; } | undefined;