Skip to content

Commit ffdc8aa

Browse files
authored
fix(types): Fix incorrect sampled type on Transaction (#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`.
1 parent fa1621c commit ffdc8aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/types/src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Sp
7474
* Was this transaction chosen to be sent as part of the sample?
7575
* @deprecated Use `spanIsSampled(transaction)` instead.
7676
*/
77-
sampled?: boolean;
77+
sampled?: boolean | undefined;
7878

7979
/**
8080
* @inheritDoc

0 commit comments

Comments
 (0)