Docs for return values

This commit is contained in:
Judah Gabriel Himango
2013-11-05 22:51:23 -06:00
parent b7171d1969
commit a717bb62fc
+7 -1
View File
@@ -6,17 +6,20 @@
interface NProgressStatic {
/**
* Shows the progress bar and begins trickling progress.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
start(): NProgressStatic;
/**
* Finishes loading by transitioning it to 100%, then fading out.
* @param {boolean} forceShow Forces the progress bar to show, even if it's not being shown. (The default behavior is that .done() will not do anything if .start() isn't called.)
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
done(forceShow?: boolean);
done(forceShow?: boolean): NProgressStatic;
/**
* Increments the progress bar with a random amount. This will never get to 100%: use it for every image load (or similar).
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
inc(): NProgressStatic;
@@ -28,12 +31,14 @@ interface NProgressStatic {
/**
* Sets the progress percentage.
* @param {number} progressPercent A number between 0.0 and 1.0 that represents the progress percentage.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
set(progressPercent: number): NProgressStatic;
/**
* Configures the progress indicator.
* @param {NProgressConfigureOptions} options An object containing the configuration options.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
configure(options: NProgressConfigureOptions): NProgressStatic;
@@ -49,6 +54,7 @@ interface NProgressStatic {
/**
* Gets whether progress has been started.
* @returns {boolean} Whether the progress has started.
*/
isStarted(): boolean;
}