Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS migration] Migrate 'Report.js' lib to TypeScript #28730

Merged
merged 40 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
56de552
[TS migration] Migrate 'Report.js' lib to TypeScript
blazejkustra Oct 3, 2023
1e8b624
Merge branch 'main' into ts-migration/Report
blazejkustra Oct 6, 2023
1269110
Migrate first 1000 lines of Report.ts
blazejkustra Oct 6, 2023
dcb222d
Finish migrating Report.ts
blazejkustra Oct 9, 2023
3fca4b7
Merge branch 'main' into ts-migration/Report
blazejkustra Nov 28, 2023
4fea06b
Adjust imports, comments up to line 100
blazejkustra Nov 28, 2023
d686dcc
Update pusher types
blazejkustra Nov 28, 2023
321f78d
Migrate report actions, up to line 400
blazejkustra Nov 28, 2023
f8a3e31
Migrate openReport
blazejkustra Nov 28, 2023
aa93c7e
Fix type problems with NotificationPreference
blazejkustra Nov 28, 2023
475bbb8
Migrate API actions
blazejkustra Nov 28, 2023
a66d6f7
Migrate next portion of Report utils
blazejkustra Nov 28, 2023
11c2b2f
Start migrating emoji reactions
blazejkustra Nov 28, 2023
55a955f
Remove unused imports
blazejkustra Nov 28, 2023
5ea6bd7
Migrate the rest of Report.js
blazejkustra Nov 28, 2023
66fc2df
Fix a typo after refactoring
blazejkustra Nov 28, 2023
057c3c1
Fix imports
blazejkustra Nov 28, 2023
e41d524
Fix tests after migration
blazejkustra Nov 28, 2023
0fca53f
Adjust the code after internal review
blazejkustra Nov 29, 2023
ff75cb8
Merge branch 'main' into ts-migration/Report
blazejkustra Nov 29, 2023
e731ade
Fix typecheck after merging main
blazejkustra Nov 29, 2023
55ca6d1
Merge branch 'main' into ts-migration/Report
blazejkustra Nov 30, 2023
c8efcd0
Merge branch 'main' into ts-migration/Report
blazejkustra Nov 30, 2023
1fc67db
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 1, 2023
ee66d75
Adjust the code after cross review
blazejkustra Dec 1, 2023
111e655
Add explanations to onyx properties
blazejkustra Dec 1, 2023
f7cbe22
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 4, 2023
d311cc0
Adjust onyx keys
blazejkustra Dec 4, 2023
b24460d
Fix emoji types for report.ts
blazejkustra Dec 4, 2023
ae6ec3d
Fix types for linkMetadata and originalMessage
blazejkustra Dec 4, 2023
fd8965b
Add PersonalDetailsList type, add default values in Report.ts
blazejkustra Dec 5, 2023
6eea7f9
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 5, 2023
74c9482
Fix type errors around LocalNotification
blazejkustra Dec 5, 2023
7f6c168
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 7, 2023
41471e9
Clear the logic in leaveRoom util
blazejkustra Dec 7, 2023
2273962
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 8, 2023
fb517ac
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 8, 2023
089dca8
Fix typecheck
blazejkustra Dec 8, 2023
5e32cc6
Merge branch 'main' into ts-migration/Report
blazejkustra Dec 11, 2023
33cb7fc
Fix typecheck
blazejkustra Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ type OnyxValues = {
[ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT]: string;
[ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT_NUMBER_OF_LINES]: number;
[ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE]: boolean;
[ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING]: boolean;
[ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING]: Record<string, boolean>;
blazejkustra marked this conversation as resolved.
Show resolved Hide resolved
[ONYXKEYS.COLLECTION.REPORT_USER_IS_LEAVING_ROOM]: boolean;
[ONYXKEYS.COLLECTION.SECURITY_GROUP]: OnyxTypes.SecurityGroup;
[ONYXKEYS.COLLECTION.TRANSACTION]: OnyxTypes.Transaction;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function makeRequestWithSideEffects(command, apiCommandParameters = {}, onyxData
*
* @param {String} command - Name of API command to call.
* @param {Object} apiCommandParameters - Parameters to send to the API.
* @param {Object} onyxData - Object containing errors, loading states, and optimistic UI data that will be merged
* @param {Object} [onyxData] - Object containing errors, loading states, and optimistic UI data that will be merged
* into Onyx before and after a request is made. Each nested object will be formatted in
* the same way as an API response.
* @param {Object} [onyxData.optimisticData] - Onyx instructions that will be passed to Onyx.update() before the request is made.
Expand Down
2 changes: 1 addition & 1 deletion src/libs/EmojiUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ function suggestEmojis(text, lang, limit = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMO
/**
* Retrieve preferredSkinTone as Number to prevent legacy 'default' String value
*
* @param {Number | String} val
* @param {Number | String | null} val
* @returns {Number}
*/
const getPreferredSkinToneIndex = (val) => {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const getActiveRouteIndex = function (route, index) {
/**
* Main navigation method for redirecting to a route.
* @param {String} route
* @param {String} type - Type of action to perform. Currently UP is supported.
* @param {String} [type] - Type of action to perform. Currently UP is supported.
*/
function navigate(route = ROUTES.HOME, type) {
if (!canNavigate('navigate', {route})) {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ function updateOptimisticParentReportAction(parentReportAction, lastVisibleActio
/**
* Get optimistic data of parent report action
* @param {String} reportID The reportID of the report that is updated
* @param {String} lastVisibleActionCreated Last visible action created of the child report
* @param {String} [lastVisibleActionCreated] Last visible action created of the child report
* @param {String} type The type of action in the child report
* @param {String} parentReportID Custom reportID to be updated
* @param {String} parentReportActionID Custom reportActionID to be updated
Expand Down
Loading
Loading