AI Features

TypeScript

Get acquainted with TypeScript and the features it offers.

What is TypeScript?

TypeScript is a superset of the JavaScript language. This means it contains all of the features of JavaScript but also offers additional features not found within the language, such as:

  • Static typing
  • Class-based, object-oriented programming (prior to ES6)

Features of TypeScript

Some of the features that TypeScript introduces are as follows:

  • Modules
  • Data types
  • Classes
  • Access modifiers
  • Multiline strings
  • String interpolation

Modules

A module is simply a container for organizing and grouping our code that is then able to be exported and imported for use into another script, like so:

// importing module
import { IonicPage, NavController, NavParams } from 'ionic-angular';

// exporting module
export
...
Ask