/** * Author: vortesnail * License: MIT * Github: https://github.com/vortesnail */ import { Configuration } from './types'; import './index.css'; /******************************************************** * Usage: * * const qprogress = new QProgress({ minimum: 0.1 }) * * qprogress.start() * * // some code... * * qprogress.finish() * ********************************************************/ declare class QProgress { private config; status: number | null; constructor(config?: Configuration); /** * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`. * * qprogress.set(0.4) * qprogress.set(1.0) */ set(n: number): void; /** * Checks if the progress is started, `0.0` to `1.0`: `true`, `null`: `false` . */ private isStarted; /** * Shows the progress bar. * This is the same as setting the status to 0%, except that it doesn't go backwards. * * qprogress.start() * */ start(): void; /** * Hides the progress bar. * This is the *sort of* the same as setting the status to 100%, with the * difference being `finish()` makes some placebo effect of some realistic motion. * * qprogress.finish() * * If `true` is passed, it will show the progress bar even if its hidden. * * qprogress.finish(true) */ finish(force?: boolean): void; private trickle; /** * Increments by a random amount. */ inc(amount?: number): void; /** * Checks if the progress bar is rendered. */ private isRendered; /** * renders the progress bar markup based on the `template` setting. */ private render; } export default QProgress;