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

Add a typescript declaration file #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sportshead
Copy link

Bug: T348794

Did my best to infer the types based on the code, I think I got the types pretty accurate. One thing I'm not too sure about is MessageStore.load - I copied the overloads straight from I18N.load, since it seems like they both take the same input.

@santhoshtr
Copy link
Member

Thanks for your contribution. Would it be possible to add tests for these typings as well? Banana.i18n is the successor of this library, and that library also has typings. You can refer the typing tests in the repo: https://github.com/wikimedia/banana-i18n/tree/master/types

Tests not only verify the work you did, but also act as example reference to use the type definition.

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

Successfully merging this pull request may close these issues.

None yet

2 participants