enhance: add test cases to 2793-medium-mutable (#9459)

This commit is contained in:
N. Bighetti 2022-04-28 18:32:06 +08:00 committed by GitHub
parent 3b25f515f8
commit b82e5634f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>,
]