Skip to content

Conversation

pikax
Copy link
Member

@pikax pikax commented Apr 22, 2020

if you do ref(false) the type generated is Ref<true>|Ref<false>

This fixes that

const foo = ref(false);

if (!foo.value) {
  foo.value = true; // error here
}

@yyx990803 yyx990803 merged commit 0bdd889 into vuejs:master Apr 22, 2020
@pikax pikax deleted the types/fix-boolean-types branch April 22, 2020 15:57
pikax added a commit to pikax/vue-next that referenced this pull request Apr 29, 2020
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