mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
enhance: improve test case in 01367-medium-remove-index-signature (#12651)
This commit is contained in:
parent
f9d06bb112
commit
d14f44bd38
@ -8,11 +8,13 @@ type Foo = {
|
||||
type Bar = {
|
||||
[key: number]: any
|
||||
bar(): void
|
||||
0: string
|
||||
}
|
||||
|
||||
const foobar = Symbol('foobar')
|
||||
type FooBar = {
|
||||
[key: symbol]: any
|
||||
foobar(): void
|
||||
[foobar](): void
|
||||
}
|
||||
|
||||
type Baz = {
|
||||
@ -22,7 +24,7 @@ type Baz = {
|
||||
|
||||
type cases = [
|
||||
Expect<Equal<RemoveIndexSignature<Foo>, { foo(): void }>>,
|
||||
Expect<Equal<RemoveIndexSignature<Bar>, { bar(): void }>>,
|
||||
Expect<Equal<RemoveIndexSignature<FooBar>, { foobar(): void }>>,
|
||||
Expect<Equal<RemoveIndexSignature<Bar>, { bar(): void; 0: string }>>,
|
||||
Expect<Equal<RemoveIndexSignature<FooBar>, { [foobar](): void }>>,
|
||||
Expect<Equal<RemoveIndexSignature<Baz>, { bar(): void; baz: string }>>,
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user