Pen2Pencil

Loading course…

TypeScript — Full Course Syllabus

Adopting and using TypeScript on top of JavaScript — types, tooling, and incremental migration.

  1. 1. tsconfig.json (basic)What tsconfig.json is and how to create a minimal configuration for gradual TypeScript adoption.
  2. 2. allowJs and checkJsCompiler options that enable TypeScript to consume .js files and optionally type-check them.
  3. 3. skipLibCheckskipLibCheck option for avoiding type errors from third-party declaration files during migration.
  4. 4. allowSyntheticDefaultImportsFlag that relaxes default import behavior for interop with CommonJS modules during migration.
  5. 5. noImplicitAnyCompiler option that forces explicit typing by disallowing implicit any types.
  6. 6. Type aliases (type)Defining custom type aliases for clearer domain types in incremental typing.
  7. 7. interfaceDeclaring interfaces to describe object shapes and extend them across files.
  8. 8. Type assertions with `as`Using the as syntax to assert a type when progressively migrating code.
  9. 9. JSDoc-driven typesUsing JSDoc annotations in JS files to get type hints before converting to .ts.
  10. 10. Module-by-module migration patternA strategy to convert one module at a time and keep a working codebase during migration.
  11. 11. Typing third-party libraries with @typesInstalling and using @types packages and strategies when types are missing or incorrect.
  12. 12. tsserver and editor tooling for incremental adoptionHow tsserver, editor plugins, and language features support incremental adoption.
  13. 13. type-only imports/exportsUsing import type / export type to avoid runtime import cycles and reduce bundle size.
  14. 14. isolatedModulesThe isolatedModules compiler flag and why it's useful for incremental transpilation and tooling compatibility.
  15. 15. TypeScript "strict" umbrellaEnabling TypeScript's strict umbrella option and its effect on type-safety guarantees.
  16. 16. package.json "types" / "typings" entrypointsHow the "types" / "typings" field in package.json exposes typings for consumers.
  17. 17. Incremental compilation (tsc --incremental)Enabling TypeScript incremental builds and how they speed up iterative migration.
  18. 18. unknown vs anyDifference between unknown and any and using unknown to safely narrow external values.
  19. 19. Declaration files (.d.ts)Creating minimal .d.ts files to provide types for existing modules without full rewrite.
  20. 20. Strangler pattern for migrationApplying the Strangler Fig pattern to incrementally replace parts of an app with TypeScript.
  21. 21. Gradual any suppression patterns (eslint-disable-next-line vs @ts-expect-error)Best practices for annotating or suppressing type errors temporarily during migration.