Proposal: ArrayValue
type
#49060
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Suggestion
An idea for TypeScript
Suggestion
π Search Terms
array type
array value
array value type
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
An utility type to obtain an array's items type.
π Motivating Example
TS 4.5 introduced the
Awaited
utility type for promises. This proposals adds an utility type with similar syntax for arrays.π» Use Cases
When building components for a list UI and need to use some API generated types (e.g. GraphQL generated types):
Current workaround: using
Foo[number]
, but it's less readable.The text was updated successfully, but these errors were encountered: