openems
openems copied to clipboard
fix: add type to test code
$ npx tsc --strict
Found 3646 errors in 210 files.
↓
Found 1492 errors in 211 files.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Additional details and impacted files
@@ Coverage Diff @@
## develop #2702 +/- ##
=============================================
+ Coverage 56.03% 56.04% +0.02%
- Complexity 8041 8044 +3
=============================================
Files 2059 2059
Lines 87513 87511 -2
Branches 6418 6420 +2
=============================================
+ Hits 49032 49041 +9
+ Misses 36797 36786 -11
Partials 1684 1684
rebased!
If I run:
npm audit fix && npm install && node_modules/.bin/ng lint --fix; node_modules/.bin/tsc && node_modules/.bin/tsc-strict && node_modules/.bin/ng build -c "openems,openems-backend-prod,prod"
I get
src/app/shared/utils/array/array.utils.ts(17,21): error TS2345: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
src/app/shared/utils/array/array.utils.ts(31,21): error TS2345: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
Sorry, I mis-rebased. now its ok.
findSmallestNumber and findBiggestNumber was refactord. https://github.com/OpenEMS/openems/pull/2702/commits/e228a2091656f8c642daca7d83a0038a0b6eb22a