merge.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { FunctionCov, ProcessCov, ScriptCov } from "./types";
  2. /**
  3. * Merges a list of process coverages.
  4. *
  5. * The result is normalized.
  6. * The input values may be mutated, it is not safe to use them after passing
  7. * them to this function.
  8. * The computation is synchronous.
  9. *
  10. * @param processCovs Process coverages to merge.
  11. * @return Merged process coverage.
  12. */
  13. export declare function mergeProcessCovs(processCovs: ReadonlyArray<ProcessCov>): ProcessCov;
  14. /**
  15. * Merges a list of matching script coverages.
  16. *
  17. * Scripts are matching if they have the same `url`.
  18. * The result is normalized.
  19. * The input values may be mutated, it is not safe to use them after passing
  20. * them to this function.
  21. * The computation is synchronous.
  22. *
  23. * @param scriptCovs Process coverages to merge.
  24. * @return Merged script coverage, or `undefined` if the input list was empty.
  25. */
  26. export declare function mergeScriptCovs(scriptCovs: ReadonlyArray<ScriptCov>): ScriptCov | undefined;
  27. /**
  28. * Merges a list of matching function coverages.
  29. *
  30. * Functions are matching if their root ranges have the same span.
  31. * The result is normalized.
  32. * The input values may be mutated, it is not safe to use them after passing
  33. * them to this function.
  34. * The computation is synchronous.
  35. *
  36. * @param funcCovs Function coverages to merge.
  37. * @return Merged function coverage, or `undefined` if the input list was empty.
  38. */
  39. export declare function mergeFunctionCovs(funcCovs: ReadonlyArray<FunctionCov>): FunctionCov | undefined;