Skip to content

@sentry/browser version 7.93.0 and later does not build with typescript exactOptionalPropertyTypes #10654

@ansf

Description

@ansf

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

7.93.0 and later

Framework Version

No response

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. Enable exactOptionalPropertyTypes in tsconfig.json
  2. Import sentry
  3. Build

here is a minimal reproducible example https://github.com/ansf/sentry-reproducer

Expected Result

It should build

Actual Result

Two build errors:

@sentry/core/types/tracing/span.d.ts:218:5 - error TS2416: Property 'startChild' in type 'Span' is not assignable to the same property in base type 'Span'.

and

@sentry/core/types/tracing/transaction.d.ts:53:5 - error TS2416: Property 'updateName' in type 'Transaction' is not assignable to the same property in base type 'Transaction'.

Metadata

Metadata

Assignees

Labels

BugPackage: browserIssues related to the Sentry Browser SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions