diff --git a/src/pages/iou/request/step/withWritableReportOrNotFound.tsx b/src/pages/iou/request/step/withWritableReportOrNotFound.tsx index be45b173f5ff..69172bde748e 100644 --- a/src/pages/iou/request/step/withWritableReportOrNotFound.tsx +++ b/src/pages/iou/request/step/withWritableReportOrNotFound.tsx @@ -52,10 +52,10 @@ type WithWritableReportOrNotFoundProps = WithWr export default function , TRef>( WrappedComponent: ComponentType>, shouldIncludeDeprecatedIOUType = false, -): React.ComponentType> & RefAttributes> { +): React.ComponentType, keyof WithWritableReportOrNotFoundOnyxProps>> { // eslint-disable-next-line rulesdir/no-negated-variables - function WithWritableReportOrNotFound(props: Omit>, ref: ForwardedRef) { - const {route} = props as TProps; + function WithWritableReportOrNotFound(props: Omit, ref: ForwardedRef) { + const {route} = props; const iouTypeParamIsInvalid = !Object.values(CONST.IOU.TYPE) .filter((type) => shouldIncludeDeprecatedIOUType || (type !== CONST.IOU.TYPE.REQUEST && type !== CONST.IOU.TYPE.SEND)) .includes(route.params?.iouType);