// Type definitions for angular-ui-notification // Project: https://github.com/alexcrack/angular-ui-notification // Definitions by: Kamil Rojewski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// import * as angular from 'angular'; declare module 'angular' { export namespace uiNotification { type XPosition = 'right' | 'left' | 'center'; type YPosition = 'top' | 'bottom'; type MessageType = 'primary' | 'info' | 'success' | 'warning' | 'error'; interface IGlobalMessageOptions { delay?: number; startTop?: number; startRight?: number; verticalSpacing?: number; horizontalSpacing?: number; positionX?: XPosition; positionY?: YPosition; replaceMessage?: boolean; templateUrl?: string; onClose?: (element: any) => any; closeOnClick?: boolean; maxCount?: number; } interface IMessageOptions { title?: string; message?: string; templateUrl?: string; delay?: number; type?: MessageType; positionX?: XPosition; positionY?: YPosition; replaceMessage?: boolean; closeOnClick?: boolean; } interface INotificationScope { kill(isHard: boolean): void; } interface INotificationProvider { setOptions(options: IGlobalMessageOptions): void; } type Message = string | IMessageOptions; interface INotificationService { primary(message: Message): IPromise; info(message: Message): IPromise; success(message: Message): IPromise; warning(message: Message): IPromise; error(message: Message): IPromise; clearAll(): void; (message: Message, type?: MessageType): IPromise; } } }