The `inject` option in Mixins cant be inferred
Vue version
3.2.47
Link to minimal reproduction
Steps to reproduce
As you can see, there is a ts error in the minimal reproduction above.
import { defineComponent } from 'vue'
const MixinA = defineComponent({
inject: ['foo']
})
const Comp = defineComponent({
mixins: [MixinA],
created() {
// expect type to unknown
console.log(this.foo)
}
})
What is expected?
foo
should be inferred to unknown
.
What is actually happening?
ts error: Property 'foo' does not exist on type 'CreateComponentPublicInstance<{}, {}, {}, {}, {}, DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<...>, {}>, ... 12 more ..., {}>'
System Info
No response
Any additional comments?
No response
Related to https://github.com/vuejs/vue/issues/12931