Skip to content

Diff

Category
Generate Object

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

Usage

ts
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 } type
DiffProp
=
Diff
<
Prop
,
DefaultProps
>