I\'ve got such a piece of code:
const f = (b: T): T extends string ? number : string => typeof b === "string" ?