microsoft / microsoft/TypeScript

feat: support generic type name: `Record<name: string, value: string>`

Open
#57,001 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

🔍 Search Terms

generic type name

✅ Viability Checklist
⭐ Suggestion

support Record<name: string, value: string>

📃 Motivating Example

Without Reocrd, we can write:

interface Obj {
  [name: string]: string
}

Although value: string is still missing here, we have name info, but we can't archive same thing via Record util.

💻 Use Cases
  1. What do you want to use this for?

All generic types

  1. What shortcomings exist with current approaches?

I don't see any downsides

  1. What workarounds are you using in the meantime?

No type name

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

Start by comparing the proposed Record<name: string, value: string> syntax with the motivating interface index signature and the existing Record utility type. Done means the intended generic type-name behavior is specified clearly enough to assess its type-checking impact; the issue names no files or tests to run.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.