Skip to content

Intersection

Category
Generate Object

From T pick properties that exist in U.

Usage

ts
import type { 
Intersection
} from '@utype/core'
type
Props
= {
name
: string;
age
: number;
visible
: boolean }
type
DefaultProps
= {
age
: number;
sex
: string }
// Expect: { age: number; } type
IntersectionProps
=
Intersection
<
Props
,
DefaultProps
>