S
S
SergSuhanov2018-07-08 21:59:11
JavaScript
SergSuhanov, 2018-07-08 21:59:11

Where can I find a TypeScript example that will generate js like this?

<script type="text/javascript">

    var namespace = {
        grid: null,
        helper: null,


        init: function () {
            grid = $('selector').BlaBla();
            helper = $('selector').BlaBla();
        },

        getResult: function () {
            return 1+2;
        },

        next: function () {
            //bla bla
        },

        pause: function () {
            //bla bla
        },

        stop: function () {
            //bla bla
        }


    }

    namespace.init();

</script>

//if namespace is a keyword then you can replace it with for example "namespace1"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-07-08
@SergSuhanov

ready
<script type="text/javascript">

    var namespace = {
        grid: null,
        helper: null,


        init: function () {
            grid = $('selector').BlaBla();
            helper = $('selector').BlaBla();
        },

        getResult: function () {
            return 1+2;
        },

        next: function () {
            //bla bla
        },

        pause: function () {
            //bla bla
        },

        stop: function () {
            //bla bla
        }


    }

    namespace.init();

</script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question