basarat / basarat/typescript-book

Example of "All members must conform to the string index signature" looks wrong to me

Open
#646 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
21.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

https://basarat.gitbook.io/typescript/type-system/index-signatures#all-members-must-conform-to-the-string-index-signature

```
/** Error */
interface Bar {
x: number;
y: string; // ERROR: Property `y` must be of type number
}
```

Actually this example is not error

Contributor guide

Open the contributing guide

Research direction

Open the linked TypeScript Book section, “All members must conform to the string index signature,” and verify the reported interface example against TypeScript’s behavior. Update the example or explanation so it accurately reflects whether the mixed property types produce an error, then confirm the rendered section is correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.