Remove some any-types
This commit is contained in:
parent
00a5712427
commit
5a4b8143b2
@ -29,7 +29,7 @@ const RELOAD_TIMEOUT = 10 * 1000;
|
||||
export class Manager extends EventEmitter {
|
||||
private items: Download[];
|
||||
|
||||
private active: boolean;
|
||||
public active: boolean;
|
||||
|
||||
private notifiedFinished: boolean;
|
||||
|
||||
@ -361,6 +361,10 @@ export class Manager extends EventEmitter {
|
||||
}
|
||||
this.emit("active", this.active);
|
||||
}
|
||||
|
||||
getMsgItems() {
|
||||
return this.items.map(e => e.toMsg());
|
||||
}
|
||||
}
|
||||
|
||||
let inited: Promise<Manager>;
|
||||
|
@ -5,6 +5,10 @@ import { donate, openPrefs } from "../windowutils";
|
||||
import { API } from "../api";
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { BaseDownload } from "./basedownload";
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { Manager } from "./man";
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { Port } from "../bus";
|
||||
|
||||
type SID = {sid: number};
|
||||
type SIDS = {
|
||||
@ -13,9 +17,9 @@ type SIDS = {
|
||||
};
|
||||
|
||||
export class ManagerPort {
|
||||
private manager: any;
|
||||
private manager: Manager;
|
||||
|
||||
private port: any;
|
||||
private port: Port;
|
||||
|
||||
constructor(manager: any, port: any) {
|
||||
this.manager = manager;
|
||||
@ -79,7 +83,6 @@ export class ManagerPort {
|
||||
}
|
||||
|
||||
sendAll() {
|
||||
this.port.post(
|
||||
"all", this.manager.items.map((e: BaseDownload) => e.toMsg()));
|
||||
this.port.post("all", this.manager.getMsgItems());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user