-
Notifications
You must be signed in to change notification settings - Fork 116
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
Type error with ChromaticAberration #298
Comments
I opened up a PR here: Not sure if this is the right way to do it tbh, curious if this solution makes sense. To me, it doesn't make sense to export I'd expect you to want to export the full type, so this makes sense to me |
The PR doesn't work. My goal is basically to animate the offset of chromatic aberration based on mouse position. But with strict type checking enabled, I can't |
the solution I ended up going with was casting the type to unknown then to its expected type. If I typed the ref I was using the same way So it still seems like there is an issue here. My PR doesn't build because of other TS issues, so working on that! Let me know if I'm on the right track, thanks!! |
This will be fixed with React 19 or v3 of react-postprocessing. The types don't infer correctly with React 18 and |
Hi,
I have the below code:
I'm trying to animate the chromatic aberration offset.
However, I get the following error:
I believe this is because the type is exported as
typeof ChromaticAberrationEffect
inreact-three/postprocessing
instead of just
ChromaticAberrationEffect
When I changed this in my node modules folder the issue is resolved
The text was updated successfully, but these errors were encountered: