There is a component
<InfoComp
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
data={t}
FillerComp={FillerComp}
ActionBar={ActionBar}
actions={actions}
actionBarProps={{ isLoading }}
isDialogVisible={false}
// setDialogVisible={() => {
// return;
// }}
/>
And type of the props of this component is defined like this
type Props = {
data: Data;
ActionBar: React.FC<{ onCancel: () => void; onSave: () => void; isLoading?: boolean }>;
actionBarProps?: { isLoading?: boolean };
FillerComp: React.FC<{
Form: ReactNode;
ActionBar: ReactNode;
}>;
actions: {
onCancel: () => void;
onSave: (newData: FormData) => void;
isLoading?: boolean;
};
isDialogVisible: boolean;
setDialogVisible: (visible: boolean) => void;
};
Issue here is: as I have added @ts-ignore in the data prop
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
data={t}
TS is not even throwing error even if I don't pass any mandatory prop to InfoComp like isDialogVisible.