Type-only props are unable to infer primitive runtime prop types from generic types, which breaks boolean casting #12872
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
scope: compiler
scope: sfc
Vue version
3.5.13
Link to minimal reproduction
https://play.vuejs.org/#eNqNVE1vEzEQ/SuWhRBIVVYCTmG7CFBBcIAKInHxZbOZpC5e2/JHmird/96x197dtGnTk8cz742fZ8be089az7Ye6JyWtjFcO2LBeV0xyVutjCNfVavJ2qiWMDorwi7gGWWSybLoOYjGjYNWi9oB7ggpr95VC+OhLNCIjphIG95yx7dAbkytNazy+h0kGN4QL7mS6PYyA4oh37da2IcJQ7QsJkfTM+pso+Sab2bXVkm82T7AGW0QzwWY39rhGZbROYmREKuFUDc/o8+h6rPsb66g+X/Ef213wcfopQELZosFGWKuNhtwffji7y/YoT0EW7XyAtHPBP+AVcIHjT3si5crlD3BRbU/Yn+43Czsxc6BtPlSQWhAdhHPKLYrlOqpq49y388+RB6THVYxt3oyGqKWm3NkYIJhTNytBvLvoInloiLnZEHuiL1tl0qgIX27xCscoBGzVEpALY8hmcQmWocTo7RF6ArWXMJl2JVR+zBKn+Y5z8fgT3OD3nTO1JsUjsEsOWWoIngYPsQ9EIbGeFhHXvd1TFN7cGZXvXmLy3NvxIu4oiV4sib3wh7t++vPxmfTYXcioxgoU3LSPaHmZ/QyYirHY35+nyfSpEJM+PlBnyQ+lj7+ASfIyHjVz8kx4NKkP+QpuyxiIw6/ke4elrixhQ==
Steps to reproduce
Our specific issue is that when the runtime prop type missing, the Boolean Casting doesn't work as expected.
wrapped
is undefined`What is expected?
boolean
casting should work for theseWhat is actually happening?
The runtime prop is undefined, and the prop is not treated as a boolean
System Info
Any additional comments?
We noticed that our boolean prop types were not recognized:
The text was updated successfully, but these errors were encountered: