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

Update TS error-guard's text to be meaningful #2182

Merged
merged 3 commits into from
Jul 31, 2019

Conversation

chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Jul 31, 2019

Summary

Provides a better error message when an i18n mapping is defined as a formatting function but no values were provided.

Checklist

- [ ] Checked in dark mode
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests
- [ ] Checked for breaking changes and labeled appropriately
- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@@ -98,10 +98,7 @@ export const EuiStat: FunctionComponent<
let titleText;
if (isLoading) {
titleText = (
// EuiI18n has trouble with the string setting
// @ts-ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these ignores are no longer needed, as EuiI18n's TS defs were updated to better support this setup

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Changes LGTM

@chandlerprall chandlerprall merged commit 5a186bc into elastic:master Jul 31, 2019
@chandlerprall chandlerprall deleted the bug/i18n-error-message branch July 31, 2019 18:19
thompsongl pushed a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
* Update TS error-guard's text to be meaningful

* changelog
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