Skip to content

Multiple incompatible Scope types in v8.x #12053

Closed
@alumni

Description

@alumni

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/node

SDK Version

8.0.0

Framework Version

NestJS 10

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

It seems there are multiple types for Scope which are incompatible with each other.

withScope() from @sentry/core is using Scope from @sentry/types, but there is also a Scope in @sentry/core.

Both are directly or indirectly exported also by @sentry/node.

Expected Result

We tend to use everything from @sentry/node (since we should not care about the internals of Sentry). It would be great to have proper type compatibility.

Actual Result

The two Scope types are not compatible with each other:

Argument of type
'import(".../node_modules/@sentry/types/types/scope").Scope'
is not assignable to parameter of type
'import(".../node_modules/@sentry/core/types/scope").Scope'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nodeIssues related to the Sentry Node SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions