You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
Great idea 👍 -- I opened an issue (microsoft/TypeScript-Handbook#798) in the Handbook repo to track this effort (assuming we want to track this issue in the same repo that the PR will be submitted to)
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:
The text was updated successfully, but these errors were encountered: