export interface ICollectionInterval { start: number; end: number; } /** * Stores hit counters for all loaded modules (physical files) * * @export * @interface IIstanbulProcessMetrics */ export interface IIstanbulProcessMetrics { [moduleName: string]: IIstanbulModule; } export interface IIstanbulLocation { start: { line: number; column: number; }; end: { line: number; column: number; }; } export interface IMethodData { name: string; line: number; loc: IIstanbulLocation; } export interface IBranchData { line: number; type: string; locations: IIstanbulLocation[]; } /** * Stores hit counters per module (physical file) * Includes statement, function and branch coverage * * @export * @interface IIstanbulModule */ export interface IIstanbulModule { /** * Statement coverage * Key = statement number (as string; 1-based) * Value = number of hits per statement * Note that this is not an array, but a hash (lookup) * * @memberOf IIstanbulModule */ s: { [statementId: string]: number; }; /** * Function coverage * Key = method number (as string; 1-based) * Value = number of hits per function * Note that this is not an array, but a hash (lookup) * @memberOf IIstanbulModule */ f: { [functionId: string]: number; }; /** * Branch coverage * Key = branch number (as string; 1-based) * Value = array of number of hits per branch. (e.g. if will have 2 items in the array, one for the IF and another for the ELSE) * Note that this is not an array, but a hash (lookup) * * @memberOf IIstanbulModule */ b: { [branchId: string]: number[]; }; fnMap?: { [functionId: string]: IMethodData; }; statementMap?: { [functionId: string]: IIstanbulLocation; }; branchMap?: { [functionId: string]: IBranchData; }; path?: string; uniqueIdsMap?: { [old: string]: string; }; /** * Data property which Istanbul adds when handling files such as HTML Files */ data?: IIstanbulModule; }