mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-16 03:06:16 +00:00
refactor: adjust type to new requirements
This commit is contained in:
@@ -68,11 +68,10 @@ export function isSearchResponse(something: any): something is SCSearchResponse
|
||||
/**
|
||||
* Type guard to check if something is a multi search response
|
||||
*
|
||||
*
|
||||
* @param something Something to check
|
||||
*/
|
||||
export function isMultiSearchResponse(something: any): something is SCMultiSearchResponse {
|
||||
return Object.keys(something).reduce((previousOnesAreSearchResponses, key) => {
|
||||
return previousOnesAreSearchResponses && isSearchResponse(something[key]);
|
||||
}, true);
|
||||
}, true as boolean);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user