Incorrect type inference with discriminated unions. - tRPC