mirror of
https://github.com/type-challenges/type-challenges.git
synced 2026-01-25 14:47:17 +00:00
23 lines
469 B
TypeScript
23 lines
469 B
TypeScript
import type { Equal, Expect } from '@type-challenges/utils'
|
|
|
|
type Foo = {
|
|
name: string
|
|
age: string
|
|
}
|
|
type Bar = {
|
|
name: string
|
|
age: string
|
|
gender: number
|
|
}
|
|
type Coo = {
|
|
name: string
|
|
gender: number
|
|
}
|
|
|
|
type cases = [
|
|
Expect<Equal<Diff<Foo, Bar>, { gender: number }>>,
|
|
Expect<Equal<Diff<Bar, Foo>, { gender: number }>>,
|
|
Expect<Equal<Diff<Foo, Coo>, { age: string; gender: number }>>,
|
|
Expect<Equal<Diff<Coo, Foo>, { age: string; gender: number }>>,
|
|
]
|