microsoft / microsoft/TypeScript-Website

Is `Omit<Type, symbol>` valid?

Open
#2,937 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.6k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
7

Description

Omit<Type, symbol> seems to be a valid synonym for { [K in Exclude<keyof Type, symbol>]: Type[K] } in versions at least back to 4.5.5 (TypeScript Playground with JSDoc support), but Omit<Type, Keys> documents Keys as "string literal or union of string literals".

Is ignoring e.g. symbol keys an oversight that is intended to work, or is it intentional and only coincidentally supported at the moment?

Contributor guide

No contributing guide indexed for this repository

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 with the Utility Types documentation for Omit and the linked TypeScript Playground example. Check whether symbol keys are intentionally supported across the referenced TypeScript versions, then clarify the documented Keys restriction or the expected behavior. Done means the documentation accurately resolves whether Omit<Type, symbol> is supported.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.