Hello!
I am getting this error when I try to pass a function to setSprings as a parameter.

However, it's working fine even if it is showing this.
Here is the body of the error message:
(parameter) index: number
No overload matches this call.
Overload 1 of 2, '(ds: Partial<Merge<{ backgroundColor: string; } & UseSpringBaseProps, { from?: Partial<Pick<{ backgroundColor: string; }, "backgroundColor">> | undefined; onRest?(ds: Partial<...>): void; }>>): void', gave the following error.
Value of type '(index: number) => { backgroundColor: string; }' has no properties in common with type 'Partial<Merge<{ backgroundColor: string; } & UseSpringBaseProps, { from?: Partial<Pick<{ backgroundColor: string; }, "backgroundColor">> | undefined; onRest?(ds: Partial<...>): void; }>>'. Did you mean to call it?
Overload 2 of 2, '(i: number): Partial<Merge<{ backgroundColor: string; } & UseSpringBaseProps, { from?: Partial<Pick<{ backgroundColor: string; }, "backgroundColor">> | undefined; onRest?(ds: Partial<...>): void; }>>', gave the following error.
Argument of type '(index: number) => { backgroundColor: string; }' is not assignable to parameter of type 'number'.ts(2769)
Please try with v9:
npm install react-spring@next
Had the same problem, confirming V9 is fixing it.
Most helpful comment
Please try with v9: