Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 430 Bytes

intersection.md

File metadata and controls

21 lines (14 loc) · 430 Bytes
category
Generate Object

Intersection

From T pick properties that exist in U.

Usage

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

type Props = { name: string; age: number; visible: boolean }
type DefaultProps = { age: number; sex: string }

// Expect: { age: number; } // [!code highlight]
type IntersectionProps = Intersection<Props, DefaultProps>