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(types): allow spyOn of "useI18n()" #1815

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

pinguet62
Copy link
Contributor

Try fix #1562

Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

However, I think #1304 is broken with your PR, your PR has regression.
#1304

Can you please suggest another solution, please?

@pinguet62
Copy link
Contributor Author

Hello @kazupon

I tested this case, and I don't see any regression:

expectType<string>(useI18n().locale.value)
expectType<string>(useI18n({useScope: 'local'}).locale.value)

(typing tests already added in #1309)

Please could you give any expectType() example breaking #1304 ?

@pinguet62 pinguet62 requested a review from kazupon April 22, 2024 09:07
@kazupon kazupon added the Type: Bug Bug or Bug fixes label Apr 22, 2024
Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

sorry, I missed the test of #1309
LGTM

@kazupon kazupon merged commit 3b55d37 into intlify:master Apr 22, 2024
18 checks passed
@pinguet62
Copy link
Contributor Author

Many thanks! Have a nice day 🖖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typing regression on "useI18n()": spyOn return "never" type
2 participants