File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
integration/vscode/ada/src Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -576,10 +576,31 @@ export async function parallelize<T, Result>(
576576 * such that progress is reported only when a minimum increment is reached,
577577 * e.g. every 1%.
578578 *
579- * Here's how the function should be used:
580- *
581- * TODO
579+ * @example Here's how the function should be used:
580+ * ```ts
581+ * await vscode.window.withProgress(...,
582+ * async (progress, token) => {
583+ * let done: number = 0;
584+ * let lastProgress = 0;
585+ * const total = ...;
582586 *
587+ * for (...) {
588+ * lastProgress = staggerProgress(
589+ * done,
590+ * total,
591+ * lastProgress,
592+ * (increment) => {
593+ * progress.report({
594+ * message: `${done} / ${total}`,
595+ * increment: increment,
596+ * });
597+ * },
598+ * );
599+ * ++done;
600+ * }
601+ * }
602+ * })
603+ * ```
583604 *
584605 * @param done - the number of items processed since the beginning of the work
585606 * @param total - the total number of items to be processed
You can’t perform that action at this time.
0 commit comments