diff options
author | Joris | 2023-02-13 08:18:42 +0100 |
---|---|---|
committer | Joris | 2023-02-13 08:18:55 +0100 |
commit | dfdde2daf238628dfb110c807a5249c31b903af1 (patch) | |
tree | 86976e201cde613c100dfc320aececd936a8a224 /src/lib/i18n.ts | |
parent | 25ecb1cb75b7b5b584ad223e12d74c3e3ee7da89 (diff) |
Upgrade rx to 1.0.1 and add type hints
Diffstat (limited to 'src/lib/i18n.ts')
-rw-r--r-- | src/lib/i18n.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/i18n.ts b/src/lib/i18n.ts index cd5b3de..3716367 100644 --- a/src/lib/i18n.ts +++ b/src/lib/i18n.ts @@ -1,4 +1,9 @@ -export function unit(n: number, singular: string, plural: string, f: (n: number, unit: string) => string = format): string { +export function unit( + n: number, + singular: string, + plural: string, + f: (n: number, unit: string) => string = format +): string { return n > 1 ? f(n, plural) : f(n, singular) |