-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype-def.js
39 lines (36 loc) · 1.02 KB
/
type-def.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
/**
* @typedef {object} GlobalStat Global statistics.
* @property {number} uploadSpeed The total upload speed, in Mbps.
* @property {number} downloadSpeed The total download speed, in Mbps.
*/
export const GlobalStat = {
uploadSpeed: null,
downloadSpeed: null
};
/**
* @typedef {object} TaskFile A file in a download task.
* @property {string} path File path.
* @property {boolean} isSelected Whether the file is being downloaded or not.
*/
export const TaskFile = {
path: null,
isSelected: null
};
/**
* @typedef {object} Task Download task.
* @property {string} gid Download task ID.
* @property {number} uploadSpeed Upload speed, in Mbps.
* @property {number} downloadSpeed Download speed, in Mbps.
* @property {number} progress Download progress, in percentage.
* @property {TaskFile[]} files Files in the download task.
* @property {string} status Task status.
*/
export const Task = {
gid: null,
uploadSpeed: null,
downloadSpeed: null,
progress: null,
files: null,
status: null
};