package.notyf.models.d.ts Maven / Gradle / Ivy
import { INotyfNotificationOptions, DeepPartial, NotyfEvent } from './notyf.options';
export interface INotyfEventPayload {
target: NotyfNotification;
event?: Event;
}
export declare type NotyfEventCallback = (payload: INotyfEventPayload) => void;
export declare class NotyfNotification {
options: DeepPartial;
private listeners;
constructor(options: DeepPartial);
on(eventType: NotyfEvent, cb: NotyfEventCallback): void;
private triggerEvent;
}
export interface IRenderedNotification {
notification: NotyfNotification;
node: HTMLElement;
}
export declare enum NotyfArrayEvent {
Add = 0,
Remove = 1
}
export declare type NotyfArrayEventFn = (elem: T, event: NotyfArrayEvent, elems: T[]) => void;
export declare class NotyfArray {
private notifications;
private updateFn;
push(elem: T): void;
splice(index: number, num: number): T;
indexOf(elem: T): number;
onUpdate(fn: NotyfArrayEventFn): void;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy