Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 551 Bytes

omit-by-type.md

File metadata and controls

27 lines (20 loc) · 551 Bytes
category alias
Generate Object
OmitByValue

OmitByType

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

Usage

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

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

// Expect: { bar: number | undefined; faz: boolean; }
type OmitByTypeProps1 = OmitByType<Props, number>
// Expect: { faz: boolean; }
type OmitByTypeProps2 = OmitByType<Props, number | undefined>