react-client-sdk icon indicating copy to clipboard operation
react-client-sdk copied to clipboard

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

Open kallevmercury opened this issue 1 year ago • 0 comments

Requirements

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

Related issues

https://github.com/launchdarkly/react-client-sdk/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 avatar Oct 24 '24 19:10 kallevmercury