PaginateReturn type
Helper type to infer the Type of the paged elements from the response type
This type is generated based on the swagger information for x-ms-pageable
specifically on the itemName property which indicates the property of the response
where the page items are found. The default value is value
.
This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
type PaginateReturn<TResult> = TResult extends { body: { value?: TPage } }
? GetArrayType<TPage>
: unknown[]
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for JavaScript