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

feat(computed): add readonly flag if no setter is provided #1654

Merged

Conversation

pikax
Copy link
Member

@pikax pikax commented Jul 20, 2020

if computed has no setter isReadonly returns true

    const x = computed(() => 1)
    expect(isReadonly(x)).toBe(true)
    expect(isReadonly(x.value)).toBe(false)

@yyx990803 yyx990803 merged commit dabdc5e into vuejs:master Jul 20, 2020
@pikax pikax deleted the feat/treat_computed_as_shallowReadonly branch July 21, 2020 07:55
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