Currently, I have a form set up in the following way:
using (Ajax.BeginRouteForm(
...
new AjaxOptions
{
HttpMethod = "POST",
OnFailure = "OnFailure",
OnSuccess = "OnSuccess"
}))
{
..,.
}
I have implemented the OnSuccess
function in a TypeScript file. However, I am looking to enhance this function to be more TypeScript-oriented. Currently, my function looks like this:
function OnSuccess(data: what type goes here?) {
...
// use data.SomeValue here
...
}
My question is, what should be the type of 'data' so that I can still access 'data.SomeValue' somehow?