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

Version 3.0.7 introduces incompatibility with @types/react 17.0.43 #224

Open
kbaum opened this issue Nov 13, 2023 · 3 comments
Open

Version 3.0.7 introduces incompatibility with @types/react 17.0.43 #224

kbaum opened this issue Nov 13, 2023 · 3 comments

Comments

@kbaum
Copy link

kbaum commented Nov 13, 2023

Is this a support request?
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here or by emailing [email protected].

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

Describe the bug
We use version 17.0.43 of @types/react. When upgrading from 3.0.6 to 3.0.7 of this library, we get the following typescript errors:

node_modules/launchdarkly-react-client-sdk/lib/index.d.ts:195:30 - error TS2694: Namespace 'React' has no exported member 'JSX'.

195     render(): React__default.JSX.Element;
                                 ~~~

node_modules/launchdarkly-react-client-sdk/lib/index.d.ts:246:22 - error TS2694: Namespace 'React' has no exported member 'JSX'.

246 }) => React__default.JSX.Element>;
                         ~~~

node_modules/launchdarkly-react-client-sdk/lib/index.d.ts:283:140 - error TS2694: Namespace 'React' has no exported member 'JSX'.

283 declare function withLDConsumer(options?: ConsumerOptions): <P>(WrappedComponent: React.ComponentType<P & LDProps>) => (props: P) => React.JSX.Element;
                                                                                                                                               ~~~


Found 3 errors in the same file, starting at: node_modules/launchdarkly-react-client-sdk/lib/index.d.ts:195

To reproduce
Steps to reproduce the behavior.

Expected behavior
No typescript errors.

Logs
If applicable, add any log output related to your problem.

SDK version
3.0.7

Language version, developer tools
react 17.0.2
@types/react 17.0.43
typescript 4.7.4

OS/platform
macOS Ventura 13.5.2

Additional context
Version 3.0.6 does not have this issue.

@louis-launchdarkly
Copy link
Contributor

Hello @kbaum, thank you for raising the question. I have filed 224215 internally to track this.

By the way, is this still happening if you try to use 3.0.8 or 3.0.9? We have added some type-export changes and I wonder would those changes help in this case.

@jarivalentine
Copy link

This is still happening in version 3.0.10.
We are also using react 17.0.2, @types/react 17.0.45 and typescript 4.9.4.

@kbaum
Copy link
Author

kbaum commented Apr 22, 2024

Sorry. I am on a different project now and do not have access to the original project I posted this about.

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

No branches or pull requests

3 participants