mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
refactor: update all
This commit is contained in:
committed by
Rainer Killinger
parent
bdaa1f0201
commit
3b0014abac
@@ -54,7 +54,7 @@ export function isThing(something: unknown): something is SCThing {
|
||||
export function isThingWithTranslations(
|
||||
thing: SCThingWithoutReferences,
|
||||
): thing is SCThingWithoutReferences & {translations: SCTranslations<SCThingTranslatableProperties>} {
|
||||
return typeof thing.translations !== 'undefined';
|
||||
return thing.translations !== undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,11 +108,11 @@ export function isSearchResponse(something: unknown): something is SCSearchRespo
|
||||
return (
|
||||
Array.isArray(somethingObject.data) &&
|
||||
Array.isArray(somethingObject.facets) &&
|
||||
typeof somethingObject.pagination !== 'undefined' &&
|
||||
somethingObject.pagination !== undefined &&
|
||||
typeof somethingObject.pagination.count === 'number' &&
|
||||
typeof somethingObject.pagination.offset === 'number' &&
|
||||
typeof somethingObject.pagination.total === 'number' &&
|
||||
typeof somethingObject.stats !== 'undefined' &&
|
||||
somethingObject.stats !== undefined &&
|
||||
typeof somethingObject.stats.time === 'number'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user