forum

Home / DeveloperSection / Forums / What type to give a JSON object

What type to give a JSON object

Manoj Bhatt 1506 22-Jan-2014

I have the following form

 using (Ajax.BeginRouteForm(
   ...
                new AjaxOptions
                {
                    HttpMethod = "POST",
                    OnFailure = "OnFailure",
                    OnSuccess = "OnSuccess"
                }))
            {
                ..,.
            }

I implement the OnSuccess function in a TypeScript file. I am trying to make this function more TypeScripty. At the moment I have this

function OnSuccess(data: what type goes here?) {
...
// use data.SomeValue here
...
}

Question is what type shall I say data is such that I can still somehow use data.SomeValue?


c# c# 
Updated on 23-Jan-2014

Can you answer this question?


Answer

1 Answers

Liked By