// season.ts - THE FILE YOU EDIT. everything else in the lab is fixed.
//
// YOUR JOB, IN ORDER:
//   1. Run the tests once now:  npm test
//      Expect 4 failed, 0 passed. The stub below throws, so every
//      test that calls your guard goes red. Red first, always.
//   2. Delete both stub lines inside seasonFromString (`void value;`
//      and the `throw`) and write the guard in their place. Keep the
//      `Season` type and the function signature exactly as-is.
//   3. Run tests plus typecheck:  npm test && npm run typecheck
//      Expect 4 passed, 0 failed, and zero type errors. That is
//      green. The typecheck kills `any`-slop; the no-cast rule is
//      checked when we compare boogeymen.
//   4. Break your guard once on purpose (for example accept "Fall"),
//      re-run, and confirm exactly the near-miss test goes red.
//      Then undo and go green again. The red you cause on purpose is
//      the proof the tests actually guard something.
//
// THE SHAPE TO COPY (from lessons 030 and 050):
//   - parameter stays `unknown`: callers must narrow, you prove.
//   - one strict equality (`===`) per union member, joined by `||`.
//   - return the value itself in the true arm: TypeScript narrows it
//     to `Season` for you, so no cast and no `any` are needed.
//   - return `null` for everything else. never throw on a stranger.
//
// RULES: no `any`, no bare casts (`as`).
//
// The union: 'winter' | 'spring' | 'summer' | 'fall'.
//
// Full procedure (windows, mac, linux, remote-ssh tracks):
//   https://d3c82cl9fpj2fy.cloudfront.net/labs/season-guard/
// One-command setup (macOS and Linux):
//   curl -fsSL https://d3c82cl9fpj2fy.cloudfront.net/labs/season-guard/setup.sh | bash
// Full-repo run (only if you cloned the whole site):
//   ./node_modules/.bin/vitest run assets/typescript/src/labs/frontier/season.test.ts

export type Season = "winter" | "spring" | "summer" | "fall";

export function seasonFromString(value: unknown): Season | null {
	void value;
	throw new Error("lab stub: implement seasonFromString");
}
