Skip to content

OmitByType

Category
Generate Object
Alias
OmitByValue

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

Usage

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