Can we exclude specific properties from an object using a mapped type based on their value? Similar to the Omit
function, but focusing on the values rather than the keys.
Let's consider the following example:
type Q = {a: number, b: never}
Is there a way to remove property b
because its value is never
?