Usually, large applications are not designed starting from scratch as we have done in the previous section, but use either complete JavaScript frameworks, such as Angular, Ember.js, and Aurelia; sophisticated user interface libraries such as Vue.js, React.js, Meteor, and Knockout.js; or utility libraries such as jQuery. While Angular is the subject of the third part of the book, jQuery is briefly covered in the next section.
Whatever JavaScript libraries or frameworks are used, the developer has the problem of informing the TypeScript compiler about public functions, methods, interfaces, and variables they contain; otherwise, any attempt to use them would result in a compilation error.
This is done by providing declaration files that describe the types used by the libraries with the TypeScript syntax. Since declaration files do not...