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

Request: Typescript Support #202

Open
JacobRex opened this issue Jun 30, 2023 · 1 comment
Open

Request: Typescript Support #202

JacobRex opened this issue Jun 30, 2023 · 1 comment

Comments

@JacobRex
Copy link

I see typescript errors when trying to use the injected props in my child component. Typescript is unable to find these injections. The code renders locally, but these typescript errors break the build of my application.

Things I've tried

  1. This works as expected, but I get this breaking typescript error
image
  1. This does not work, and gives me this typescript error. I thought this might work because this was shown in the documentation.
image

The Solution I'd Like

I would like to be able to access my props directly this.myProp or through some const to make it clear that it's injected like this.ProxiInjection.myProp without any typescript errors

Reproduction

You can explore a reproduction of this error here: https://codesandbox.io/s/vue-typescript-example-forked-x4h98x?file=/src/App.vue

@privatenumber
Copy link
Owner

This package doesn't contain types right now but I'm happy to accept a PR to add them.

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

No branches or pull requests

2 participants