Skip to content

Commit

Permalink
fix ts
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Dec 31, 2024
1 parent 938f936 commit 6023f99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/DebugUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ function validateReportDraftProperty(key: keyof Report, value: string) {
);
case 'errorFields':
return validateObject<ObjectElement<Report, 'errorFields', string>>(value, {}, 'string');
case 'errors':
return validateObject<ObjectElement<Report, 'errors'>>(value, {});
case 'privateNotes':
return validateObject<ObjectElement<Report, 'privateNotes', number>>(
value,
Expand Down Expand Up @@ -624,6 +626,7 @@ function validateReportDraftProperty(key: keyof Report, value: string) {
reimbursed: CONST.RED_BRICK_ROAD_PENDING_ACTION,
preview: CONST.RED_BRICK_ROAD_PENDING_ACTION,
welcomeMessage: CONST.RED_BRICK_ROAD_PENDING_ACTION,
errors: CONST.RED_BRICK_ROAD_PENDING_ACTION,
});
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/types/onyx/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback<
/** Collection of errors that exist in report fields */
errorFields?: OnyxCommon.ErrorFields;

/** Errors used by Search to show RBR */
errors?: OnyxCommon.Errors;

/** Whether the report is waiting on a bank account */
isWaitingOnBankAccount?: boolean;

Expand Down
1 change: 1 addition & 0 deletions src/types/utils/whitelistedReportKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type WhitelistedReport = OnyxCommon.OnyxValueWithOfflineFeedback<
unheldNonReimbursableTotal: unknown;
currency: unknown;
errorFields: unknown;
errors: unknown;
isWaitingOnBankAccount: unknown;
isCancelledIOU: unknown;
iouReportID: unknown;
Expand Down

0 comments on commit 6023f99

Please sign in to comment.