type OneLevelDeep = {
foo: boolean;
bar?: Numeric;
baz: Nullable;
fooBaz: bigint;
bazFoo: string | boolean;
};
type A = OmitExactlyByType<OneLevelDeep, bigint>
// A results in:
{
foo: boolean;
bar?: Numeric;
baz: Nullable;
bazFoo: string | boolean;
}
type B = OmitExactlyByType<OneLevelDeep, string | boolean>
// B results in
{
foo: boolean;
bar?: Numeric;
baz: Nullable;
fooBaz: bigint;
}
Get a set of properties from
T
whose type exactly matchesP
.