Subscribe on changes!

Set wrapped with Ref Ractive, there will be type problems with the has add ... method.

avatar
Dec 5th 2023

This is expected, we either have unwrapped or the original types on collections, to better reflect the code at runtime the #8960 is correct.

for (const c of a.value) {
  console.log('ref has', a.value.has(ref(o).value), a.value.has(ref(c).value));
}

for (const c of b) {
  console.log('reactive has', b.has(ref(o).value), b.has(ref(c).value));
}

if you wrap them into ref they will still log true true.

I don't think this issue should be fixed ATM and should wait for https://github.com/microsoft/TypeScript/issues/43826 to do a revamp on get/set

avatar
Dec 5th 2023

Thank you for your answer.