linguist-js
Version:
Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.
21 lines (20 loc) • 662 B
TypeScript
import { Ignore } from 'ignore';
interface WalkInput {
/** Whether this is walking the tree from the root */
init: boolean;
/** The common root absolute path of all folders being checked */
commonRoot: string;
/** The absolute path that each folder is relative to */
folderRoots: string[];
/** The absolute path of folders being checked */
folders: string[];
/** An instantiated Ignore object listing ignored files */
ignored: Ignore;
}
interface WalkOutput {
files: string[];
folders: string[];
}
/** Generate list of files in a directory. */
export default function walk(data: WalkInput): WalkOutput;
export {};