@nmann/codeowners
Version:
A tool for working with CODEOWNERS files
20 lines (18 loc) • 628 B
TypeScript
interface ReadOnlyDict<T> {
readonly [key: string]: T | undefined;
}
/**
* @param currentPath defaults to process.cwd()
* @param fileName of file to find, defaults to CODEOWNERS
*/
declare class Codeowners {
readonly codeownersFilePath: string;
readonly codeownersDirectory: string;
readonly contactInfo: ReadonlyArray<ReadOnlyDict<string>>;
private ownerEntries;
private pathsByOwner;
constructor(currentPath?: string, fileName?: string);
getOwner(filePath: string): string[];
getPathsForOwner(owner: string): string[];
}
export { Codeowners, type ReadOnlyDict, Codeowners as default };