1👍
Okay, I think I figured it out.
As @zenly said, the Partial wasn’t the cause of the error. The error was that Volar / TypeScript was inferring the type of pageType
within VSCode as 'link' | 'collection'
but it wasn’t actually of that type, because Vue’s language services weren’t correctly inferring the type of pageType
by the time it was bound to the template (and was inferring that it was just a string).
I fixed it by explicitly defining pageType
as that type.
- [Vuejs]-How to configure Vue2 environment with Silex or other PHP framework
- [Vuejs]-Adding role based routes in vue router with pinia
Source:stackexchange.com