UNPKG

sc-angular-toastify

Version:
44 lines (39 loc) 1.44 kB
import * as rxjs from 'rxjs'; import * as i0 from '@angular/core'; import { OnInit } from '@angular/core'; type ToastType = 'success' | 'error' | 'info' | 'warn'; type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; interface Toast { id: number; message: string; type: ToastType; duration: number; position?: ToastPosition; closing?: boolean; } declare class ToastService { private toasts; private toasts$; getToasts(): rxjs.Observable<Toast[]>; show(message: string, type?: ToastType, duration?: number, position?: ToastPosition): void; private startRemove; remove(id: number): void; clear(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>; } declare class ScAngularToastify implements OnInit { private service; positions: string[]; toasts: Toast[]; constructor(service: ToastService); ngOnInit(): void; getToastsByPosition(pos: string): Toast[]; close(id: number): void; onProgressEnd(id: number): void; getIcon(type: string): string; static ɵfac: i0.ɵɵFactoryDeclaration<ScAngularToastify, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ScAngularToastify, "sc-angular-toastify", never, {}, {}, never, never, true, never>; } export { ScAngularToastify, ToastService }; export type { Toast, ToastPosition, ToastType };