Skip to content

vue-router 4.1.x missing types export #1456

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
lizthegrey opened this issue Jul 5, 2022 · 0 comments · Fixed by #1457
Closed

vue-router 4.1.x missing types export #1456

lizthegrey opened this issue Jul 5, 2022 · 0 comments · Fixed by #1457
Labels
bug Something isn't working typescript Problem related to TS typings

Comments

@lizthegrey
Copy link
Contributor

Version

4.1.1

Reproduction link

github.com

Steps to reproduce

upgrade from vue-router 4.0.16 to vue-router 4.1.1 using Yarn 4 / TypeScript 4.7 in ESM mode

What is expected?

dist/vue-router.d.ts is picked up as the types

What is actually happening?

dist/vue-router.d.ts is not detected as the types, because it is not in the exports fields, only in the top level types field.

compile error:
[tsl] ERROR in /home/lizf/eve-roster/src/client/admin/SwaggerPane.vue.ts(4,26)
TS7016: Could not find a declaration file for module 'vue-router'. '/home/lizf/eve-roster/.yarn/virtual/vue-router-virtual-6bddcd632c/0/cache/vue-router-npm-4.1.1-b947f4f193-a3fe6b4ed4.zip/node_modules/vue-router/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/vue-router if it exists or add a new declaration (.d.ts) file containing declare module 'vue-router';


microsoft/TypeScript#47792 is the tracking issue for this globally for TypeScript.

@posva posva added bug Something isn't working typescript Problem related to TS typings labels Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typescript Problem related to TS typings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants