Skip to content

Commit 6dbe56d

Browse files
authored
fix(cluster): infoV2 check (#1401)
1 parent b4f4d72 commit 6dbe56d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/types/api/cluster.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,14 @@ export interface TClusterInfoV2 extends TClusterInfoV1 {
7171
};
7272
StorageStats?: TStorageStats[];
7373
Version?: number;
74+
/** value is uint64 */
75+
CoresUsed?: string;
7476
}
7577

7678
export type TClusterInfo = TClusterInfoV1 | TClusterInfoV2;
7779

7880
export function isClusterInfoV2(info?: TClusterInfo): info is TClusterInfoV2 {
79-
return info ? 'Version' in info && info.Version === 2 : false;
81+
return info
82+
? 'Version' in info && typeof info.Version === 'number' && info.Version >= 2
83+
: false;
8084
}

0 commit comments

Comments
 (0)