https://linear.app/comm/issue/ENG-10205/update-flow-to-02691
v0.239.0: Calling shift() and pop() on an Array<T> will now return T | undefined
Depends on D15033
Flow
Rebase
It could as well be an invariant, because in the while condition we're checking the length. But keeping as is is also ok.
Shouldn't we throw here?
Rebase & review changes