1#  Indexed signatures are not supported
2
3Rule ``arkts-no-indexed-signatures``
4
5**Severity: error**
6
7ArkTS does not allow indexed signatures. Use arrays instead.
8
9
10## TypeScript
11
12
13```
14
15    // Interface with an indexed signature:
16    interface StringArray {
17        [index: number]: string
18    }
19
20    function getStringArray() : StringArray {
21        return ["a", "b", "c"]
22    }
23
24    const myArray: StringArray = getStringArray()
25    const secondItem = myArray[1]
26
27```
28
29## ArkTS
30
31
32```
33
34    class X {
35        public f: string[] = []
36    }
37
38    let myArray: X = new X()
39    const secondItem = myArray.f[1]
40
41```
42
43
44