Typescript

Setup Jimo in your typescript project

After injected in your app, Jimo adds some propertyto the window object.

To prevent linter errors in your project, update (or create) your global.d.ts file and add the following types

declare module globalThis {
  interface Window {
    
    // Types for Jimo
    jimo:
      | {
          push: (args: [string, string, (string | number | object)[]]) => void;
        }
      | Array<[string, string, (string | number | object)[]]>;
    JIMO_PROJECT_ID: string;
    JIMO_MANUAL_INIT: string;
    JIMO_SESSION_TOKEN: string;
    JIMO_CHANGELOG_PRELOAD: string;
    JIMO_DEFAULT_TRIGGER_HIDDEN: string;
    
  }
}

Last updated