-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Open
Labels
🍰 p2-nice-to-havePriority 2: this is not breaking anything but nice to have it addressed.Priority 2: this is not breaking anything but nice to have it addressed.scope: types
Description
Version
3.2.26
Reproduction link
Steps to reproduce
const shouldHaveComputedRef = toRefs(readonly(reactive({ foo: 'foo' })))
// runtime warning, no TS error
shouldHaveComputedRef.foo = 'bar'
const shouldHaveReadonly = reactive({ foo: computed(() => 'foo') })
// runtime warning, no TS error
shouldHaveReadonly.foo = 'bar'
What is expected?
toRefs
/reactive
return types should include correct readonly/ComputedRef types.
What is actually happening?
toRefs
/reactive
return types always result in settable property types, even though attempting to set them produces a warning and fails
scscgit, roydukkey, schmop, rafasoares, dixslyf and 1 more
Metadata
Metadata
Assignees
Labels
🍰 p2-nice-to-havePriority 2: this is not breaking anything but nice to have it addressed.Priority 2: this is not breaking anything but nice to have it addressed.scope: types