src/vs/workbench/api/common/extHostTypes.ts/FileCoverage/fromDetails
class FileCoverage:	public static fromDetails(uri: vscode.Uri, details: vscode.DetailedCoverage[]): vscode.FileCoverage {
		const statements = new CoveredCount(0, 0);
		const branches = new CoveredCount(0, 0);
		const fn = new CoveredCount(0, 0);

		for (const detail of details) {
			if ('branches' in detail) {
				statements.total += 1;
				statements.covered += detail.executionCount > 0 ? 1 : 0;

				for (const branch of detail.branches) {
					branches.total += 1;
					branches.covered += branch.executionCount > 0 ? 1 : 0;
				}
			} else {
				fn.total += 1;
				fn.covered += detail.executionCount > 0 ? 1 : 0;
			}
		}

		const coverage = new FileCoverage(
			uri,
			statements,
			branches.total > 0 ? branches : undefined,
			fn.total > 0 ? fn : undefined,
		);

		coverage.detailedCoverage = details;

		return coverage;
	}