• Returns a global singleton contained in the global __SENTRY__ object.

    If the singleton doesn't already exist in __SENTRY__, it will be created using the given factory function and added to the __SENTRY__ object.

    Type Parameters

    • T

    Parameters

    • name: "globalEventProcessors" | "hub" | "logger" | "extensions"

      name of the global singleton on SENTRY

    • creator: (() => T)

      creator Factory function to create the singleton if it doesn't already exist on __SENTRY__

        • (): T
        • Returns T

    • Optional obj: unknown

      (Optional) The global object on which to look for __SENTRY__, if not GLOBAL_OBJ's return value

    Returns T

    the singleton

Generated using TypeDoc