Racehorse
    Preparing search index...

    Interface EvergreenManager

    interface EvergreenManager {
        applyUpdate(): Promise<null | string>;
        getBundleInfo(): BundleInfo;
        getMasterVersion(): null | string;
        getUpdateStatus(): null | UpdateStatus;
        subscribe(
            eventType: "started",
            listener: (payload: { updateMode: UpdateMode }) => void,
        ): Unsubscribe;
        subscribe(
            eventType: "failed",
            listener: (payload: { updateMode: UpdateMode }) => void,
        ): Unsubscribe;
        subscribe(
            eventType: "ready",
            listener: (payload: { version: string }) => void,
        ): Unsubscribe;
        subscribe(
            eventType: "progress",
            listener: (payload: { contentLength: number; readLength: number }) => void,
        ): Unsubscribe;
    }
    Index

    Methods

    • Applies the available update bundle and returns its version, or returns null if there's no update bundle.

      For changes to take effect you must reload the app.

      Returns Promise<null | string>

    • The current version of the app bundle.

      Returns null | string

      Use getBundleInfo instead.

    • The new update download has started.

      Parameters

      • eventType: "started"
      • listener: (payload: { updateMode: UpdateMode }) => void

      Returns Unsubscribe

    • Failed to download an update.

      Parameters

      • eventType: "failed"
      • listener: (payload: { updateMode: UpdateMode }) => void

      Returns Unsubscribe

    • An update was successfully downloaded and ready to be applied.

      Parameters

      • eventType: "ready"
      • listener: (payload: { version: string }) => void

      Returns Unsubscribe

    • Progress of a pending update download.

      Parameters

      • eventType: "progress"
      • listener: (payload: { contentLength: number; readLength: number }) => void

      Returns Unsubscribe