Closed 0kku closed 3 years ago
LGTM, merged 😄
I was looking over the method, and realized ReactiveArray::flat()
was poorly implemented, and decided to remove it entirely for now. So, upgrading to a newer version of TS should be fine now. I'll implement the method (properly this time) once the compiler bug is resolved.
The issue with the old implementation was, that it didn't take into account that nested arrays are now implicitly made reactive recursively, which wasn't the case when it was first implemented (who would've thought that writing some tests for this lib might be useful? 🤦♂️). This change means that implementing ReactiveArray::flat()
and ReactiveArray::flatMap()
might be a little tricky. But I won't investigate it until MS fixes their compiler.
Building project fails on TypeScript 3.9 and up. Culprit is ReactiveArray#flat().
Workaround (courtesy of @b-fuze):
Let's keep using 3.8 for now, but resort to using the workaround if we need features from newer versions of TS before the compiler bug is fixed.
Depends on https://github.com/microsoft/TypeScript/issues/38298