Skip to content

Invalid typescript declarations #306

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
tahq69 opened this issue Dec 27, 2017 · 1 comment
Closed

Invalid typescript declarations #306

tahq69 opened this issue Dec 27, 2017 · 1 comment

Comments

@tahq69
Copy link
Contributor

tahq69 commented Dec 27, 2017

Version

1.0.0-beta.9

Reproduction link

https://github.com/crip-home/vue-test-utils-issue

Steps to reproduce

  1. Clone repo: https://github.com/crip-home/vue-test-utils-issue
  2. Run test: npm run test

What is expected?

Get defined component property

What is actually happening?

TS2339: Property 'prop1' does not exist on type 'Vue'.


If change in typings from:

export declare function mount<V extends Vue, Ctor extends VueClass<V> = VueClass<V>> (component: Ctor, options?: MountOptions<V>): Wrapper<V>

To:

export declare function mount<V extends Vue> (component: VueClass<V>, options?: MountOptions<V>): Wrapper<V>

Works as expected. I am new to typescript and I do not get why there is additional type in declaration.

@tahq69
Copy link
Contributor Author

tahq69 commented Dec 27, 2017

#307 added

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

1 participant