CodeZettaInterview Hub

TypeScript · Interfaces · Mid-Level · Concept

Index signatures — uses and pitfalls?

Short Interview Answer

Allow dynamic keys with a value type; can force all properties to be assignable to that type.

Detailed Explanation

Prefer maps/Records for dictionaries. String indexes interact with declared fields carefully.

Did you know this answer?