Skip to content

PickByRequired

Category
Generate Object
Alias
GetRequired

From T pick all required properties to generate a new object type.

Usage

ts
import type { 
PickByRequired
} from '@utype/core'
type
Props
= {
foo
: number;
bar
?: string;
} // Expect: { foo: number; } type
PickByRequiredProps
=
PickByRequired
<
Props
>