Skip to content

Commit 9fc9d6d

Browse files
committed
Use Record in scope type as well
1 parent 150f7f2 commit 9fc9d6d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/hub/src/scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class Scope implements ScopeInterface {
4040
protected _tags: { [key: string]: string } = {};
4141

4242
/** Extra */
43-
protected _extra: { [key: string]: unknown } = {};
43+
protected _extra: Extras = {};
4444

4545
/** Contexts */
4646
protected _contexts: { [key: string]: Record<string, unknown> } = {};

packages/types/src/scope.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) =>
1313
export interface ScopeContext {
1414
user: User;
1515
level: Severity;
16-
extra: { [key: string]: any };
17-
contexts: { [key: string]: Record<any, any> };
16+
extra: Extras;
17+
contexts: { [key: string]: Record<string, unknown> };
1818
tags: { [key: string]: string };
1919
fingerprint: string[];
2020
}
@@ -82,7 +82,7 @@ export interface Scope {
8282
* @param name of the context
8383
* @param context Any kind of data. This data will be normailzed.
8484
*/
85-
setContext(name: string, context: { [key: string]: any } | null): this;
85+
setContext(name: string, context: Record<string, unknown> | null): this;
8686

8787
/**
8888
* Sets the Span on the scope.

0 commit comments

Comments
 (0)