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

Document Utility Types (Predefined types) #798

Closed
11 tasks
csantos42 opened this issue Jul 31, 2018 · 2 comments · Fixed by #801
Closed
11 tasks

Document Utility Types (Predefined types) #798

csantos42 opened this issue Jul 31, 2018 · 2 comments · Fixed by #801

Comments

@csantos42
Copy link
Contributor

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!

@hronro
Copy link

hronro commented Oct 14, 2018

Hi @chrissantos1995 @RyanCavanaugh
I notice although the PR is merged, I can't find the utility types docs in typescript homepage in anywhere. But actually that docs can be opened by manually typed url "https://www.typescriptlang.org/docs/handbook/utility-types.html".
I guess something is missing in the static site builder config?

@karlhorky
Copy link
Contributor

@foisonocean the side navigation has been updated as of microsoft/TypeScript-Website#1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants