Files
codeql-action/node_modules/github-linguist/dist/file.d.ts
Andrew Eisenberg c4a84a93d4 Add the github-linguist package
This commit only adds a single package and all of its transitive
dependencies. The github-linguist package will be used for counting
lines of code as a baseline for databases we are analyzing.
2021-04-22 15:59:49 -07:00

38 lines
763 B
TypeScript

/**
* detect file info
*/
export interface LineInfo {
total: number;
code: number;
comment: number;
}
export interface FileInfo {
name: string;
languages: string;
size: number;
lines: LineInfo;
}
/**
* Collect language info for a single file
*/
export declare class LocFile {
private debug;
path: string;
private rawPath;
private language;
/**
* Creates an instance of LocFile.
*/
constructor(rawPath: string, debug?: boolean);
/**
* get file type through a path
*/
private getType;
private filterData;
/**
* Get file info when LocFile init
*/
getFileInfo(data?: string): Promise<FileInfo>;
getFileInfoByContent(name: string, data: string): FileInfo;
}