UNPKG

1.49 kBTypeScriptView Raw
1import { Observable } from 'rxjs';
2import { OverlayRef } from '../overlay/overlay-ref';
3/**
4 * Reference to a toast opened via the Toastr service.
5 */
6export declare class ToastRef<T> {
7 private _overlayRef;
8 /** The instance of component opened into the toast. */
9 componentInstance: T;
10 /** Count of duplicates of this toast */
11 private duplicatesCount;
12 /** Subject for notifying the user that the toast has finished closing. */
13 private _afterClosed;
14 /** triggered when toast is activated */
15 private _activate;
16 /** notifies the toast that it should close before the timeout */
17 private _manualClose;
18 /** notifies the toast that it should reset the timeouts */
19 private _resetTimeout;
20 /** notifies the toast that it should count a duplicate toast */
21 private _countDuplicate;
22 constructor(_overlayRef: OverlayRef);
23 manualClose(): void;
24 manualClosed(): Observable<any>;
25 timeoutReset(): Observable<any>;
26 countDuplicate(): Observable<number>;
27 /**
28 * Close the toast.
29 */
30 close(): void;
31 /** Gets an observable that is notified when the toast is finished closing. */
32 afterClosed(): Observable<any>;
33 isInactive(): boolean;
34 activate(): void;
35 /** Gets an observable that is notified when the toast has started opening. */
36 afterActivate(): Observable<any>;
37 /** Reset the toast timouts and count duplicates */
38 onDuplicate(resetTimeout: boolean, countDuplicate: boolean): void;
39}