Skip to content

Commit

Permalink
fix(macro types): mark other as required for ChoiceOptions (#1527)
Browse files Browse the repository at this point in the history
  • Loading branch information
taozhou-glean authored Mar 17, 2023
1 parent db6e497 commit c4b700d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/macro/__typetests__/index.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ expectType<string>(
})
)

// @ts-expect-error: other is required
expectType<string>(plural(5, { one: "test" }))

///////////////////
//// Select Ordinal
///////////////////
Expand Down
2 changes: 1 addition & 1 deletion packages/macro/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type ChoiceOptions = {
many?: string

/** Catch-all option */
other?: string
other: string
/** Exact match form, corresponds to =N rule */
[digit: `${number}`]: string
}
Expand Down

0 comments on commit c4b700d

Please sign in to comment.