diff --git a/packages/documentation/copy/en/handbook-v2/Object Types.md b/packages/documentation/copy/en/handbook-v2/Object Types.md index 091ba8e6002c..682b179c52a2 100644 --- a/packages/documentation/copy/en/handbook-v2/Object Types.md +++ b/packages/documentation/copy/en/handbook-v2/Object Types.md @@ -274,8 +274,8 @@ This index signature states that when a `StringArray` is indexed with a `number` Only some types are allowed for index signature properties: `string`, `number`, `symbol`, template string patterns, and union types consisting only of these.
- It is possible to support both types of indexers... -

It is possible to support both types of indexers, but the type returned from a numeric indexer must be a subtype of the type returned from the string indexer. This is because when indexing with a number, JavaScript will actually convert that to a string before indexing into an object. That means that indexing with 100 (a number) is the same thing as indexing with "100" (a string), so the two need to be consistent.

+ It is possible to support multiple types of indexers... +

It is possible to support multiple types of indexers. Note that when using both `number` and `string` indexers, the type returned from a numeric indexer must be a subtype of the type returned from the string indexer. This is because when indexing with a number, JavaScript will actually convert that to a string before indexing into an object. That means that indexing with 100 (a number) is the same thing as indexing with "100" (a string), so the two need to be consistent.

```ts twoslash // @errors: 2413