Skip to content

Commit c105086

Browse files
author
Orta Therox
authored
Merge pull request #2213 from sajadhsm/patch-2
Fix code tags inside details tag
2 parents 2607549 + ed04da9 commit c105086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/documentation/copy/en/handbook-v2/Object Types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ An index signature property type must be either 'string' or 'number'.
274274

275275
<details>
276276
<summary>It is possible to support both types of indexers...</summary>
277-
<p>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.</p>
277+
<p>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 <code>number</code>, JavaScript will actually convert that to a <code>string</code> before indexing into an object. That means that indexing with <code>100</code> (a <code>number</code>) is the same thing as indexing with <code>"100"</code> (a <code>string</code>), so the two need to be consistent.</p>
278278

279279
```ts twoslash
280280
// @errors: 2413

0 commit comments

Comments
 (0)