/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * A range in the {@link RangeTracker} * * @deprecated No replacement. * @internal */ export interface IRange { primary: number; secondary: number | undefined; length: number; } /** * A serialized version of the {@link RangeTracker} * * @deprecated No replacement. * @internal */ export interface IRangeTrackerSnapshot { ranges: IRange[]; lastPrimary: number; lastSecondary: number | undefined; } /** * Helper class that keeps track of the relation between two ranges in a 1:N fashion. Primary * is continuous and always maps to a single value in secondary above the base value. The range * defines an increasing step function. * * Used by deli to keep track of the branch map * * @deprecated No replacement. * @internal */ export declare class RangeTracker { private ranges; private lastPrimary; private lastSecondary; get base(): number; /** * Getter for the last primary that was added * * @returns last primary that was added */ get primaryHead(): number; /** * Getter for the last secondary that was added * * @returns last secondary that was added */ get secondaryHead(): number | undefined; constructor(primary: IRangeTrackerSnapshot); constructor(primary: number, secondary: number); /** * Returns a serialized form of the RangeTracker */ serialize(): IRangeTrackerSnapshot; /** * Add a primary, secondary pair to the range * * @param primary - the primary number in the range * @param secondary - the secondary number in the range */ add(primary: number, secondary: number): void; /** * Get the closest range to the primary * * @param primary - the primary value to look for * @returns the closest range to the primary */ get(primary: number): number; /** * Update the range of primary * * @param primary - the primary value to update */ updateBase(primary: number): void; } //# sourceMappingURL=rangeTracker.d.ts.map