-
Notifications
You must be signed in to change notification settings - Fork 541
Closed
Labels
Description
What problem does this feature solve?
Now that Vue is embracing TS, I think there’s much less value in validating component props via JS prototypes at runtime. It can still be a useful feature for a pure JS setup, but if someone has a TS setup where Volar is able to see the types without a runtime definition, they really don’t need the type to be validated at runtime.
Validating component props at runtime feels like trying to validate function params at runtime. It seems better to just let TS handle it.
What does the proposed API look like?
The goal would be for the app not to throw a runtime error for a setup such as in vuejs/core#7832, and instead allow the prop to pass through to the child component.
Perhaps this could be controlled with a validateRuntimeProps
boolean option in vite.config.
sxzz, MichaelBitard, tobychidi, pont1s, vmaubert and 3 more