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 'SidebarUtils.js' lib to TypeScript #28596

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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 @@ -380,7 +380,7 @@ type OnyxValues = {
[ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST]: OnyxTypes.PolicyMember;
[ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT]: Record<string, number>;
[ONYXKEYS.COLLECTION.REPORT]: OnyxTypes.Report;
[ONYXKEYS.COLLECTION.REPORT_ACTIONS]: OnyxTypes.ReportAction;
[ONYXKEYS.COLLECTION.REPORT_ACTIONS]: Record<string, OnyxTypes.ReportAction>;
[ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS]: string;
[ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS]: OnyxTypes.ReportActionReactions;
[ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT]: string;
Expand Down
4 changes: 2 additions & 2 deletions src/libs/PersonalDetailsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Onyx.connect({
});

/**
* @param {Object} passedPersonalDetails
* @param {Array} pathToDisplayName
* @param {Object | Null} passedPersonalDetails
* @param {Array | String} pathToDisplayName
* @param {String} [defaultValue] optional default display name value
* @returns {String}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportActionsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function isReportActionDeprecated(reportAction, key) {
* and supported type, it's not deleted and also not closed.
*
* @param {Object} reportAction
* @param {String} key
* @param {String | Number} key
* @returns {Boolean}
*/
function shouldReportActionBeVisible(reportAction, key) {
Expand Down
16 changes: 8 additions & 8 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ function getPolicyType(report, policies) {
/**
* Get the policy name from a given report
* @param {Object} report
* @param {String} report.policyID
* @param {String} report.oldPolicyName
* @param {String} report.policyName
* @param {String} [report.policyID]
* @param {String} [report.oldPolicyName]
* @param {String} [report.policyName]
* @param {Boolean} [returnEmptyIfNotFound]
* @param {Object} [policy]
* @returns {String}
Expand Down Expand Up @@ -363,7 +363,7 @@ function isUserCreatedPolicyRoom(report) {
/**
* Whether the provided report is a Policy Expense chat.
* @param {Object} report
* @param {String} report.chatType
* @param {String} [report.chatType]
* @returns {Boolean}
*/
function isPolicyExpenseChat(report) {
Expand All @@ -389,7 +389,7 @@ function isControlPolicyExpenseReport(report) {
/**
* Whether the provided report is a chat room
* @param {Object} report
* @param {String} report.chatType
* @param {String} [report.chatType]
* @returns {Boolean}
*/
function isChatRoom(report) {
Expand Down Expand Up @@ -578,8 +578,8 @@ function findLastAccessedReport(reports, ignoreDomainRooms, policies, isFirstTim
/**
* Whether the provided report is an archived room
* @param {Object} report
* @param {Number} report.stateNum
* @param {Number} report.statusNum
* @param {Number} [report.stateNum]
* @param {Number} [report.statusNum]
* @returns {Boolean}
*/
function isArchivedRoom(report) {
Expand Down Expand Up @@ -2912,7 +2912,7 @@ function shouldHideReport(report, currentReportId) {
* filter out the majority of reports before filtering out very specific minority of reports.
*
* @param {Object} report
* @param {String} currentReportId
* @param {String | Null} currentReportId
* @param {Boolean} isInGSDMode
* @param {String[]} betas
* @param {Object} policies
Expand Down
Loading
Loading