0.0.9 • Published 6 months ago

@types/angular-ui-notification v0.0.9

Weekly downloads
840
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/angular-ui-notification

Summary

This package contains type definitions for angular-ui-notification (https://github.com/alexcrack/angular-ui-notification).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-ui-notification.

index.d.ts

// Type definitions for angular-ui-notification
// Project: https://github.com/alexcrack/angular-ui-notification
// Definitions by: Kamil Rojewski <https://github.com/krojew>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="angular" />

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 | undefined;
            startTop?: number | undefined;
            startRight?: number | undefined;
            verticalSpacing?: number | undefined;
            horizontalSpacing?: number | undefined;
            positionX?: XPosition | undefined;
            positionY?: YPosition | undefined;
            replaceMessage?: boolean | undefined;
            templateUrl?: string | undefined;
            onClose?: ((element: any) => any) | undefined;
            closeOnClick?: boolean | undefined;
            maxCount?: number | undefined;
        }

        interface IMessageOptions {
            title?: string | undefined;
            message?: string | undefined;
            templateUrl?: string | undefined;
            delay?: number | undefined;
            type?: MessageType | undefined;
            positionX?: XPosition | undefined;
            positionY?: YPosition | undefined;
            replaceMessage?: boolean | undefined;
            closeOnClick?: boolean | undefined;
        }

        interface INotificationScope {
            kill(isHard: boolean): void;
        }

        interface INotificationProvider {
            setOptions(options: IGlobalMessageOptions): void;
        }

        type Message = string | IMessageOptions;

        interface INotificationService {
            primary(message: Message): IPromise<INotificationScope>;
            info(message: Message): IPromise<INotificationScope>;
            success(message: Message): IPromise<INotificationScope>;
            warning(message: Message): IPromise<INotificationScope>;
            error(message: Message): IPromise<INotificationScope>;

            clearAll(): void;

            (message: Message, type?: MessageType): IPromise<INotificationScope>;
        }
    }
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 22:41:03 GMT
  • Dependencies: @types/angular
  • Global values: none

Credits

These definitions were written by Kamil Rojewski.

0.0.9

6 months ago

0.0.8

7 months ago

0.0.7

8 months ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago