import type { MountRegistry } from '../../../mount/registry.ts'; import type { Session } from '../../../session/session.ts'; import { NameKind } from './types.ts'; /** Classify the name as the layer that would run it, null if none does. */ export declare function classify(name: string, session: Session, registry: MountRegistry): NameKind | null; /** * Classify every layer holding the name, most-preferred first. * * A reserved word goes first and does not end the walk: bash prints both * lines when a function shares a keyword's name (pinned: * `function time { :; }; type -a time` prints the keyword line then the * function line). mirage's parser is looser than bash's about reserved * words as function names, so the shadow is reachable here for any of * them, and hiding it would leave `type -a` claiming a keyword while the * line runs the function. * * Duplicate kinds are dropped, since the kinds are coarser than the * layers: a shell builtin that a mount also registers is one `builtin` * line, not two identical ones. */ export declare function classifyAll(name: string, session: Session, registry: MountRegistry): NameKind[]; /** * The kinds to report for one name: hide a layer, then take the top. * * Hiding is a filter over the layer list, never an edit to the session, * and it runs before the winner is picked. That order is what keeps the * winner honest: `type -f` reports the layer under a shadowing function, * and `which` the layer under a reserved word, where filtering * afterwards would report nothing at all. */ export declare function locations(name: string, session: Session, registry: MountRegistry, allMode: boolean, drop?: NameKind | null): NameKind[]; /** Render the verbose line `command -V` and `type` print. `session` is * needed only to read an alias's value; every other kind renders from * the name alone. */ export declare function describe(name: string, kind: NameKind, session?: Session): string; //# sourceMappingURL=classify.d.ts.map