-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCuMultiThreadHash.d.ts
More file actions
69 lines (64 loc) · 1.71 KB
/
CuMultiThreadHash.d.ts
File metadata and controls
69 lines (64 loc) · 1.71 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
interface Date {
/**
* turns timestamp to ISO like "20210119-182416" format
*/
formatAsDateTimeCompact(): string;
}
interface Number {
/**
* turns 2^10 to "KB", 2^20 to "MB" and so on
*/
getUnit(): Array<string, number>;
/**
* turns 2^10 to "1.0 KB", 2^20 to "1.0 MB" and so on
* @param unit custom unit
* @param decimal how many decimals
*/
formatAsSize(unit?: Array<string, number>, decimal?: number): string;
/**
* turns milliseconds to rounded seconds
*/
formatAsDuration(): string;
/**
* converts timestamps to time format
*/
formatAsHms(): string;
/**
* turns timestamp to ISO "2021-01-19T18:24:16.123Z" format
*/
formatAsDateISO(): string;
/**
* turns timestamp to ISO like "20210119-182416" format
*/
formatAsDateTimeCompact(): string;
/**
* turns timestamp to DOpus "D2021-01-19 T18:24:16" format
*/
formatAsDateDOpus(): string;
}
interface String {
/**
* makes sure that the paths always have a trailing backslash but no doubles
* this happens mainly because the oItem.path does not return a trailing slash for any directory
* other than root dir of a drive, i.e. it returns Y:\Subdir (no BS) but Y:\ (with BS)
*/
normalizeTrailingBackslashes(): string;
/**
* substitutes variables - Only Global ones - in the given string
* e.g.
* my name is: ${Global.SCRIPT_NAME}
*/
substituteVars(): string;
/**
* parses string as number in base 10
* e.g.
* cmdData.func.args.MAXCOUNT.asInt()
*/
asInt(): number;
}
interface Result<T, E> {
ok: T;
err: E;
stack: array;
new <T, E>(oOKValue: T, oErrValue: E): Result;
}