Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Options object

A single object of named settings passed to a function, so each choice is labeled where it is used.

Say it to an AI

TypeScript sendReminder(user, options) for overdue invoices. No boolean flag arguments: take an options object with channel: "email" | "sms" and an optional urgent flag defaulting to false, so call sites are self-documenting.

How an expert would brief the stronger version of “Invoice reminders”.

See it

Try it as a puzzle →

An AI assistant hands back a helper that nudges customers of an invoicing SaaS about unpaid bills.

Study A · the stronger one
Study B · the weaker one

Why: A's 'ReminderOptions' lets callers write '{ channel: "sms", urgent: true }' and leave 'urgent' out when it's false.

Related words

  • Single responsibility principle
  • Flag argument
  • Side effect
  • Parameter object
  • Long parameter list
  • Named arguments
  • Utils file
  • Domain type

Room 3 · Functions & structure

Learn “Options object” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle