C2 Small repository investigation
10 minSuggested first: L12 Interfaces and dispatch
Outcome
Resolve a re-export, read what a test covers, and trace the branch one input takes.
The case
Three files, three items. Each item has one accepted answer and can be retried; after a miss, the review link names the lesson to revisit. Nothing is locked by your score.
export { charge as quote } from "./pricing";
export function charge(n: number, fee = 2) {
return n > 0 ? add(n, fee) : 0;
}
function add(n: number, fee: number) { return n + fee; }
import { quote } from "./index";
assertEqual(quote(3), 5);
Checkpoint items
Review
Revisit any missed item the next day, then try a Trace puzzle in a repository you haven't read yet.