Skip to content

Commit

Permalink
fix(react-intl): add generic constraint to defineMessage for better i…
Browse files Browse the repository at this point in the history
…ntellisense experience (#3111)

Co-authored-by: Long Ho <longlho@users.noreply.github.com>
  • Loading branch information
mvestergaard and longlho committed Aug 15, 2021
1 parent 9eae57a commit 9eae9cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-intl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function defineMessages<
return msgs
}

export function defineMessage<T>(msg: T): T {
export function defineMessage<T extends MessageDescriptor>(msg: T): T {
return msg
}
export {
Expand Down

0 comments on commit 9eae9cd

Please sign in to comment.