I would like to create a generic typescript type that omits any key-value pair from an input type where the value is of type unknown:
interface Foo {
foo: string;
bar: number;
bla: unknown;
baz: boolean;
}
type T = OmitUnknowns<Foo>;
// should be { foo: string; bar: number; baz: boolean; }
Is this possible? I'm struggling to figure it out because it seems like everything extends unknown
in typescript...