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: type incompatibility with Vue 2.7 (fix #1993) #1999

Closed
wants to merge 2 commits into from
Closed

fix: type incompatibility with Vue 2.7 (fix #1993) #1999

wants to merge 2 commits into from

Conversation

deraw
Copy link

@deraw deraw commented Aug 9, 2022

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Fixes #1993

@netlify
Copy link

netlify bot commented Aug 9, 2022

Deploy Preview for vue-test-utils-v1 failed.

Name Link
🔨 Latest commit dafef7a
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-v1/deploys/62f26e474535f40008ce6c43

@deraw
Copy link
Author

deraw commented Aug 9, 2022

I had to upgrade TypeScript to v4 since the types in vue/types/jsx.d.ts use index signature with template string pattern introduced in TypeScript 4.4.0.
However the tests are now broken and the issue will be resolved in Vue v2.7.9 since vuejs/vue#12727 has been merged.
I'm leaving this PR open until this version is released

@GrtDev
Copy link

GrtDev commented Sep 5, 2022

2.7.9 has been released. Would be great to get this fix in so we can start using the vue-tsc for type checking 🙃

@yandongxu
Copy link

yandongxu commented Sep 29, 2022

Vue 2.7.10
The typing issues are still there when using mount and shallowMount with defineComponent @GrtDev

@ColinRosati
Copy link

ColinRosati commented Feb 27, 2023

I have a solution for mount & shallowMount but I cant make a PR on this repo becuase Im on mac arm64 and some binareis arent supported, when installing the packages :(

We can add 2 overrides with the defineComponent api

export declare function mount<V extends Vue> (component: DefineComponent<V>, options?: ThisTypedMountOptions<V>): Wrapper<V>
export declare function shallowMount<V extends Vue> (component: DefineComponent<V>, options?: ThisTypedShallowMountOptions<V>): Wrapper<V>

@deraw deraw closed this by deleting the head repository Mar 11, 2023
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.

mount and shallowMount do not type check with vue 2.7.x
4 participants