It's not clear why Rust got confused.
https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...
It's not clear why Rust got confused.