Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): support this type with inject option api #6557

Closed
wants to merge 0 commits into from

Conversation

rudyxu1102
Copy link
Contributor

@rudyxu1102 rudyxu1102 commented Aug 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant