const toastContent = <div>Toast!</div>

// $ExpectError
toast(toastContent, { type: toast.TYPE.SUCCES })
toast(toastContent, { type: toast.TYPE.SUCCESS })

// $ExpectError
toast.success(toastContent, { onOpen: false })
toast.success(toastContent, { onOpen: () => console.log('open') })

// $ExpectError
toast.info(toastContent, { onClose: false })
toast.info(toastContent, { onClose: () => console.log('close') })

// $ExpectError
toast.warn(toastContent, { onOpen: false })
toast.warn(toastContent, { onOpen: () => console.log('open') })

// $ExpectError
toast.error(toastContent, { onClose: false })
toast.error(toastContent, { onClose: () => console.log('close') })

// $ExpectError
const isActiveBad: number = toast.isActive(1)
const isActiveGood: boolean = toast.isActive(1)

// $ExpectError
toast.dismiss('1')
toast.dismiss()
toast.dismiss(1)
Example #2
0
 showWarning(message) {
   toast.warn(message);
 }