import * as i0 from '@angular/core'; import { ChangeDetectorRef, OnInit, OnDestroy, TemplateRef, ViewContainerRef, ErrorHandler, PipeTransform } from '@angular/core'; import { Observable } from 'rxjs'; declare abstract class TickScheduler { abstract schedule(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Provides rendering functionality regardless of whether `zone.js` is present * or not. It must be provided at the component/directive level. * * @usageNotes * * ### Rerender zone-less app on route changes * * ```ts * @Component({ * selector: 'app-root', * template: '', * // 👇 `RenderScheduler` is provided at the component level * providers: [RenderScheduler], * changeDetection: ChangeDetectionStrategy.OnPush, * }) * export class AppComponent implements OnInit { * constructor( * private readonly router: Router, * private readonly renderScheduler: RenderScheduler * ) {} * * ngOnInit(): void { * this.router.events * .pipe(filter((e) => e instanceof NavigationEnd)) * .subscribe(() => this.renderScheduler.schedule()); * } * } * ``` * * ### Rerender component on interval * * ```ts * @Component({ * selector: 'app-interval', * template: '{{ elapsedTime }}ms', * // 👇 `RenderScheduler` is provided at the component level * providers: [RenderScheduler], * changeDetection: ChangeDetectionStrategy.OnPush, * }) * export class IntervalComponent implements OnInit { * elapsedTime = 0; * * constructor(private readonly renderScheduler: RenderScheduler) {} * * ngOnInit(): void { * setInterval(() => { * this.elapsedTime += 1000; * this.renderScheduler.schedule(); * }, 1000); * } * } * ``` */ declare class RenderScheduler { private readonly cdRef; private readonly tickScheduler; constructor(cdRef: ChangeDetectorRef, tickScheduler: TickScheduler); /** * Marks component and its ancestors as dirty. * It also schedules a new change detection cycle in zone-less mode. */ schedule(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type Primitive = string | number | bigint | boolean | symbol | null | undefined; type ObservableOrPromise = Observable | PromiseLike; type ObservableDictionary = Required<{ [Key in keyof PO]: Observable; }>; type PotentialObservableResult = PO extends ObservableOrPromise ? Result | ExtendedResult : PO extends Primitive ? PO : keyof PO extends never ? PO : PO extends ObservableDictionary ? { [Key in keyof PO]: PO[Key] extends Observable ? Value : never; } | ExtendedResult : PO; type LetViewContextValue = PotentialObservableResult; interface LetViewContext { /** * using `$implicit` to enable `let` syntax: `*ngrxLet="obs$; let o"` */ $implicit: LetViewContextValue; /** * using `ngrxLet` to enable `as` syntax: `*ngrxLet="obs$ as o"` */ ngrxLet: LetViewContextValue; /** * `*ngrxLet="obs$; let e = error"` or `*ngrxLet="obs$; error as e"` */ error: any; /** * `*ngrxLet="obs$; let c = complete"` or `*ngrxLet="obs$; complete as c"` */ complete: boolean; } /** * * @description * * The `*ngrxLet` directive serves a convenient way of binding observables to a view context * (DOM element's scope). It also helps with several internal processing under the hood. * * @usageNotes * * ### Displaying Observable Values * * ```html * * * * * * * * ``` * * ### Tracking Different Observable Events * * ```html * * * * *

There is an error: {{ e }}

*

Observable is completed.

*
* ``` * * ### Combining Multiple Observables * * ```html * * * * * ``` * * ### Using Suspense Template * * ```html * * * * * *

Loading...

*
* ``` * * ### Using Aliases for Non-Observable Values * * ```html * * * * *

This field is required.

*

This field must be an email.

*
*
* ``` * * @publicApi */ declare class LetDirective implements OnInit, OnDestroy { private readonly mainTemplateRef; private readonly viewContainerRef; private readonly errorHandler; private readonly renderScheduler; private isMainViewCreated; private isSuspenseViewCreated; private readonly viewContext; private readonly renderEventManager; private readonly subscription; set ngrxLet(potentialObservable: PO); suspenseTemplateRef?: TemplateRef; constructor(mainTemplateRef: TemplateRef>, viewContainerRef: ViewContainerRef, errorHandler: ErrorHandler, renderScheduler: RenderScheduler); static ngTemplateContextGuard(dir: LetDirective, ctx: unknown): ctx is LetViewContext; ngOnInit(): void; ngOnDestroy(): void; private renderMainView; private renderSuspenseView; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[ngrxLet]", never, { "ngrxLet": { "alias": "ngrxLet"; "required": false; }; "suspenseTemplateRef": { "alias": "ngrxLetSuspenseTpl"; "required": false; }; }, {}, never, never, true, never>; } type PushPipeResult = PotentialObservableResult; /** * @description * * The `ngrxPush` pipe serves as a drop-in replacement for the `async` pipe. * It contains intelligent handling of change detection to enable us * running in zone-full as well as zone-less mode without any changes to the code. * * @usageNotes * * ### Displaying Observable Values * * ```html *

{{ number$ | ngrxPush }}

* * {{ n }} * * * ``` * * ### Combining Multiple Observables * * ```html * * {{ { users: users$, query: query$ } | ngrxPush | json }} * * ``` * * @publicApi */ declare class PushPipe implements PipeTransform, OnDestroy { private readonly errorHandler; private renderedValue; private readonly renderScheduler; private readonly renderEventManager; private readonly subscription; constructor(errorHandler: ErrorHandler); transform(potentialObservable: PO): PushPipeResult; ngOnDestroy(): void; private setRenderedValue; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } export { LetDirective, PushPipe, RenderScheduler };