-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(core)!: Remove
Scope
type interface in favor of using Scope
c…
…lass (#14721) In v8, types have been exported from `@sentry/types`, while implementations have been exported from other classes. This lead to some duplication, where we had to keep an interface in `@sentry/types`, while the implementation mirroring that interface was kept e.g. in `@sentry/core`. Since in v9 the types have been merged into `@sentry/core`, we can get rid of some of this duplication. This means that certain things that used to be a separate interface, will not expect an actual instance of the class/concrete implementation. This should not affect most users, unless you relied on passing things with a similar shape to internal methods. This PR removes the `Scope` interface, in favor of just using the scope class everywhere. This is related to #9840 --------- Co-authored-by: Sigrid Huemer <[email protected]>
- Loading branch information
Showing
28 changed files
with
178 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { getGlobalSingleton } from './carrier'; | ||
import { Scope as ScopeClass } from './scope'; | ||
import type { Scope } from './types-hoist'; | ||
import { Scope } from './scope'; | ||
|
||
/** Get the default current scope. */ | ||
export function getDefaultCurrentScope(): Scope { | ||
return getGlobalSingleton('defaultCurrentScope', () => new ScopeClass()); | ||
return getGlobalSingleton('defaultCurrentScope', () => new Scope()); | ||
} | ||
|
||
/** Get the default isolation scope. */ | ||
export function getDefaultIsolationScope(): Scope { | ||
return getGlobalSingleton('defaultIsolationScope', () => new ScopeClass()); | ||
return getGlobalSingleton('defaultIsolationScope', () => new Scope()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.