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

refactor: create useRender helper instead of expose() #13214

Merged
merged 1 commit into from
Mar 6, 2021

Conversation

KaelWD
Copy link
Member

@KaelWD KaelWD commented Mar 5, 2021

expose() is broken: vuejs/test-utils#435, vuejs/rfcs#210

useRender allows us to return the public state from setup and then infer types from that:

<v-img ref="img">

setup () {
  const img = ref<InstanceType<typeof VImg>>()
  
  img.value.currentSrc // string
}

@KaelWD KaelWD merged commit e7bf13a into next Mar 6, 2021
@KaelWD KaelWD deleted the refactor/useRender branch March 6, 2021 05:09
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

Successfully merging this pull request may close these issues.

2 participants