1.1.10 • Published 6 months ago

@types/react-notification-system-redux v1.1.10

Weekly downloads
1,044
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-notification-system-redux

Summary

This package contains type definitions for react-notification-system-redux (https://github.com/gor181/react-notification-system-redux).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-notification-system-redux.

index.d.ts

// Type definitions for react-notification-system-redux 1.1
// Project: https://github.com/gor181/react-notification-system-redux
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import { Component } from "react";
import { Action } from "redux";
import { Attributes, Notification } from "react-notification-system";

export as namespace Notifications;

export = Notifications;

declare class Notifications extends Component<Notifications.NotificationsProps> {}

declare namespace Notifications {
    type NotificationsState = Notification[];

    type NotificationLevel = "error" | "warning" | "info" | "success";

    type NotificationsReducer<A extends Action> = (state: NotificationsState, action: A) => NotificationsState;

    type NotificationShow = (opts?: Notification) => Action;

    interface NotificationsProps extends Attributes {
        notifications?: Notification[] | undefined;
    }

    const reducer: NotificationsReducer<any>;

    function show(opts?: Notification, level?: NotificationLevel): Action;
    const error: NotificationShow;
    function hide(opts?: Notification | string | number): Action;
    const info: NotificationShow;
    const success: NotificationShow;
    const warning: NotificationShow;
    function removeAll(): Action;
}

Additional Details

Credits

These definitions were written by Karol Janyst.

1.1.9

7 months ago

1.1.8

7 months ago

1.1.10

6 months ago

1.1.7

3 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago