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.

Document Utility Types (Predefined types)  #798

@csantos42

Description

@csantos42

Opening this issue in response to microsoft/TypeScript#24558.

I am currently working on a PR to add a new page to the Handbook titled Utility Types (open to suggestions on the title & location of this documentation).

Note that Utility Types is a natural name for these utilities as it's the name adopted by Flow, and more importantly, it's the terminology originally used in the release notes for TS 2.1 to describe several of these utilities.

This PR will document the utility types below:

  • Partial<T>
  • Readonly<T>
  • Record<K, T>
  • Pick<T, K>
  • Exclude<T, U>
  • Extract<T, U>
  • NonNullable<T>
  • ReturnType<T>
  • InstanceType<T>
  • Required<T>
  • ThisType<T> (would resolve Document ThisType<T> #649)

Feedback appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions