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 1200+ tech skills courses.