Skip to lesson
Exit
Multiline, Imports and Cross-File Portals1 / 1

2 min lesson

Tab multiline + portal jumps

Complete "Tab multiline + portal jumps". Check the final state against the lesson before you move on.

Check your understanding

Run this practice: Tab — rename a field, then follow the portal into its caller.

Outcome: Typecheck passes — every amountMinor reference resolves across both files, and no other file was touched.

Tab — rename a field, then follow the portal into its caller
Tab multiline + portal jumps
SayI'll make the first rename myself — amount to amountMinor on the Money type — so Tab sees the pattern from my edit instead of guessing at one.
DoChange the field by hand in the type definition and its first usage in money.ts.
TypeTab suggests the same rename across the remaining amount references in money.ts, as one multiline edit.
DoRead every highlighted line before pressing Tab.
SeeThe edit touches only the references inside money.ts — nothing spills into unrelated files — so you accept it.
DoFollow the portal, open invoice.ts, and confirm it is the caller you expected before accepting the cross-file edit.
SeeCursor shows a portal jump to src/invoice.ts, predicting the same rename where Money is constructed.
DoRun tsc --noEmit — the smallest check that catches a reference broken across money.ts and invoice.ts.
SeeTypecheck passes — every amountMinor reference resolves across both files, and no other file was touched.
Learn more

Optional practice

Practice: Tab multiline + portal jumps

QYou've applied it. What actually proves the work is done, not just a plausible answer?

Finish the check to continue.