node-loc
Version:
ts-lib [](https://www.npmjs.com/package/ts-lib)
24 lines (23 loc) • 544 B
TypeScript
export interface LineInfo {
total: number;
code: number;
comment: number;
}
export interface FileInfo {
name: string;
lang: string;
size: number;
lines: LineInfo;
}
export declare class LocFile {
private path;
private file;
private data;
constructor(filePath: string);
static getType(path: string): string;
private static filteData(data);
private getFileInfo(data?);
getPath(): string;
getInfo(): FileInfo;
static getFileInfoByContent(name: string, data: string): FileInfo;
}