Skip to content

Commit 596bafc

Browse files
committed
delete callOnHub
1 parent e9ce479 commit 596bafc

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

packages/hub/src/exports.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@ import {
1515
import { getCurrentHub, Hub } from './hub';
1616
import { Scope } from './scope';
1717

18-
/**
19-
* This calls a function on the current hub.
20-
* @param method function to call on hub.
21-
* @param args to pass to function.
22-
*/
23-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
24-
export function callOnHub<T>(method: string, ...args: any[]): T {
25-
const hub = getCurrentHub();
26-
if (hub && hub[method as keyof Hub]) {
27-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
28-
return (hub[method as keyof Hub] as any)(...args);
29-
}
30-
throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);
31-
}
32-
3318
/**
3419
* Captures an exception event and sends it to Sentry.
3520
*

0 commit comments

Comments
 (0)