import type { Help } from '@variance-authority/package/help'; import { type AnsweringOptions } from './read.js'; import type { SearchIndex } from './search-index.js'; /** A search, and whether it was read from the checkout as it is now. */ export interface SearchReading { readonly index: SearchIndex; /** * True when the checkout was read for this question; false when a published * search or value was opened at whatever age it had, which nothing compared * with the checkout. */ readonly compared: boolean; /** * Each published file that was there and did not open, and why, in the * order they were tried; absent when nothing published failed to open. A * file that is not there is not in it: that is nothing published, not a * failure. */ readonly unopened?: readonly Unopened[]; /** The already-open value whose published names the search counts as `uses` does. */ readonly help: Help; } /** A published file the reading tried, and why it did not open. */ export interface Unopened { /** The published value, which holds the search. */ readonly published: 'value'; readonly at: string; readonly reason: string; } /** * The sentence an answer carries when a published file did not open: which, * why, and what was read instead. Absent when nothing failed to open. */ export declare function unopenedLine(unopened: readonly Unopened[] | undefined, compared: boolean): string | undefined; /** * The search over the workspace, opened from what was published, and read * from the checkout only when nothing was. * * Publishing is somebody else's job: in CI the scan and * the documentation are brought up to date by the steps before it, and the * question after them expects to find their output. So the published store is * opened in place at any age — not the checkout, and the graph only when a * start point was said. With none, there is nothing to look up: the checkout is * read and the store published, unless `justAnswer` forbids the read — as * every `variance ask` question does — and then the question is refused, * naming `variance index`, the command that publishes one. * * Changed paths or taints are the one exception, because they ask for a new * generation by name: that reading is {@link readWorkspaceForAnswer}'s, and it * publishes the search it answers from; under `justAnswer` it reads nothing * new, so that search is not compared with the checkout either. */ export declare function readSearchForAnswer(root: string, options?: AnsweringOptions): Promise; //# sourceMappingURL=search-read.d.ts.map