Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 575 Bytes

omit-by-type-fuzzy.md

File metadata and controls

27 lines (20 loc) · 575 Bytes
category alias
Generate Object
OmitByValueFuzzy

OmitByTypeFuzzy

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

Usage

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

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

// Expect: { foo: number; faz: boolean }
type OmitByTypeFuzzyProps1 = OmitByTypeFuzzy<Props, undefined>
// Expect: { foo: number }
type OmitByTypeFuzzyProps2 = OmitByTypeFuzzy<Props, boolean | undefined>