I have a type like the following:
type success = (data: any, value: string, settings: any) => void
OR an interface like the following
// interface success { (data: any, value: string, settings: any): void }
I have an object like this
{ onSuccess: (<need to have 'success' type here for arguments>) => { callbackFunction(<call using the same arguments passed to OnSuccess function>) } }
- Is there a way to have
argumentsobject passed toonSuccessfunction be type inferred tosuccesstype? If so how do I define aninterfaceor atypesignature similar tosuccesstype above that can be used to be type inferred?
callbackFunction(data: any, value: string, settings: any). If you notice, the arguments signature is the same as thesuccesstype above