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.
Why: A's 'ReminderOptions' lets callers write '{ channel: "sms", urgent: true }' and leave 'urgent' out when it's false.
Related words
Room 3 · Functions & structure
Learn “Options object” in a five-minute lesson