mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Add typing for serialized collector type
Setup TypeScript tyings and JSON schema for serializeResult and deserializeResult and use these in the metrics related requests.
This commit is contained in:
1 parent
b66138587b
commit
b78ca31b09
7 files changed
+46
-26
No files matched your search
@@ -542,7 +542,7 @@ export default class Host extends lib.Link {
|
||||
}
|
||||
|
||||
async handleHostMetricsRequest() {
|
||||
let requests = [];
|
||||
let requests: Promise<InstanceType<typeof lib.InstanceMetricsRequest["Response"]>>[] = [];
|
||||
for (let instanceConnection of this.instanceConnections.values()) {
|
||||
requests.push(instanceConnection.send(new lib.InstanceMetricsRequest()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user