-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
66 lines (66 loc) · 1.96 KB
/
index.d.ts
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
export const xylo
export const xyla
/**
* A data set.
* @class
* @param {any} dataFrame the data frame wrapped by the data set
* @property {object} dataFrame a data frame representation of the set's data
* @memberof module:xylo
* @example
* let dataSet = new xylo.DataSet(goalsDataFrame);
*/
export class DataSet {
constructor(dataFrame: any);
/**
* a data frame representation of the set's data
*/
dataFrame: any;
}
/**
* A data model containing a group of data sets.
* @class
* @property {object<string, DataSet>} dataSets a dictionary of data sets
* @property {Set<string>} pendingDataSetKeys an array of keys for data sets that are in the process of being loaded
* @memberof module:xylo
* @example
* let model = new xylo.Model();
*/
export class Model {
constructor();
/**
* Adds a data set.
* @param {string} key the key under which to store the data set
* @param {DataSet} dataSet a data set
* @returns {Model} the model
* @example
* model.addDataSet('goals', goalsDataSet);
*/
addDataSet(key: string, dataSet: DataSet): Model;
/**
* Retrieves a data set.
* @param {string} key the key under which to store the data set
* @returns {Promise<DataSet>} a data set
* @example
* let goalsDataSet = model.getDataSet('goals');
*/
getDataSet(key: string): Promise<DataSet>;
/**
* Fetches a data set from a URL and adds it to the model.
* @param {string} key the key under which to store the data set
* @param {string} url the URL from which to retrieve the data
* @returns {Model} the model
* @example
* model.fetchDataSet('goals', 'https://example.com/goals.csv');
*/
fetchDataSet(key: string, url: string): Model;
/**
* a dictionary of data sets
*/
dataSets: {
[key: string]: DataSet;
};
/**
* an array of keys for data sets that are in the process of being loaded
*/
pendingDataSetKeys: Set<string>;
}