Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript): export the LDProps interface for access in application code #321

Merged

Conversation

kallevmercury
Copy link
Contributor

@kallevmercury kallevmercury commented Oct 24, 2024

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

#322

Describe the solution you've provided

With this change, it is possible to import the LDProps type from the library like this:

import type {LDProps} from 'launchdarkly-react-client-sdk'

Describe alternatives you've considered

The current workarounds have involved duplicating the TS interface into the codebase or attempting to infer it from the withLDConsumer parameter types. The latter option does not work well with IDEs and IntelliSense.

Additional context

N/A

@kallevmercury kallevmercury changed the title fix(typescript): re-export the LDProps interface for access in application code feat(typescript): export the LDProps interface for access in application code Oct 24, 2024
@kallevmercury kallevmercury marked this pull request as ready for review October 24, 2024 20:43
@kallevmercury kallevmercury requested a review from a team as a code owner October 24, 2024 20:43
@kinyoklion kinyoklion merged commit 7a084c5 into launchdarkly:main Nov 1, 2024
1 check passed
kinyoklion added a commit that referenced this pull request Nov 4, 2024
🤖 I have created a release *beep* *boop*
---


##
[3.6.0](launchdarkly-react-client-sdk-v3.5.0...launchdarkly-react-client-sdk-v3.6.0)
(2024-11-01)


### Features

* Support for providing custom contexts
([#313](#313))
([a8b52f4](a8b52f4))
* **typescript:** export the LDProps interface for access in application
code
([#321](#321))
([7a084c5](7a084c5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
@kallevmercury kallevmercury deleted the kallevmercury/export_ldprops_type branch November 8, 2024 22:12
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.

2 participants