Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): add string return type to i18n._ #1081

Merged
merged 1 commit into from
Jun 9, 2021
Merged

fix(core): add string return type to i18n._ #1081

merged 1 commit into from
Jun 9, 2021

Conversation

tannerlyons
Copy link
Contributor

This adds a cast to the call to JSON.parse which allows the _ function to properly infer the string return type.

My only concern is the feat/fix/breaking level of this commit, which changes an any to a string. For the most part this should be ok, especially given the expected usages of i18n._ but I want to bring it up in any case.

I love lingui, thanks!

@vercel
Copy link

vercel bot commented Jun 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/lingui-js/js-lingui/6Y9WL1qjM4cjXtAZUXGmsBEqTY41
✅ Preview: https://js-lingui-git-fork-tannerlyons-main-lingui-js.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants