Skip to content

Conversation

@G-Rath
Copy link

@G-Rath G-Rath commented Oct 24, 2025

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).

Currently with exactOptionalPropertyTypes enabled (which is now the default for new TS projects) doing something like this is not allowed:

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  environment: process.env.SENTRY_ENV ?? process.env.RAILS_ENV
});

as while undefined is supported, the types don't allow it as an explicit value.

It looks like this has come up before and Sentry is wanting to support it, though I'm not sure what ended up happening because the end ticket got closed without any associated PR.

I've purposely just opened this updating the client option properties that I think this feature is most commonly used with

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.

1 participant