/** * Count-aware copy. * * House Style: any user-facing string interpolating a count must agree * grammatically across all three cases — zero, one, many. The escape hatches * (`"${n} item(s)"`, always-plural `"${n} items"`) are prohibited in copy the * user reads, and the rule names real fleet defects: `craft` renders * `${n} item(s)`; `fathom` and `at-profile` render `${n} items` that says * "1 items" at count 1. * * Measured 2026-07-25: 34 count-bearing copy sites across 11 extensions, and * `pluralize` already hand-rolled twice — so this is the factoring House Style * explicitly asks for. */ /** * Pluralize a noun for a count. Handles regular English suffix rules plus the * common irregulars; pass `plural` explicitly for anything it gets wrong. * * @example * plural(1, "device") // "device" * plural(3, "device") // "devices" * plural(2, "match") // "matches" * plural(2, "city") // "cities" * plural(2, "person") // "people" * plural(2, "match", "matches!") // "matches!" — explicit override wins */ export declare function plural(count: number, singular: string, pluralForm?: string): string; export interface CountOptions { /** Explicit plural form, when the suffix rules get it wrong. */ plural?: string; /** * Copy for the zero case. House Style: *"No devices found."* reads better than * *"0 devices found."* — pass `"No devices"` to get the worded negative. * When omitted, zero renders numerically (`"0 devices"`). */ zero?: string; } /** * Format a count with its noun, agreeing across zero / one / many. * * This is the function that replaces the prohibited patterns — use it anywhere a * count reaches the user (toast titles, `List.Section` subtitles, empty-state copy). * * @example * countOf(0, "device") // "0 devices" * countOf(0, "device", { zero: "No devices" }) // "No devices" * countOf(1, "device") // "1 device" * countOf(7, "device") // "7 devices" * countOf(2, "match") // "2 matches" * * @example // the fleet defects this closes * `${n} item(s)` → countOf(n, "item") * `${n} items` → countOf(n, "item") // no longer says "1 items" */ export declare function countOf(count: number, singular: string, options?: CountOptions): string; //# sourceMappingURL=plural.d.ts.map