TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

Provide more understandable example for string indexers

Open hdodov opened this issue 6 years ago • 0 comments

There was a misunderstanding about string indexers on Stack Overflow.

The docs should compare obj.property with obj[someValue] instead of obj["property"] to better illustrate why property types should match the indexer return type.

Please, take a look at the question linked above and the answer for more information.

hdodov avatar Oct 01 '19 14:10 hdodov