UNPKG

@grafana/runtime

Version:
18 lines (16 loc) 519 B
"use strict"; let singleton; function setHelpNavItemHook(hook) { if (singleton && process.env.NODE_ENV !== "test") { throw new Error("setHelpNavItemHook() function should only be called once, when Grafana is starting."); } singleton = hook; } function useHelpNavItem() { if (!singleton) { throw new Error("useHelpNavItem() can only be used after the Grafana instance has started."); } return singleton(); } export { setHelpNavItemHook, useHelpNavItem }; //# sourceMappingURL=useHelpNavItem.mjs.map