How do I have to implement a type GetRidOfNeverValues<T>
that removes all entries of an object type (let's say: Record<string, any>
) where the value is never?
For example
type A = {
a: number;
b: string;
c: never;
};
type B = GetRidOfNeverValues<A>;
/*
type B shoud now be:
{
a: number;
b: string;
}
*/