Skip to content

Vue 3: typed TestComponent on render function #228

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

Closed
sand4rt opened this issue May 14, 2021 · 2 comments
Closed

Vue 3: typed TestComponent on render function #228

sand4rt opened this issue May 14, 2021 · 2 comments

Comments

@sand4rt
Copy link
Contributor

sand4rt commented May 14, 2021

Proposal:

Change line 45 index.d.ts from:

export function render(
  TestComponent: any, // this makes me sad :sob:
  options?: RenderOptions,
): RenderResult

To:

export function render(
  TestComponent: new () => ComponentPublicInstance,
  options?: RenderOptions,
): RenderResult
@sand4rt sand4rt added the bug Something isn't working label May 14, 2021
@afontcu afontcu removed the bug Something isn't working label May 15, 2021
@nickserv nickserv added the vue3 label Jul 6, 2021
@afontcu
Copy link
Member

afontcu commented Jul 26, 2021

Will this handle all Component signatures? If I recall correctly, we had a hard time doing this in the official Vue Test Utils for Vue 3 – Check this out: https://github.com/vuejs/vue-test-utils-next/blob/master/src/mount.ts

@sand4rt
Copy link
Contributor Author

sand4rt commented Aug 8, 2021

Probably not if i look at the VTU implementation. I guess this ticket can be closed.

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

No branches or pull requests

3 participants