microsoft / microsoft/TypeScript

Allow extending types referenced through interfaces

Open
#31,843 12 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Has Repro In Discussion Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Suggestion

Allow things like the following:

interface I extends HTMLElementTagNameMap['abbr'] {}

Currently, the following error message is given: "An interface can only extend an identifier/qualified-name with optional type arguments." Which I don't even understand.

I believe it requires no further clarification or justification, but please let me know if that is the case...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test entry point is named. Start by tracing the compiler diagnostic for an interface heritage clause using the provided HTMLElementTagNameMap example, then add focused coverage for the accepted syntax and its type-checking behavior; done means the example compiles without the current diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.