@@ -33,7 +33,8 @@ type SearchPhotosParams = SearchParams &
3333export const getPhotos = ( ( ) => {
3434 const getPathname = ( ) => `${ SEARCH_PATH_PREFIX } /photos` ;
3535 return makeEndpoint ( {
36- getPathname,
36+ // Wrapper uses type trick to allow 0 args
37+ getPathname : ( _params ?: void ) => getPathname ( ) ,
3738 handleRequest : createRequestHandler (
3839 ( {
3940 query,
@@ -64,7 +65,8 @@ export const getPhotos = (() => {
6465export const getCollections = ( ( ) => {
6566 const getPathname = ( ) => `${ SEARCH_PATH_PREFIX } /collections` ;
6667 return makeEndpoint ( {
67- getPathname,
68+ // Wrapper uses type trick to allow 0 args
69+ getPathname : ( _params ?: void ) => getPathname ( ) ,
6870 handleRequest : createRequestHandler ( ( { query, ...paginationParams } : SearchParams ) => ( {
6971 pathname : getPathname ( ) ,
7072 query : { query, ...Query . getFeedParams ( paginationParams ) } ,
@@ -76,7 +78,8 @@ export const getCollections = (() => {
7678export const getUsers = ( ( ) => {
7779 const getPathname = ( ) => `${ SEARCH_PATH_PREFIX } /users` ;
7880 return makeEndpoint ( {
79- getPathname,
81+ // Wrapper uses type trick to allow 0 args
82+ getPathname : ( _params ?: void ) => getPathname ( ) ,
8083 handleRequest : createRequestHandler ( ( { query, ...paginationParams } : SearchParams ) => ( {
8184 pathname : getPathname ( ) ,
8285 query : { query, ...Query . getFeedParams ( paginationParams ) } ,
0 commit comments