Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 577 Bytes

pick-by-type-fuzzy.md

File metadata and controls

27 lines (20 loc) · 577 Bytes
category alias
Generate Object
PickByValueFuzzy

PickByTypeFuzzy

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

Usage

import type { PickByTypeFuzzy } from '@utype/core'

type Props = {
  foo: number;
  bar?: number;
  faz: boolean;
}

// Expect: { bar?: number; }
type PickByTypeFuzzyProps1 = PickByTypeFuzzy<Props, undefined>
// Expect: { bar?: number; faz: boolean; }
type PickByTypeFuzzyProps2 = PickByTypeFuzzy<Props, boolean | undefined>