mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #3157 from ciddan/nprogress-inc
Added inc overload that takes an amount
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+8
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user