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

PermifyProvider in the npm registry package is missing { children } #5

Open
gRizzlyGR opened this issue Mar 5, 2023 · 2 comments
Open

Comments

@gRizzlyGR
Copy link

gRizzlyGR commented Mar 5, 2023

Hi all.

VSCode reports this problem with PermifyProvider:

Type '{ children: never[]; }' has no properties in common with type 'IntrinsicAttributes'.ts(2559)

image

Indeed, the PermifyProvider.d.ts in the package downloaded via npm or yarn has this definition:

declare const PermifyProvider: React.FunctionComponent;

I've tried cleaning the cache, and tried on different machines (Lubuntu 20.04 with yarn and Windows 10 with npm),

To check if there were problems with webpack, I built react-role locally, and the definition was right:

declare const PermifyProvider: ({ children }: PropsWithChildren) => JSX.Element;

Finally, I linked the local library via npm link to my project, and the problem was gone, but I cannot really use this workaround 😅

Let me know how I can help 😃

@gRizzlyGR
Copy link
Author

For now, I've upcasted the PermifyProvider object to any like this:

import { PermifyProvider as PProv } from '@permify/react-role';
const PermifyProvider = PProv as any;

@fatehMohamed14
Copy link
Contributor

Should be fixed by #9 when merged

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

2 participants