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: remove the obsolete defineMessages function from the typings. #1179

Merged
merged 1 commit into from
Jan 1, 2022
Merged

fix: remove the obsolete defineMessages function from the typings. #1179

merged 1 commit into from
Jan 1, 2022

Conversation

cmlenz
Copy link
Contributor

@cmlenz cmlenz commented Dec 17, 2021

When working in a TypeScript environment, the typings suggest that a function called defineMessages (note the plural) should be available. However, this function is not actually available in the code, and its use will cause errors at runtime. It appears that this function was removed as obsolete a while back, so it should also be removed from the typings.

The only other place this function was referenced was in the switch statement in getMacroType(), which is also cleaned up in this change.

I found these related changes:

  • 9ea2f2e removed the defineMessages function from the API reference, saying it's obsolete
  • Improve macro typings #651 states the intention to remove the defineMessages declaration from the types, but doesn't actually do so

When working in a TypeScript environment, the typings suggest that a function called `defineMessages` (note the plural) should be available. However, this function is not actually available in the code, and its use will cause errors at runtime. It appears that this function was removed as obsolete a while back, so it should also be removed from the typings.

The only other place this function was referenced was in the switch statement in `getMacroType()`, which is also cleaned up in this change.
@vercel
Copy link

vercel bot commented Dec 17, 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/EB3kyFJqTTGqxKZGtqEnniEv4V46
✅ Preview: Failed

@semoal semoal changed the title Remove the obsolete defineMessages function from the typings. fix: remove the obsolete defineMessages function from the typings. Jan 1, 2022
@semoal semoal merged commit 19b032f into lingui:main Jan 1, 2022
@semoal
Copy link
Contributor

semoal commented Jan 1, 2022

Thanksss!

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