mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 14:32:50 +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
|
* Type guard to check if something is a multi search response
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param something Something to check
|
* @param something Something to check
|
||||||
*/
|
*/
|
||||||
export function isMultiSearchResponse(something: any): something is SCMultiSearchResponse {
|
export function isMultiSearchResponse(something: any): something is SCMultiSearchResponse {
|
||||||
return Object.keys(something).reduce((previousOnesAreSearchResponses, key) => {
|
return Object.keys(something).reduce((previousOnesAreSearchResponses, key) => {
|
||||||
return previousOnesAreSearchResponses && isSearchResponse(something[key]);
|
return previousOnesAreSearchResponses && isSearchResponse(something[key]);
|
||||||
}, true);
|
}, true as boolean);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user