I keep tripping over
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Boolean arguments like `createUser(user, true, false)` are a common readability problem in JavaScript APIs. When call sites use multiple positional booleans, readers must jump to the function definition to understand what each value means. The recommended fix is replacing positional booleans with named options objects (e.g., `{ isAdmin: true, sendWelcomeEmail: false }`), which makes call sites self-documenting. In some cases, a boolean flag signals two distinct actions that deserve separate functions entirely. TypeScript type-checking doesn't solve this problem since the issue is semantic clarity, not type correctness.
Table of contents
I’m not reading code anymore, I’m decoding itThis is where the comment sneaks inWhy this feels fine at the timeWhat I use nowSometimes the boolean is hiding a different actionTo be fair, this isn’t always badTypeScript doesn’t really save thisSame behavior, much easier to readWhy this keeps costing me time2 Comments
Sort: