I have a situation where the generic type is constraint by a union type, but I find that doing this does not make the type narrowing to work as expected. The code snippet be