Add types for regression library

This commit is contained in:
2019-10-07 20:01:46 -04:00
parent f740ab06b9
commit 130bd18ae6
3 changed files with 8 additions and 2 deletions

View File

@@ -1955,6 +1955,11 @@
"integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=",
"dev": true
},
"@types/regression": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/regression/-/regression-2.0.0.tgz",
"integrity": "sha512-Ch2FD53M1HpFLL6zSTc/sfuyqQcIPy+/PV3xFT6QYtk9EOiMI29XOYmLNxBb1Y0lfMOR/NNa86J1gRc/1jGLyw=="
},
"@types/selenium-webdriver": {
"version": "3.0.16",
"resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz",

View File

@@ -23,6 +23,7 @@
"@angular/platform-browser-dynamic": "~8.2.4",
"@angular/router": "~8.2.4",
"@aspnet/signalr": "^1.1.4",
"@types/regression": "^2.0.0",
"angular-gridster2": "^8.2.0",
"angular-highcharts": "^8.0.3",
"hammerjs": "^2.0.8",

View File

@@ -34,10 +34,10 @@ export class PressureTrendComponent implements OnInit {
return;
}
const points: Array<Array<number>> = [];
const points: [number, number][] = [];
weatherData.forEach((weatherValue: WeatherValue) => {
const point = [moment(weatherValue.timestamp).unix(), weatherValue.value / 100];
const point: [number, number] = [moment(weatherValue.timestamp).unix(), weatherValue.value / 100];
points.push(point);
});