-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
DocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScript
Description
Search Terms
predefined, document, partial
Suggestion
TypeScript provides several predefined types that can be very useful, such as Partial<T>, Required<T>, etc.
It might be a good idea to have a separate page in the documentation that lists all of them.
Use Cases
These types are currently not very easily discoverable for new users.
A few are mentioned in the documentation under more generic topics and new ones are mentioned in "What's new in this version" posts.
They can be looked up in the declaration files, but a lot of future users likely won't know to go looking for them and will end up reinventing the wheel.
Examples
Flow documentation has a page like this called Utility Types
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript / JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. new expression-level syntax)
lazarljubenovic, qcz, Ghabriel, agentcooper, NN--- and 9 more
Metadata
Metadata
Assignees
Labels
DocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScript