TypeScript for Real Projects · 35 min · 250 XP
Checkpoint: account importer
Combine validation, normalization and a typed result in an all-or-nothing account importer.
Checkpoint: design the result union and validation steps before writing code. You have no parser scaffold. Keep raw input unknown until checks justify constructing an Account.
Batch boundaries need an explicit failure policy. This importer is all-or-nothing: malformed rows or duplicate normalized ids reject the entire batch. A partial-import product would need a different result containing accepted rows and per-row errors. Normalize ids before checking uniqueness so whitespace cannot bypass the rule. Keep the temporary collection local until the complete batch passes.
Loading your workspace…