Describe the bug
The type declaration of withLDProvider throws TS errors about not having anything in common with IntrinsicAttributes. Looking at the source code, it defaults the type to an empty object. If this empty object default is removed, the function runs without any type errors. withLDProvider<T extends JSX.IntrinsicAttributes = {}> should just be withLDProvider<T extends JSX.IntrinsicAttributes>
Expected behavior
Calling withLDProvider should not throw TS errors, and the app should pass types tests
Logserror TS2559: Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes'.
SDK version3.0.9
Language version, developer tools
React 18.2.0
React Dom 18.2.0
Typescript 5.2.2
@types/react 18.2.14
@types/react-dom 18.2.0
OS/platform
macOS Monterey Version 12.6
Also occurs for my team members on various versions of macOS
Additional Context
There was a similar issue opened with version 2.25 of this client when combined with React 18, I'm not sure if that update was missed in version 3 or if this is a different issue. https://github.com/launchdarkly/react-client-sdk/issues/129
Is this a support request? No
Describe the bug The type declaration of
withLDProvider
throws TS errors about not having anything in common withIntrinsicAttributes
. Looking at the source code, it defaults the type to an empty object. If this empty object default is removed, the function runs without any type errors.withLDProvider<T extends JSX.IntrinsicAttributes = {}>
should just bewithLDProvider<T extends JSX.IntrinsicAttributes>
To reproduce
Expected behavior Calling
withLDProvider
should not throw TS errors, and the app should pass types testsLogs
error TS2559: Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes'.
SDK version
3.0.9
Language version, developer tools React
18.2.0
React Dom18.2.0
Typescript5.2.2
@types/react18.2.14
@types/react-dom18.2.0
OS/platform macOS Monterey Version 12.6 Also occurs for my team members on various versions of macOS
Additional Context There was a similar issue opened with version 2.25 of this client when combined with React 18, I'm not sure if that update was missed in version 3 or if this is a different issue. https://github.com/launchdarkly/react-client-sdk/issues/129