Skip to content

Commit

Permalink
fix: added return type to i18n._ (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitschwifty authored Jan 13, 2021
1 parent ce71a8b commit 249c486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const defaultFormats = (
function context({ locale, locales, values, formats, localeData }) {
const formatters = defaultFormats(locale, locales, localeData, formats)

const ctx = (name: string, type: string, format: any) => {
const ctx = (name: string, type: string, format: any): string => {
const value = values[name]
const formatted = formatters[type](value, format)
const message = isFunction(formatted) ? formatted(ctx) : formatted
Expand All @@ -77,7 +77,7 @@ export function interpolate(
locales: Locales,
localeData: Object
) {
return (values: Object, formats: Object = {}) => {
return (values: Object, formats: Object = {}): string => {
const ctx = context({
locale,
locales,
Expand Down

1 comment on commit 249c486

@vercel
Copy link

@vercel vercel bot commented on 249c486 Jan 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.