Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 436 Bytes

diff.md

File metadata and controls

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

Diff

Get the types that are not common in both T and U.

Usage

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

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

// Expect: { name: string; visible: boolean; sex: string } // [!code highlight]
type DiffProp = Diff<Prop, DefaultProps>