Skip to content

Commit

Permalink
enhance: add test cases to 2793-medium-mutable (type-challenges#9459)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenkirin authored Apr 28, 2022
1 parent 3b25f51 commit b82e563
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions questions/02793-medium-mutable/test-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ interface Todo1 {
}
}

type List = [1, 2, 3]

type cases = [
Expect<Equal<Mutable<Readonly<Todo1>>, Todo1>>,
Expect<Equal<Mutable<Readonly<List>>, List>>,
]

type errors = [
// @ts-expect-error
Mutable<'string'>,
// @ts-expect-error
Mutable<0>,
]

0 comments on commit b82e563

Please sign in to comment.