Manuals / TypeScript / Chapter 9

D · Integration · advanced · Week 5 · Chapter 9 of 11

Migration strategy

Migrate incrementally — never big-bang rewrite. allowJs + checkJs → rename leaves → tighten strict → delete any. JavaScript consumes TypeScript; TypeScript compiles to JS. Keep shipping throughout.

Path progress
75%

Step 1 of 5

Enable allowJs

tsconfig: allowJs: true, checkJs: true (optional). .ts and .js coexist. TypeScript checks JSDoc-annotated JS.

Enable allowJsDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Enable allowJsdrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Do this now

Add allowJs to tsconfig. Run typecheck — note JS + TS errors together.

Was this step clear?
Chapter learning outcomes
  • allowJs / checkJs
  • Rename order (leaves first)
  • JSDoc migration path
  • Incremental strict
  • Team rollout

Clear these before you leave

Side quest

Migration sprint

Complete migration steps 1–3 this week. All utils, types, api in .ts. typecheck green.