Skip to content

Commit 54c3ddf

Browse files
authored
docs: add doc string to base signature of parallel function (#22753)
The `parallel` function docs weren't showing up in the docs site, likely because the base signature didn't have a doc string. Fixes #22013.
1 parent 04668e0 commit 54c3ddf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cdk/testing/change-detection.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ export function parallel<T1, T2>(values: () => [T1 | PromiseLike<T1>, T2 | Promi
167167
*/
168168
export function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>;
169169

170+
/**
171+
* Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
172+
* detection over the entire operation such that change detection occurs exactly once before
173+
* resolving the values and once after.
174+
* @param values A getter for the async values to resolve in parallel with batched change detection.
175+
* @return The resolved values.
176+
*/
170177
export async function parallel<T>(values: () => Iterable<T | PromiseLike<T>>): Promise<T[]> {
171178
return batchChangeDetection(() => Promise.all(values()), true);
172179
}

0 commit comments

Comments
 (0)