Skip to content

Commit

Permalink
fix(types): Fix incorrect sampled type on Transaction (getsentry#…
Browse files Browse the repository at this point in the history
…11115)

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

This patch fixes the TypeScript error by explicitly adding `undefined` to the `sampled` flag of `Transaction`.
  • Loading branch information
quisido authored and cadesalaberry committed Apr 19, 2024
1 parent b2a1713 commit 95f6f28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/types/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Sp
* 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 95f6f28

Please sign in to comment.