is there any way for typescript to infer an argument or have a type defined for the argument object?

Try using the built-in Parameters

type success = (data: any, value: string, settings: any) => void

const fn = (...args: Parameters<success>) => {}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top