File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,13 @@ export function configureScope(callback: (scope: Scope) => void): ReturnType<Hub
77
77
export function addBreadcrumb ( breadcrumb : Breadcrumb ) : ReturnType < Hub [ 'addBreadcrumb' ] > {
78
78
return getCurrentHub ( ) . addBreadcrumb ( breadcrumb ) ;
79
79
}
80
+
81
+ /**
82
+ * Sets context data with the given name.
83
+ * @param name of the context
84
+ * @param context Any kind of data. This data will be normalized.
85
+ */
86
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
+ export function setContext ( name : string , context : { [ key : string ] : any } | null ) : ReturnType < Hub [ 'setContext' ] > {
88
+ return getCurrentHub ( ) . setContext ( name , context ) ;
89
+ }
Original file line number Diff line number Diff line change @@ -29,16 +29,6 @@ function callOnHub<T>(method: string, ...args: any[]): T {
29
29
throw new Error ( `No hub defined or ${ method } was not found on the hub, please open a bug report.` ) ;
30
30
}
31
31
32
- /**
33
- * Sets context data with the given name.
34
- * @param name of the context
35
- * @param context Any kind of data. This data will be normalized.
36
- */
37
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
- export function setContext ( name : string , context : { [ key : string ] : any } | null ) : void {
39
- callOnHub < void > ( 'setContext' , name , context ) ;
40
- }
41
-
42
32
/**
43
33
* Set an object that will be merged sent as extra data with the event.
44
34
* @param extras Extras object to merge into current context.
You can’t perform that action at this time.
0 commit comments