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 store events to typings #1451

Merged
merged 3 commits into from
May 22, 2020
Merged

Add store events to typings #1451

merged 3 commits into from
May 22, 2020

Conversation

stmegabit
Copy link
Contributor

@stmegabit stmegabit commented May 13, 2020

Fix typings for #1450

@coveralls
Copy link

coveralls commented May 13, 2020

Coverage Status

Coverage remained the same at 93.175% when pulling 2a70ca6 on stmegabit:fix-types into f52cf56 on i18next:master.

@jamuhl jamuhl requested a review from rosskevin May 13, 2020 09:52
@rosskevin rosskevin changed the title Fix typings Add store events to typings May 13, 2020
Copy link
Collaborator

@rosskevin rosskevin left a comment

Choose a reason for hiding this comment

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

Please add appropriate usage tests to the test/typescript directory to prevent regressions.

@stmegabit
Copy link
Contributor Author

Check, please

index.d.ts Outdated
/**
* Gets fired when resources got added
*/
on(event: 'added', callback: (lng: string, ns: string) => void): void;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I just noticed, why not combine these as:

- on(event: 'added', callback: (lng: string, ns: string) => void): void;
- on(event: 'removed', callback: (lng: string, ns: string) => void): void;
+ on(event: 'removed' | 'added', callback: (lng: string, ns: string) => void): void;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed

@rosskevin rosskevin merged commit 075aa62 into i18next:master May 22, 2020
@rosskevin
Copy link
Collaborator

@jamuhl this can be a patch release

@jamuhl
Copy link
Member

jamuhl commented May 25, 2020

was published in i18next@19.4.5

thanks to all 👍

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

Successfully merging this pull request may close these issues.

None yet

5 participants