Merge pull request #3157 from ciddan/nprogress-inc

Added inc overload that takes an amount
This commit is contained in:
Masahiro Wakame
2014-11-18 11:38:03 +09:00
2 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
function test_basics() {
NProgress.start();
NProgress.inc();
NProgress.inc(0.2);
NProgress.done();
NProgress.set(0.5);
@@ -29,4 +30,4 @@ function test_configuration() {
trickleRate: 0.42,
trickleSpeed: 42
});
}
}
+8 -1
View File
@@ -23,6 +23,13 @@ interface NProgressStatic {
*/
inc(): NProgressStatic;
/**
* Increments the progress bar with a set amount.
* @param {number} amount This will get the current status value and adds the value until status is max 0.994
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
inc(amount: number): NProgressStatic;
/**
* Removes the progress indicator.
*/
@@ -102,4 +109,4 @@ interface NProgressConfigureOptions {
template?: string;
}
declare var NProgress: NProgressStatic;
declare var NProgress: NProgressStatic;