fix: add initialization variables to fix typescript strict mode errors.#2824
fix: add initialization variables to fix typescript strict mode errors.#2824Jasonlee6789 wants to merge 2 commits intoOpenEMS:developfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2824 +/- ##
=============================================
+ Coverage 56.65% 59.07% +2.43%
- Complexity 8914 8918 +4
=============================================
Files 2167 1905 -262
Lines 91939 85257 -6682
Branches 6833 5807 -1026
=============================================
- Hits 52081 50360 -1721
+ Misses 37983 33100 -4883
+ Partials 1875 1797 -78 🚀 New features to boost your workflow:
|
5f652d7 to
5f95bce
Compare
| }; | ||
|
|
||
|
|
||
| private activeQueryData: string = ""; |
There was a problem hiding this comment.
Thank you for your review. In my opinion, this change is necessary to meet TypeScript's strict property initialization rule.
By initializing activeQueryData, it ensures it is always defined, after this change, this place TypeScript strict mode error was reduced. Without this explicit initialization, the compiler generates an error because it cannot guarantee that activeQueryData will have a value before it’s used.
|
@Jasonlee6789 thx for your contribution, im not sure, if this PR has some purpose |
Thank you for your review. The purpose of this PR is to fix uninitialized variables in the UI code and explicitly add null type annotations to variables initialized as null, in order to fix TypeScript strict mode errors and prevent potential runtime errors. |
|
This PR has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs. |
This PR has been closed due to inactivityIt was automatically closed because there has been no recent activity. |
npx tsc --strict:
Found 1522 errors in 194 files.
↓
Found 1505 errors in 196 files.