Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): Fix incorrect sampled type on Transaction #11146

Merged
merged 1 commit into from Mar 18, 2024

Conversation

quisido
Copy link
Contributor

@quisido quisido commented Mar 16, 2024

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

@sentry/types does not align with @sentry/core, and it causes build errors when exactOptionalPropertyTypes is true.

Example error below:

.../Yarn/Berry/cache/@sentry-core-npm-7.107.0-d7aa1d2661-10c0.zip/node_modules/@sentry/core/types/tracing/transaction.d.ts:5:22 - error TS2420: Class 'import(".../Yarn/Berry/cache/@sentry-core-npm-7.107.0-d7aa1d2661-10c0.zip/node_modules/@sentry/core/types/tracing/transaction").Transaction' incorrectly implements interface 'import(".../Yarn/Berry/cache/@sentry-types-npm-7.107.0-a994f84978-10c0.zip/node_modules/@sentry/types/types/transaction").Transaction'.
  Types of property 'sampled' are incompatible.
    Type 'boolean | undefined' is not assignable to type 'boolean'.
      Type 'undefined' is not assignable to type 'boolean'.

5 export declare class Transaction extends SpanClass implements TransactionInterface {
                       ~~~~~~~~~~~


Found 1 error in .../Yarn/Berry/cache/@sentry-core-npm-7.107.0-d7aa1d2661-10c0.zip/node_modules/@sentry/core/types/tracing/transaction.d.ts:5

This change fixes this.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Lms24 Lms24 changed the title fix incorrect sampled type on Transaction fix(types): Fix incorrect sampled type on Transaction Mar 18, 2024
@Lms24 Lms24 enabled auto-merge (squash) March 18, 2024 11:53
@Lms24 Lms24 merged commit 4059bbd into getsentry:v7 Mar 18, 2024
78 checks passed
@AbhiPrasad AbhiPrasad mentioned this pull request Mar 18, 2024
@AbhiPrasad
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants