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

chore(types): improve typing of emitted #1640

Merged
merged 1 commit into from Jul 2, 2022

Conversation

xanf
Copy link
Collaborator

@xanf xanf commented Jul 1, 2022

I find pretty annoying usage of emitted with typescript:

    expect(wrapper.emitted<unknown[]>('input')[0][0]).toEqual(testItems)

Requirement to specify <unknown[]> is pretty sad - since emitted events is always an array of arrays

This PR updates typings to simplify such use case

@netlify
Copy link

netlify bot commented Jul 1, 2022

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit 3d54c73
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-docs/deploys/62bf607a347d8000087ace5b
😎 Deploy Preview https://deploy-preview-1640--vue-test-utils-docs.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.

Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Nice.

This won't be able to go out until #1601 unfortunately.

@lmiller1990 lmiller1990 merged commit ae5bc03 into main Jul 2, 2022
@lmiller1990 lmiller1990 deleted the xanf-improve-emitted-typings branch July 2, 2022 01:24
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.

None yet

2 participants