Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 579 Bytes

pick-by-type-exact.md

File metadata and controls

27 lines (20 loc) · 579 Bytes
category alias
Generate Object
PickByValueExact

PickByTypeExact

From T pick a set of properties by value matching exact ValueType.

Usage

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>