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 | import { NgZone, OnDestroy, InjectionToken } from '@angular/core';
|
---|
9 | /**
|
---|
10 | * @docs-private
|
---|
11 | */
|
---|
12 | export declare class _Schedule {
|
---|
13 | tasks: (() => unknown)[];
|
---|
14 | endTasks: (() => unknown)[];
|
---|
15 | }
|
---|
16 | /** Injection token used to provide a coalesced style scheduler. */
|
---|
17 | export declare const _COALESCED_STYLE_SCHEDULER: InjectionToken<_CoalescedStyleScheduler>;
|
---|
18 | /**
|
---|
19 | * Allows grouping up CSSDom mutations after the current execution context.
|
---|
20 | * This can significantly improve performance when separate consecutive functions are
|
---|
21 | * reading from the CSSDom and then mutating it.
|
---|
22 | *
|
---|
23 | * @docs-private
|
---|
24 | */
|
---|
25 | export declare class _CoalescedStyleScheduler implements OnDestroy {
|
---|
26 | private readonly _ngZone;
|
---|
27 | private _currentSchedule;
|
---|
28 | private readonly _destroyed;
|
---|
29 | constructor(_ngZone: NgZone);
|
---|
30 | /**
|
---|
31 | * Schedules the specified task to run at the end of the current VM turn.
|
---|
32 | */
|
---|
33 | schedule(task: () => unknown): void;
|
---|
34 | /**
|
---|
35 | * Schedules the specified task to run after other scheduled tasks at the end of the current
|
---|
36 | * VM turn.
|
---|
37 | */
|
---|
38 | scheduleEnd(task: () => unknown): void;
|
---|
39 | /** Prevent any further tasks from running. */
|
---|
40 | ngOnDestroy(): void;
|
---|
41 | private _createScheduleIfNeeded;
|
---|
42 | private _getScheduleObservable;
|
---|
43 | }
|
---|