Closed Skn0tt closed 4 years ago
Turns out: TSC compiles [...map.entries()]
to [].concat(map.entries())
, which is less than equivalent:
> [...map.entries()]
[ [ 1, 2 ] ]
> [].concat(map.entries())
[ [Map Entries] { [ 1, 2 ] } ]
This behaviour is enabled with the downLevelIteration: true
compiler flag. Will turn off and adapt our code. PR incoming.
Apparently, our code behaves differently in production code than in our tests.
Some snippets that don't work as intended: