PR #2636 for "Support for type-hinting shared Page Props" changed my props to be any instead of unknown or type hinted.
#2661
Unanswered
kylemilloy
asked this question in
Help (Vue)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As the title suggests this is about the PR here. Before I was using
usePage<MyPageProps>()and it type hints as intended. If I remove the type hinting and just useusePage()then any of my props are unknown...this is fine. After doing as this PR suggests and adding the following to myglobal.d.tsdeclaration file......and then using
usePage()without typehinting, not only is it not picking up type hinting properly but now every prop is coming in asanyinstead ofunknownVersions I'm coming from and going to where I see this difference.
Wondering if anyone else is seeing this behaviour too?
Beta Was this translation helpful? Give feedback.
All reactions