This page is a work in progress.You can help improve it. →

Welcome to TypeScript

TypeScript

TypeScript is a language used to make web pages interactive, such as having complex animations, clickable buttons, popup menus, etc. There are also more advanced server-side versions of TypeScript, which allow you to add more functionality to a website than simply downloading files (such as real-time collaboration between multiple computers).

In this lesson, we will discuss client (browser) side TypeScript.

Client-side TypeScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM). For example, client-side extensions allow an application to place elements on an HTML form and respond to user events, such as mouse clicks, form input, and page navigation. This means that in the browser, TypeScript can change the way the webpage (DOM) looks.

Document Object Model

We can use the power of TypeScript to make our web pages dynamic and powerful. TypeScript interacts with our webpage through what is called the Document Object Model (DOM).

The Document Object Model (DOM) connects web pages to scripts or programming languages by representing the structure of a document—such as the HTML representing a web page—in memory. Usually, that means TypeScript, although modeling HTML, SVG, or XML documents as objects are not part of the JavaScript language.

The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them, you can change the document's structure, style, or content. Nodes can also have event handlers attached to them; once an event is triggered, the event handlers get executed.

© 2017 - 2022; Built with ♥ in St. Petersburg, Florida.