From bed9a94a7a673f52343d4fc9e265faf84cb1395b Mon Sep 17 00:00:00 2001 From: Vincas Stonys Date: Sun, 6 Aug 2017 15:33:02 +0300 Subject: [PATCH] Add removeAll() definition to react-notification-system-redux --- types/react-notification-system-redux/index.d.ts | 3 ++- types/react-notification-system-redux/package.json | 2 +- .../react-notification-system-redux-tests.tsx | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/react-notification-system-redux/index.d.ts b/types/react-notification-system-redux/index.d.ts index 43161bfa55..1e009a4f46 100644 --- a/types/react-notification-system-redux/index.d.ts +++ b/types/react-notification-system-redux/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-notification-system-redux 1.0 +// Type definitions for react-notification-system-redux 1.1 // Project: https://github.com/gor181/react-notification-system-redux // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -35,4 +35,5 @@ declare namespace Notifications { const info: NotificationShow; const success: NotificationShow; const warning: NotificationShow; + function removeAll(): Action; } diff --git a/types/react-notification-system-redux/package.json b/types/react-notification-system-redux/package.json index e52256ea90..36ce503807 100644 --- a/types/react-notification-system-redux/package.json +++ b/types/react-notification-system-redux/package.json @@ -2,4 +2,4 @@ "dependencies": { "redux": "^3.6.0" } -} \ No newline at end of file +} diff --git a/types/react-notification-system-redux/react-notification-system-redux-tests.tsx b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx index 2225fa744a..631147976a 100644 --- a/types/react-notification-system-redux/react-notification-system-redux-tests.tsx +++ b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { createStore, Store } from "redux"; import { Notification } from "react-notification-system"; import * as Notifications from "react-notification-system-redux"; -import { reducer, show, hide, info, error, warning, success, NotificationLevel } from "react-notification-system-redux"; +import { reducer, removeAll, show, hide, info, error, warning, success, NotificationLevel } from "react-notification-system-redux"; class Test extends React.Component { private test() { @@ -20,6 +20,7 @@ class Test extends React.Component { hide(notification); hide("uid"); hide(123); + removeAll(); } render() {