react-intercom icon indicating copy to clipboard operation
react-intercom copied to clipboard

Types for IntercomAPI

Open LasaleFamine opened this issue 6 years ago • 3 comments

Hello there, I'm trying to use the module with Typescript and I just saw that there is a missing type for IntercomAPI. Is there any plan to add and export also that types? Thanks for the module BTW!

EDIT: If this can help, here is my current extends of your types:

import * as ReactIntercom from 'react-intercom';

type IntercomActions = 'boot'
| 'shutdown'
| 'hide'
| 'update'
| 'show'
| 'showNewMessage'
| 'showMessages'
| 'onHide'
| 'onShow'
| 'onUnreadCountChange'
| 'trackEvent'
| 'getVisitorId'
| 'startTour'

type IntercomOptions = any;

declare module 'react-intercom' {
  const IntercomAPI: (action: IntercomActions, options?: IntercomOptions) => void;
}

LasaleFamine avatar Dec 16 '19 14:12 LasaleFamine

Any update on this?

giopetris avatar May 19 '20 00:05 giopetris

Hello! Any news? Thanks

alan345 avatar May 30 '20 18:05 alan345

Great thanks!

alan345 avatar May 30 '20 18:05 alan345