December 2017
Beginner
372 pages
10h 32m
English
Now, let's look at the JavaScript generated for our namespace by the TypeScript compiler. As we had mentioned earlier as well, looking at the generated JavaScript provides us an opportunity to understand the features of the TypeScript in more detail.
We will look at the JavaScript of the previous example, where we had one namespace and one class, as follows:

The right-hand side shows the generated JavaScript. We can see that the WebServiceResponse namespace is just a function in JavaScript, which has an inner function, WebResponse. Line number 22 makes sure that we have the WebServiceResponse variable only ...
Read now
Unlock full access