basarat / basarat/typescript-book
Mention how to extend (most) any type
Open
- 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
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