Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/types/api/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@ export interface TClusterInfoV2 extends TClusterInfoV1 {
};
StorageStats?: TStorageStats[];
Version?: number;
/** value is uint64 */
CoresUsed?: string;
}

export type TClusterInfo = TClusterInfoV1 | TClusterInfoV2;

export function isClusterInfoV2(info?: TClusterInfo): info is TClusterInfoV2 {
return info ? 'Version' in info && info.Version === 2 : false;
return info
? 'Version' in info && typeof info.Version === 'number' && info.Version >= 2
: false;
}
Loading