Skip to content

Commit c5c0952

Browse files
committed
improve stableReportSelector type
1 parent 379ad3f commit c5c0952

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/selectors/stableReportSelector.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type ExcludedFields = ValidReportKeys<
2323
]
2424
>;
2525

26+
type StableReport = Omit<Report, TupleToUnion<ExcludedFields>>;
27+
2628
/**
2729
* Stable `Report` projection for the `ReportActionItem` subtree.
2830
*/
@@ -89,7 +91,7 @@ function stableReportSelector(report: OnyxEntry<Report>) {
8991
nextStep: report.nextStep,
9092
pendingAction: report.pendingAction,
9193
pendingFields: report.pendingFields,
92-
} satisfies Omit<Report, TupleToUnion<ExcludedFields>>;
94+
} satisfies Record<keyof StableReport, unknown> & StableReport;
9395
}
9496

9597
export default stableReportSelector;

0 commit comments

Comments
 (0)