[No QA] Replace OnyxUpdate default union type with specific types - fifth batch - #79685
Conversation
…ype_annotations_uncovered_cases' into @OlGierd03/replace_default_union_OnyxUpdate_type_fifth_batch
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…ype_annotations_uncovered_cases' into @OlGierd03/replace_default_union_OnyxUpdate_type_fifth_batch
… - TrackedExpenseParams type
… - ConvertTrackedExpenseToRequestParams type
… - addTrackedExpenseToPolicy argument type
… - onyxData variable
… - removeTransactionFromDuplicateTransactionViolation argument
… - API/index.ts functions
|
@abzokhattab Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
abzokhattab
left a comment
There was a problem hiding this comment.
The changes looks good to me
lets cover this comment and we are good to go
Comment covered |
MarioExpensify
left a comment
There was a problem hiding this comment.
Real good work, thank you @OlGierd03
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.3.11-40 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
Explanation of Change
The changes in this PR are only at the type level, hence [No QA] tag
These changes are the fifth batch of replacements of the
OnyxUpdatedefault union type with specified types. This PR covers cases of replacing type annotations in variable declarations, removing the defaultOnyxKeygeneric type, making functions generic to enable type inference and introducing less strict types to avoid usingOnyxKeye.g. in contexts where the specific Onyx keys are not known ahead of time.Important
TS performance after the changes has improved, now averaging about 83% of the previous test execution time
TS performance test logs before the changes:
Files: 9911
Lines of Library: 53140
Lines of Definitions: 2029925
Lines of TypeScript: 832233
Lines of JavaScript: 20109
Lines of JSON: 1405
Lines of Other: 0
Identifiers: 3169858
Symbols: 5064466
Types: 1851063
Instantiations: 5992266
Memory used: 6053497K
Assignability cache size: 2290501
Identity cache size: 389507
Subtype cache size: 985077
Strict subtype cache size: 1251656
I/O Read time: 1.91s
Parse time: 3.95s
ResolveModule time: 1.16s
ResolveTypeReference time: 0.03s
ResolveLibrary time: 0.00s
Program time: 7.69s
Bind time: 2.74s
Check time: 163.39s
printTime time: 0.00s
Emit time: 0.00s
Total time: 173.82s
TS performance test logs after the changes:
Files: 9911
Lines of Library: 53140
Lines of Definitions: 2029925
Lines of TypeScript: 832449
Lines of JavaScript: 20109
Lines of JSON: 1405
Lines of Other: 0
Identifiers: 3170552
Symbols: 5068838
Types: 1855723
Instantiations: 6023143
Memory used: 5964570K
Assignability cache size: 2159942
Identity cache size: 420244
Subtype cache size: 993799
Strict subtype cache size: 1182306
I/O Read time: 1.85s
Parse time: 3.73s
ResolveModule time: 1.13s
ResolveTypeReference time: 0.02s
ResolveLibrary time: 0.00s
Program time: 7.37s
Bind time: 2.72s
Check time: 135.53s
printTime time: 0.00s
Emit time: 0.00s
Total time: 145.63s
Fixed Issues
$ #73830
Tests
N/A
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
N/A