refactor: adjust type to new requirements

This commit is contained in:
Karl-Philipp Wulfert
2019-04-02 15:47:20 +02:00
parent a97805172c
commit 75e833d841

View File

@@ -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);
}