Skip to content

PickByTypeFuzzy

Category
Generate Object
Alias
PickByValueFuzzy

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

Usage

ts
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>