Skip to content

Commit 07fe4c8

Browse files
authored
Merge pull request #164 from unsplash/fix/get-random-response-type
Correct `getRandom` response type
2 parents 2021d1e + 3306f13 commit 07fe4c8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/methods/photos/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export const getRandom = {
6666
},
6767
}),
6868
),
69-
handleResponse: castResponse<Photo.Random>(),
69+
handleResponse: castResponse<
70+
// An array when the `count` query parameter is used.
71+
Photo.Random | Photo.Random[]
72+
>(),
7073
};
7174

7275
export const trackDownload = {

0 commit comments

Comments
 (0)