Skip to content

Commit

Permalink
fix(types): Fix incorrect sampled type on Transaction (#11146)
Browse files Browse the repository at this point in the history
`@sentry/types` does not align with `@sentry/core`, and it causes build
errors when `exactOptionalPropertyTypes` is `true`.

This patch fixes the type error by explicitly specifying `undefined`.
  • Loading branch information
quisido committed Mar 18, 2024
1 parent 98c8709 commit 4059bbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/types/src/transaction.ts
Expand Up @@ -66,7 +66,7 @@ export interface Transaction extends TransactionContext, Omit<Span, 'setName' |
* Was this transaction chosen to be sent as part of the sample?
* @deprecated Use `spanIsSampled(transaction)` instead.
*/
sampled?: boolean;
sampled?: boolean | undefined;

/**
* @inheritDoc
Expand Down

0 comments on commit 4059bbd

Please sign in to comment.