core
core copied to clipboard
fix(types): support this type with `inject` option api
When using inject option api, I can't get foo in this type.
defineComponent({
props: ['a'],
inject: {
foo: 'foo'
},
created() {
// ts throw error:Property 'foo' does not exist
console.log(this.foo)
}
})
I create a PR that infering this.foo as a unkown. Maybe can fix issues below.
close #5931 close #3031 link #5216