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

types: making ComputedRef types inline with vue3 and provide ComputdRef type #310

Closed
wants to merge 1 commit into from

Conversation

pikax
Copy link
Member

@pikax pikax commented Apr 19, 2020

Making computed return types inline with the vue 3

computed(() => ({ a: 1 })).value = 2 as any // type error :correct:
computed(() => ({ a: 1 })).value.a = 2 // works
computed<{ a: number }>(
  {
    get() {
      return { a: 1 }
    },
    set(v) {}
  }
).value.a = 2 // workd

@pikax
Copy link
Member Author

pikax commented Apr 19, 2020

merged into #309

@pikax pikax closed this Apr 19, 2020
@pikax pikax deleted the types/computedRef branch April 19, 2020 18:15
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.

1 participant