Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
ts-ignore ignores component level props error even if used in one prop

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!