Skip to content

Commit

Permalink
Use Record in scope type as well
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Sep 29, 2020
1 parent 150f7f2 commit 9fc9d6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/hub/src/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class Scope implements ScopeInterface {
protected _tags: { [key: string]: string } = {};

/** Extra */
protected _extra: { [key: string]: unknown } = {};
protected _extra: Extras = {};

/** Contexts */
protected _contexts: { [key: string]: Record<string, unknown> } = {};
Expand Down
6 changes: 3 additions & 3 deletions packages/types/src/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) =>
export interface ScopeContext {
user: User;
level: Severity;
extra: { [key: string]: any };
contexts: { [key: string]: Record<any, any> };
extra: Extras;
contexts: { [key: string]: Record<string, unknown> };
tags: { [key: string]: string };
fingerprint: string[];
}
Expand Down Expand Up @@ -82,7 +82,7 @@ export interface Scope {
* @param name of the context
* @param context Any kind of data. This data will be normailzed.
*/
setContext(name: string, context: { [key: string]: any } | null): this;
setContext(name: string, context: Record<string, unknown> | null): this;

/**
* Sets the Span on the scope.
Expand Down

0 comments on commit 9fc9d6d

Please sign in to comment.