getRandom is always cast to Photo.Random but can return an array
LiamMartens opened this issue · 1 comments
LiamMartens commented
As per API spec - the random photo endpoint will return an array when passing count
as a parameter.
This behavior is not reflected in TypeScript as the response is always Photo.Random
regardless of parameters.
Ideally - the response would be Photo.Random[]
when passing count
, but it could also be updated to return either and leave it up to the developer to check the response type.