-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/testingdocsThis issue is related to documentationThis issue is related to documentation
Description
Documentation Feedback
There are a lot of comments around the various parallel()
functions, but the docs don't have any information at all:
components/src/cdk/testing/change-detection.ts
Lines 115 to 172 in 07bb027
/** | |
* Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change | |
* detection over the entire operation such that change detection occurs exactly once before | |
* resolving the values and once after. | |
* @param values A getter for the async values to resolve in parallel with batched change detection. | |
* @return The resolved values. | |
*/ | |
export function parallel<T1, T2, T3, T4, T5>( | |
values: () => | |
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, | |
T5 | PromiseLike<T5> | |
]): Promise<[T1, T2, T3, T4, T5]>; | |
/** | |
* Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change | |
* detection over the entire operation such that change detection occurs exactly once before | |
* resolving the values and once after. | |
* @param values A getter for the async values to resolve in parallel with batched change detection. | |
* @return The resolved values. | |
*/ | |
export function parallel<T1, T2, T3, T4>( | |
values: () => | |
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): | |
Promise<[T1, T2, T3, T4]>; | |
/** | |
* Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change | |
* detection over the entire operation such that change detection occurs exactly once before | |
* resolving the values and once after. | |
* @param values A getter for the async values to resolve in parallel with batched change detection. | |
* @return The resolved values. | |
*/ | |
export function parallel<T1, T2, T3>( | |
values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): | |
Promise<[T1, T2, T3]>; | |
/** | |
* Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change | |
* detection over the entire operation such that change detection occurs exactly once before | |
* resolving the values and once after. | |
* @param values A getter for the async values to resolve in parallel with batched change detection. | |
* @return The resolved values. | |
*/ | |
export function parallel<T1, T2>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): | |
Promise<[T1, T2]>; | |
/** | |
* Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change | |
* detection over the entire operation such that change detection occurs exactly once before | |
* resolving the values and once after. | |
* @param values A getter for the async values to resolve in parallel with batched change detection. | |
* @return The resolved values. | |
*/ | |
export function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>; | |
export async function parallel<T>(values: () => Iterable<T | PromiseLike<T>>): Promise<T[]> { | |
return batchChangeDetection(() => Promise.all(values()), true); | |
} |
This was raised in today's Creating Harnesses call with the community: AngularCommunity/angular-missions#5
Affected documentation page: https://material.angular.io/cdk/test-harnesses/api#cdk-testing-functions
Need to investigate if this belongs in this repo or if it's a docs-infra issue that should be moved to the material.angular.io repo.
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/testingdocsThis issue is related to documentationThis issue is related to documentation