1 | import Version, { Status, Row } from './version.js';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export type JSONResult = {
|
9 | [status in Status]?: Array<string>;
|
10 | } & {
|
11 | success: boolean;
|
12 | };
|
13 |
|
14 | export declare class Versions {
|
15 |
|
16 | listeners: Array<Function>;
|
17 |
|
18 | array: Array<Version>;
|
19 |
|
20 | constructor(versions: Array<string | number>, listeners?: Array<Function>);
|
21 | /** The comparator to use for sorting an array of versions. */
|
22 | static comparator(left: Version, right: Version): 1 | -1 | 0;
|
23 | /** Add version(s) to the list. */
|
24 | add(versions: Array<string | number> | string | number): this;
|
25 | /** Get version(s) from the list. */
|
26 | get(version: string): Version | null;
|
27 | /** Sort our versions by our comparator. */
|
28 | sort(): this;
|
29 | /** Compact versions that share the same exact version number together. */
|
30 | compact(): this;
|
31 | /** Unless every version of ours was successful, then this will be `false`. */
|
32 | get success(): boolean;
|
33 | /** Get how many versions we have. */
|
34 | get length(): number;
|
35 | /** Get the results of our versions as a JSON object. */
|
36 | get json(): JSONResult;
|
37 | /** An array of {@link Version.row} results for use of displaying our status as a neat table. */
|
38 | get table(): Array<Row>;
|
39 |
|
40 | get messages(): Array<string>;
|
41 |
|
42 | load(compact?: boolean): Promise<this>;
|
43 |
|
44 | install(): Promise<this>;
|
45 |
|
46 | test(command: string, serial?: boolean): Promise<this>;
|
47 | }
|
48 | export default Versions;
|
49 |
|
\ | No newline at end of file |