How to translate simple Ajax to TypeScript? : <p>I have a simple JavaScript code which using Ajax. I want translate this ajax query to TypeScript for more object oriented view. With class and method and hard data types (similar to Java:-).</p>

<p>Help me translate if it posible:</p>

<pre><code>$(document).ready(function() {
    $('#my-viewscope').click(function() {
        $ajax({
            url: 'get_data_servlet',
            type: 'post',
            dataType: 'json',

            success: function(response) {
                $.each(response, function(key, value) {
                    console.log(value);
                });
            }
        })
    })
});
</code></pre>
