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

Improve Translator type #2082

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Jan 19, 2023

The Translator type is an overloaded function. While the current type considers the 'defaultMessage' to be either 'string' or 'undefined' it does not handle the case where it could be 'string | undefined' while the implementation obviously handles this fine.

This change adds this additional case to the 'Translator' type and optionalizes the 'defaultMessage' parameter. This allows a more convenient use of this type by adopters.

The Translator type is an overloaded function. While the current type considers the
'defaultMessage' to be either 'string' or 'undefined' it does not handle the case where
it could be 'string | undefined' while the implementation obviously handles this fine.

This change adds this additional case to the 'Translator' type and optionalizes the
'defaultMessage' parameter. This allows a more convenient use of this type by adopters.
@netlify
Copy link

netlify bot commented Jan 19, 2023

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit d6f82a4
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/63c972b4c4fb02000a8f46c0
😎 Deploy Preview https://deploy-preview-2082--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@coveralls
Copy link

Coverage Status

Coverage: 83.193%. Remained the same when pulling d6f82a4 on sdirix:improve-translator-type into 0334763 on eclipsesource:master.

Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@lucas-koehler lucas-koehler added this to the 3.1 milestone Jan 20, 2023
@lucas-koehler lucas-koehler merged commit ede7d61 into eclipsesource:master Jan 20, 2023
@sdirix sdirix deleted the improve-translator-type branch January 20, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants