Index Signatures
In TypeScript we can use as index signature string
, number
, and symbol
:
Please note that JavaScript automatically converts an index with number
to an index with string
so k[1]
or k["1"]
return the same value.
In TypeScript we can use as index signature string
, number
, and symbol
:
Please note that JavaScript automatically converts an index with number
to an index with string
so k[1]
or k["1"]
return the same value.