/** Type for the callback used to revert the scrollbar compensation. */ export declare type CompensationReverter = () => void; /** * Utility to handle the scrollbar. * * It allows to compensate the lack of a vertical scrollbar by adding an * equivalent padding on the right of the body, and to remove this compensation. */ export declare class ScrollBar { private _document; constructor(_document: any); /** * Detects if a scrollbar is present and if yes, already compensates for its * removal by adding an equivalent padding on the right of the body. * * @return a callback used to revert the compensation (noop if there was none, * otherwise a function removing the padding) */ compensate(): CompensationReverter; /** * Adds a padding of the given width on the right of the body. * * @return a callback used to revert the padding to its previous value */ private _adjustBody(width); /** * Tells whether a scrollbar is currently present on the body. * * @return true if scrollbar is present, false otherwise */ private _isPresent(); /** * Calculates and returns the width of a scrollbar. * * @return the width of a scrollbar on this page */ private _getWidth(); }