compare.d.ts 795 B

123456789101112131415161718192021
  1. import { FunctionCov, RangeCov, ScriptCov } from "./types";
  2. /**
  3. * Compares two script coverages.
  4. *
  5. * The result corresponds to the comparison of their `url` value (alphabetical sort).
  6. */
  7. export declare function compareScriptCovs(a: Readonly<ScriptCov>, b: Readonly<ScriptCov>): number;
  8. /**
  9. * Compares two function coverages.
  10. *
  11. * The result corresponds to the comparison of the root ranges.
  12. */
  13. export declare function compareFunctionCovs(a: Readonly<FunctionCov>, b: Readonly<FunctionCov>): number;
  14. /**
  15. * Compares two range coverages.
  16. *
  17. * The ranges are first ordered by ascending `startOffset` and then by
  18. * descending `endOffset`.
  19. * This corresponds to a pre-order tree traversal.
  20. */
  21. export declare function compareRangeCovs(a: Readonly<RangeCov>, b: Readonly<RangeCov>): number;