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

192
Views
How to ignore typescript linter errors/warnings "no overload matches this call" when passing react props

I've changed my .js file to .tsx and am getting errors in a component:

    <ReactJoyride
        ... // other props 
        scrollDuration={scrollDurationState} // gives error
    />

I understand the error, which is as follows:

No overload matches this call.
  Overload 1 of 2, '(props: Props | Readonly<Props>): ReactJoyride', gave the following error.
      ...
Property 'scrollDuration' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactJoyride> & Readonly<Props> & Readonly<{ children?: ReactNode; }>'.ts(2769)
(JSX attribute) scrollDuration: number

Now, I know that the error means that the prop I'm trying to provide to the component doesn't exist on the type definitions for the parameters for the ReactJoyride component. I believe this is a problem with the type file for the component, as when I comment the prop out, the behaviour of the component changes.

So I have a situation where I want to ignore the linter error. I've added a line above the error:

// @ts-ignore

But now this line is flagged with the warning:

Do not use "@ts-ignore" because it alters compilation errors.eslint@typescript-eslint/ban-ts-comment

I don't if there's something else I should be doing? I imagine I should specify what error I want to ignore, but the error message doesn't seem to be giving me a recognisable error string. Also I can't find the error reference number (.ts(2769)) to match it to anything? I've looked on Microsoft's diagnostic.Message.json file, for example, and it isn't included on there?

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!