Skip to content

Types for IntercomAPI #83

@LasaleFamine

Description

@LasaleFamine

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions