mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
19 lines
382 B
TypeScript
19 lines
382 B
TypeScript
import { Equal, Expect } from '@type-challenges/utils'
|
|
|
|
type cases = [
|
|
Expect<Equal<MyReadonly2<Todo1>, Readonly<Todo1>>>,
|
|
Expect<Equal<MyReadonly2<Todo1, 'title' | 'description'>, Expected>>,
|
|
]
|
|
|
|
interface Todo1 {
|
|
title: string
|
|
description?: string
|
|
completed: boolean
|
|
}
|
|
|
|
interface Expected {
|
|
readonly title: string
|
|
readonly description?: string
|
|
completed: boolean
|
|
}
|