Skip to content

Vue-router can not work properly in the typescript2.0 environment #1170

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
ulivz opened this issue Feb 16, 2017 · 6 comments
Closed

Vue-router can not work properly in the typescript2.0 environment #1170

ulivz opened this issue Feb 16, 2017 · 6 comments

Comments

@ulivz
Copy link
Member

ulivz commented Feb 16, 2017

I use vue2.0 and typescript2.0, as well as vue-router2.0 as my development technology stack, which is my project template —— template,You run this project (npm run dev), you will find the error as follows:

vue-typescript-template-ui\node_modules\vue-router\types\router.d.ts
(2,10): error TS2305: Module '"vue"' has no exported member 'ComponentOptions'.
.......

Does it have a problem with the type declaration file of vue-router2.0 ?

@posva
Copy link
Member

posva commented Feb 16, 2017

@ktsn @kazupon Can you chime in, please 😁?

@ktsn
Copy link
Member

ktsn commented Feb 16, 2017

I guess @types/vue-resource still use Vue v1.x typings, so it conflict with Vue v2.x typings. 😞

@posva
Copy link
Member

posva commented Feb 16, 2017

@ktsn Thanks for looking it!
In that case, @ToxicHL you should file an issue on the vue-resource repo.
Since there's nothing to do on vue-router, I'll close this 🙂

@posva posva closed this as completed Feb 16, 2017
@ulivz
Copy link
Member Author

ulivz commented Feb 16, 2017

No, I modify the vue-router's source code to solve this problem, not vue-resource types have problems. 😞@ktsn @posva

@posva
Copy link
Member

posva commented Feb 16, 2017

Can you submit a PR in that case?

@ulivz
Copy link
Member Author

ulivz commented Feb 16, 2017

I have submitted a PR in click here, you can reproduce the bug with the demo project I have given and fix my bug based on my PR. @posva

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