Members of the Same Type
This lesson explains how to have members in a type defined with an index signature.
Same type
The interface defined by members and an index type that uses a string as the key must have all its members to be of type string.
πNote: the code below throws an error β
Get hands-on with 1300+ tech skills courses.