fix(core): Update client options to allow explicit undefined#18024
fix(core): Update client options to allow explicit undefined#18024Lms24 merged 1 commit intogetsentry:developfrom
undefined#18024Conversation
c4db1bd to
293dc18
Compare
undefinedundefined
Lms24
left a comment
There was a problem hiding this comment.
Hey @G-Rath apologies for the late review! I agree that we should just explicitly allow undefined to better support this TS option (especially since it's default now)
I brought this back to the team to discuss how to proceed but my pragmatic take for now is that we merge in your PR. Worth noting, this is just a start with the most important options. If we seriously tackle this, it needs to go across the full SDK API surface which is quite a task 😅
I'll get back to you about this.
Given the time frame this was closed in, my assumption is that we closed it due to bandwidth. |
Lms24
left a comment
There was a problem hiding this comment.
Let's merge this in. Thanks for contributing!
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #18024 Co-authored-by: Lms24 <[email protected]>
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
exactOptionalPropertyTypesenabled (which is now the default for new TS projects) doing something like this is not allowed:as while
undefinedis 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