source: trip-planner-front/node_modules/@angular/cdk/testing/change-detection.d.ts@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 4.0 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/** Represents the status of auto change detection. */
9export interface AutoChangeDetectionStatus {
10 /** Whether auto change detection is disabled. */
11 isDisabled: boolean;
12 /**
13 * An optional callback, if present it indicates that change detection should be run immediately,
14 * while handling the status change. The callback should then be called as soon as change
15 * detection is done.
16 */
17 onDetectChangesNow?: () => void;
18}
19/**
20 * Allows a test `HarnessEnvironment` to install its own handler for auto change detection status
21 * changes.
22 * @param handler The handler for the auto change detection status.
23 */
24export declare function handleAutoChangeDetectionStatus(handler: (status: AutoChangeDetectionStatus) => void): void;
25/** Allows a `HarnessEnvironment` to stop handling auto change detection status changes. */
26export declare function stopHandlingAutoChangeDetectionStatus(): void;
27/**
28 * Disables the harness system's auto change detection for the duration of the given function.
29 * @param fn The function to disable auto change detection for.
30 * @return The result of the given function.
31 */
32export declare function manualChangeDetection<T>(fn: () => Promise<T>): Promise<T>;
33/**
34 * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
35 * detection over the entire operation such that change detection occurs exactly once before
36 * resolving the values and once after.
37 * @param values A getter for the async values to resolve in parallel with batched change detection.
38 * @return The resolved values.
39 */
40export declare function parallel<T1, T2, T3, T4, T5>(values: () => [
41 T1 | PromiseLike<T1>,
42 T2 | PromiseLike<T2>,
43 T3 | PromiseLike<T3>,
44 T4 | PromiseLike<T4>,
45 T5 | PromiseLike<T5>
46]): Promise<[T1, T2, T3, T4, T5]>;
47/**
48 * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
49 * detection over the entire operation such that change detection occurs exactly once before
50 * resolving the values and once after.
51 * @param values A getter for the async values to resolve in parallel with batched change detection.
52 * @return The resolved values.
53 */
54export declare function parallel<T1, T2, T3, T4>(values: () => [
55 T1 | PromiseLike<T1>,
56 T2 | PromiseLike<T2>,
57 T3 | PromiseLike<T3>,
58 T4 | PromiseLike<T4>
59]): Promise<[T1, T2, T3, T4]>;
60/**
61 * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
62 * detection over the entire operation such that change detection occurs exactly once before
63 * resolving the values and once after.
64 * @param values A getter for the async values to resolve in parallel with batched change detection.
65 * @return The resolved values.
66 */
67export declare function parallel<T1, T2, T3>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
68/**
69 * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
70 * detection over the entire operation such that change detection occurs exactly once before
71 * resolving the values and once after.
72 * @param values A getter for the async values to resolve in parallel with batched change detection.
73 * @return The resolved values.
74 */
75export declare function parallel<T1, T2>(values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
76/**
77 * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
78 * detection over the entire operation such that change detection occurs exactly once before
79 * resolving the values and once after.
80 * @param values A getter for the async values to resolve in parallel with batched change detection.
81 * @return The resolved values.
82 */
83export declare function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>;
Note: See TracBrowser for help on using the repository browser.