Type Challenges Judge

Readonly

提出詳細

type MyReadonly<T> = { readonly [k in keyof T]: T[k] }
提出日時2024-05-02 03:46:04
問題Readonly
ユーザーktny
ステータスAccepted
テストケース
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<MyReadonly<Todo1>, Readonly<Todo1>>>, ] interface Todo1 { title: string description: string completed: boolean meta: { author: string } }