You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Logs 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 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. #129
The text was updated successfully, but these errors were encountered:
@louis-launchdarkly I'm not one to usually bump issues, but this looks like it has been sat here for a year gathering upvotes and it looks like it should be a minor fix. Is there any update on this?
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 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. #129
The text was updated successfully, but these errors were encountered: