Skip to content

Handbook should recommend using a user-defined homomorphic Omit #54451

Open
@RyanCavanaugh

Description

@RyanCavanaugh

Bug Report

Per #53188, we know that it'd be better if Omit were homomorphic. In the Handbook we should steer people toward a better user definition, e.g.

type MappedOmit<T, K extends keyof T> = { [P in keyof T as P extends K ? never : P]: T[P] };

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThe issue relates to how you learn TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions