Skip to content

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

TypeScript
460 B
Raw Blame

Bug report: parseDuration("5x") crashes the scheduler with "TypeError: Cannot read properties of null (reading '1')".

You are in a TypeScript repo (src/duration.ts, src/duration.test.ts, vitest). Make parseDuration throw a RangeError that names the offending input for anything it can't parse (including empty strings), and accept surrounding whitespace like " 5m ". Add tests. Verify with: npx vitest run

Leave your changes uncommitted in the working tree.