From a717bb62fc91ab37a3b91045b2be0b5682f3b0e6 Mon Sep 17 00:00:00 2001 From: Judah Gabriel Himango Date: Tue, 5 Nov 2013 22:51:23 -0600 Subject: [PATCH] Docs for return values --- nprogress/NProgress.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nprogress/NProgress.d.ts b/nprogress/NProgress.d.ts index 8cca1d3ea..a86558aae 100644 --- a/nprogress/NProgress.d.ts +++ b/nprogress/NProgress.d.ts @@ -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; }