defineComponent setup function sees "props" as type any in TS
Vue version
3.2.34
Link to minimal reproduction
https://codesandbox.io/s/quirky-dust-62izo9?file=/src/main.js
Steps to reproduce
Mouse over the "props.modelValue" and see that both "modelValue" and "props" are seen as type any
by TypeScript.
What is expected?
In previous versions, TypeScript (and the IDE) would recognize props with the correct object structure.
What is actually happening?
After upgrading from 3.2.33 to 3.2.34 it always sees props as type any
.
I tested this in VS Code and Visual Studio 2019 as well as simply trying to build my project. All three report the wrong types for the props parameter.
System Info
No response
Any additional comments?
I was upgrading to get this fix: https://github.com/vuejs/core/pull/5871. Since it has to do with props I thought maybe it broke the setup function as a by-product of the fix. But reverting that change in the vue code in my node_modules did not restore the type information on "props".