|
@@ -102,7 +102,10 @@ export type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperatio
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
export const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {
|
|
export const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {
|
|
|
- return pageInfo != null;
|
|
|
|
|
|
|
+ return pageInfo != null && pageInfo instanceof Object
|
|
|
|
|
+ && ('commentCount' in pageInfo)
|
|
|
|
|
+ && ('bookmarkCount' in pageInfo)
|
|
|
|
|
+ && ('descendantCount' in pageInfo);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|