Discussions

Ask a Question
Back to All

Wrong type re-definition for Window.Intercom in JavaScript SDK

Intercom second parameter should be optional, because there are methods like Intercom('show');
https://developers.intercom.com/installing-intercom/web/methods/#intercomshow

But in your JavaScript SDK code it is defined as required, and it breaks all other usages of Intercom in our App

Intercom: { ul_wasVisible?: boolean } & ((
      method: string,
      data: unknown, <===== SHOULD BE OPTIONAL
    ) => void);

please see line 2824 here:
https://www.npmjs.com/package/@sprig-technologies/sprig-browser?activeTab=code