Users Pricing

forum

Home Forums What type to give a JSON object – MindStick

What type to give a JSON object

Manoj Bhatt 1909 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?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md