Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Misstatement in definition of Partial<T>  #1308

@vassudanagunta

Description

@vassudanagunta

The definition of Partial<T> states:

Constructs a type with all properties of T set to optional. This utility will return a type that represents all subsets of a given type.

To paraphrase Inigo Montoya: You use the word "subset". I do not think it means what you think it means.

A "type with all properties of T set to optional" does not represent subsets of T.

Examples of "subsets of a given type":

  • given type: real number, some subsets: rational number, integer
  • given type: number | string | null, some subsets: number, number | null

I know what the author is trying to say, but can't come up with the right words, though I probably should have spent more time on that than what I've put into this Issue so far 😂.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions