Skip to content

Commit 67b3c8e

Browse files
committed
refactor a type
1 parent 64c42a0 commit 67b3c8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libs/actions/Report.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,21 +2092,21 @@ function deleteReportComment(
20922092

20932093
// Force LHN re-evaluation for empty child thread by triggering an Onyx update
20942094
if (reportAction.childReportID && childVisibleActionCount === 0) {
2095-
const childReportKey = `${ONYXKEYS.COLLECTION.REPORT}${reportAction.childReportID}`;
2095+
const childReportKey: `${typeof ONYXKEYS.COLLECTION.REPORT}${string}` = `${ONYXKEYS.COLLECTION.REPORT}${reportAction.childReportID}`;
20962096
const childReport = allReports?.[childReportKey];
20972097

20982098
if (childReport) {
20992099
optimisticData.push({
21002100
onyxMethod: Onyx.METHOD.MERGE,
2101-
key: childReportKey as `${typeof ONYXKEYS.COLLECTION.REPORT}${string}`,
2101+
key: childReportKey,
21022102
value: {
21032103
lastMessageText: '',
21042104
},
21052105
});
21062106

21072107
failureData.push({
21082108
onyxMethod: Onyx.METHOD.MERGE,
2109-
key: childReportKey as `${typeof ONYXKEYS.COLLECTION.REPORT}${string}`,
2109+
key: childReportKey,
21102110
value: {
21112111
lastMessageText: childReport.lastMessageText ?? '',
21122112
},

0 commit comments

Comments
 (0)