@watsonserve/stock-base 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dao.js +1 -3
- package/package.json +1 -1
- package/types/dao.d.ts +2 -1
package/dao.js
CHANGED
|
@@ -136,9 +136,7 @@ export class InfluxDAO {
|
|
|
136
136
|
list.unshift({ time: new Date(_time), nc, currency, [_field]: _value });
|
|
137
137
|
},
|
|
138
138
|
error: reject,
|
|
139
|
-
complete: () =>
|
|
140
|
-
resolve(groupBy('nc', list, true));
|
|
141
|
-
},
|
|
139
|
+
complete: () => resolve(Object.entries(groupBy('nc', list, true))),
|
|
142
140
|
});
|
|
143
141
|
});
|
|
144
142
|
}
|
package/package.json
CHANGED
package/types/dao.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ interface IFxData {
|
|
|
14
14
|
}
|
|
15
15
|
interface IStData {
|
|
16
16
|
time: string;
|
|
17
|
+
nc: string;
|
|
17
18
|
c: number;
|
|
18
19
|
v: number;
|
|
19
20
|
}
|
|
@@ -31,6 +32,6 @@ export declare class InfluxDAO {
|
|
|
31
32
|
private __query;
|
|
32
33
|
readFxLatest(): Promise<IFxData>;
|
|
33
34
|
readStockLatest(ncs: string[]): Promise<IStData[]>;
|
|
34
|
-
readDividend(ncs: string[]): Promise<
|
|
35
|
+
readDividend(ncs: string[]): Promise<[string, any[]][]>;
|
|
35
36
|
}
|
|
36
37
|
export {};
|