Skip to content

tanint/typescript-for-qa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is TypeScript?

  • TypeScript as a superset of JavaScript.

Advantages of using TypeScript

  • Type Safety
  • Maintainability
  • Early Error Detection

Outline

TypeScript Types and Annotations

  • Explaining primitive types: number, string, boolean.
  • Using type annotations to specify variable types.
  • Demonstrate type inference.

Alias Types and Union Types

  • Introduction to type aliases for custom type names.
  • Explaining union/intersection types for variables that can hold different types.

Functions in TypeScript

  • Ways to define function
    • Function Declaration
    • Function Expression
    • Arrow Function Expression
    • Arrow Function Expression (Shorter Syntax for Single Expression)
    • Method within an Object Literal
  • Writing functions with explicit parameter types and return types.
  • Optional and default parameters.
  • Rest parameters and spread syntax.
  • Async function

Example

  • Calculator function
  • Write test helper

About

TypeScript knowledge sharing for QA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages