category | alias |
---|---|
Generate Object |
PickByValueExact |
From T pick a set of properties by value matching exact ValueType.
import type { PickByTypeExact } from '@utype/core'
type Props = {
foo: number;
bar: number | undefined;
faz: string;
}
// Expect: { foo: number; }
type PickByTypeExactProps1 = PickByTypeExact<Props, number>
// Expect: { bar: number | undefined; }
type PickByTypeExactProps2 = PickByTypeExact<Props, number | undefined>