Skip to content

Latest commit

 

History

History
178 lines (135 loc) · 6.37 KB

introduction.md

File metadata and controls

178 lines (135 loc) · 6.37 KB

Title

Build JavaScript applications using TypeScript

Role(s)

  • student
  • developer

Level

  • intermediate

Product(s)

  • TypeScript

Prerequisites

  • Familiarity with basic HTML and JavaScript ES6/2015, including:
    • Conditionals
    • Functions
    • Scope
    • Arrays
    • Loops
    • Iterators
    • Objects
    • Classes
    • Modules
  • Installed software:

Summary

TypeScript offers all the features of JavaScript, plus an additional layer on top of these: The TypeScript type system. In this learning path, you’ll learn how using TypeScript for JavaScript development can help you build more robust code, reduce runtime type errors, take advantage of modern features before they are available in JavaScript, and work better with development teams.

Learning objectives

  1. Set up a TypeScript development environment.
  2. Declare variable types.
  3. Implement interfaces.
  4. Develop typed functions.
  5. Declare and instantiate classes.
  6. Apply generic types to functions, interfaces, and classes.
  7. Work with external libraries.
  8. Organize TypeScript code using namespaces and modules.

Chunk your content into subtasks

Identify the subtasks of module title

Subtask What part of the introduction scenario does this subtask satisfy? How will you assess it: Exercise or Knowledge check? Which learning objective(s) does this help meet? Does the subtask have enough learning content to justify an entire unit? If not, which other subtask will you combine it with?
TODO TODO TODO TODO TODO
TODO TODO TODO TODO TODO
TODO TODO TODO TODO TODO

Outline the modules

  1. Get started with TypeScript

    This module introduces you to the TypeScript language, why it was created, and how you can benefit by using it for JavaScript development. You'll also set up a TypeScript development environment to prepare you to complete future exercises.

    • Introduction
    • Overview of TypeScript
    • Exercise - Select a TypeScript editor
    • Exercise - Install the TypeScript compiler
    • Compile a TypeScript file
    • Exercise - Set up a TypeScript project
    • Knowledge Check
    • Summary
  2. Declare variable types in TypeScript

    The static type system in TypeScript enables you to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly. In TypeScript, declarations of namespaces, classes, properties, functions, variables, and other language entities associate types with those entities. This module introduces some of the available types and shows how to associate them with variables.

    • Introduction
    • Overview of types
    • Primitive types
    • Exercise - Enums
    • Any and unknown types
    • Union and intersection types
    • Collection types
    • Lab
    • Knowledge Check
    • Summary
  3. Implement interfaces in TypeScript

    In TypeScript, you can use interfaces as you would in traditional object-oriented programming. You can also use interfaces to define object types and this is the primary focus of this module.

    • Introduction
    • Introduction to interfaces in TypeScript
    • Exercise - Declare and instantiate an interface
    • Exercise - Extend an interface
    • Other ways to use interfaces
    • Lab
    • Knowledge Check
    • Summary
  4. Develop typed functions using TypeScript

    If you know how to write functions in JavaScript, you know how to write functions in TypeScript. In this module, you'll learn about the new capabilities that TypeScript add to the standard JavaScript functions to make them easier to work with.

    • Introduction
    • Create functions in TypeScript
    • Exercise - Create functions
    • Fun with parameters
    • Exercise - Fun with parameters
    • Exercise - Define function types
    • Lab
    • Knowledge Check
    • Summary
  5. Declare and instantiate classes in TypeScript

    In this modules, you'll learn how TypeScript type annotations for class members, access modifiers, and the ability to specify required or optional parameters extend ES6 class functionality and provide additional benefits.

    • Introduction
    • Introduction to classes in TypeScript
    • Exercise - Create a class
    • Exercise - Instantiate a class
    • Access modifiers
    • Exercise - Apply access modifiers
    • Define static properties
    • Extend a class using inheritance
    • Exercise - Extend a class
    • Exercise - Declare an interface to ensure class shape
    • Design considerations
    • Lab
    • Knowledge Check
    • Summary
  6. Define generics in TypeScript

    While generics are supported by many programming languages, including TypeScript, they are not currently available in JavaScript. In this module, you'll learn how to apply generics to functions, interfaces, and classes.

    • Introduction
    • Introduction to generics
    • Using methods and properties of a generic type
    • Exercise - Implement generics with interfaces and classes
    • Implement generics with custom types and classes
    • Lab
    • Knowledge Check
    • Summary
  7. Access external libraries from TypeScript

    This module introduces you to organzing code in TypeScript using modules and accessing external type libraries.

    • Introduction
    • Organize code using modules
    • Exercise - Export and import module components
    • Exercise - Compile modules
    • Exercise - Access external type libraries
    • Lab
    • Knowledge Check
    • Summary
  8. Organize code using TypeScript namespaces

    TypeScript provides two ways to organize code: Namespaces and modules. This module explains how to organize TypeScript code using namespaces. While both namespaces and modules provide a way to categorize related code in meaningful ways and help you control which code is exposed to the global namespace of your applications, there are some differences between them.

    • Introduction
    • Introduction to TypeScript namespaces
    • Exercise - Organize code using a single file namespace
    • Organize code using multi-file namespaces
    • Design considerations
    • Lab
    • Knowledge Check
    • Summary

Notes

Note any additional information that may be beneficial to this content such as links, reference material, etc.