• Table of contents
  • Why do we need to define types?
  • Where should the types be defined?
  • Functions
  • Classes
  • How to determine the types while migrating to Angular?
  • Defining types for a third-party library
  • Typescript interfaces
  • Some Coding Style Conventions
  • Using string, number, boolean and array as types
  • While using HTTP Client
  • Declaring generic types
  • The interfaces should not begin with I
  • Advanced types
  • Union Types
  • Discriminated Unions
  • Conditional Types
  • Example
  • Why Enable Strict Mode?
  • Cases Encountered in Oppia Codebase:
  • [TS-1]:
  • [TS-1-1]
  • Violation:
  • Solution:
  • [TS-1-2]
  • Violation:
  • Solution:
  • [TS-2]:
  • [TS-2-1]:
  • Violation:
  • Solution:
  • [TS-2-2]:
  • Violation:
  • Solution:
  • [TS-3]:
  • [TS-3-1]:
  • Violation:
  • Solution:
  • [TS-3-2]:
  • Violation:
  • Solution:
  • [TS-4]:
  • [TS-4-1]:
  • Violation:
  • Solution:
  • [TS-4-2]:
  • Violation:
  • Solution:
  • [TS-5]:
  • [TS-5-1]
  • Violation:
  • Solution:
  • [TS-6]:
  • [TS-6-1]
  • Violation:
  • Solution:
  • [TS-7]:
  • [TS-7-1]
  • Violation:
  • Solution:
  • [TS-8]:
  • [TS-8-1]:
  • Violation:
  • Solution:
  • [TS-9]:
  • [TS-9-1]:
  • Violation:
  • Solution: