mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
22 lines
371 B
TypeScript
22 lines
371 B
TypeScript
import { Equal, Expect } from '@type-challenges/utils'
|
|
|
|
type cases = [
|
|
Expect<Equal<Expected1, MyPick<Todo, 'title'>>>,
|
|
Expect<Equal<Expected2, MyPick<Todo, 'title' | 'completed'>>>,
|
|
]
|
|
|
|
interface Todo {
|
|
title: string
|
|
description: string
|
|
completed: boolean
|
|
}
|
|
|
|
interface Expected1 {
|
|
title: string
|
|
}
|
|
|
|
interface Expected2 {
|
|
title: string
|
|
completed: boolean
|
|
}
|