basarat / basarat/typescript-book

Mention how to extend (most) any type

Open
#311 1 comment 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

I had an "aha moment" when I read https://github.com/Microsoft/TypeScript/issues/16985#issuecomment-318833845

I think it would be great to explain somewhere that if you want to extend a literal interface, just give it a name. I don't see a good place for this tip; otherwise, I'd draft a PR.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked TypeScript issue comment and locating the book section that discusses extending literal interfaces. Add a concise explanation that naming a literal interface makes it extendable, with the wording placed where readers will find this guidance.】【。

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.