From 3828f45a6c763d11c1d50f2ac02aff7423cbcb72 Mon Sep 17 00:00:00 2001 From: Vishnu Singh Date: Tue, 17 Mar 2020 14:41:28 +0530 Subject: [PATCH] add typings for withToastManager HOC --- index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 695f59c..9d38ccd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -67,7 +67,15 @@ export const DefaultToastContainer: ComponentType; export const DefaultToast: ComponentType; export const ToastConsumer: ComponentType; export const ToastProvider: ComponentType; -export function withToastManager(...args: any[]): any; + +export interface ToastManagerProps { + toastManager: ToastConsumerContext; +} + +export function withToastManager( + Component: ComponentType +): ComponentType>; + export function useToasts(): { addToast: AddToast; removeToast: RemoveToast;