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

$route and $router type declarations seem to be missing in distributed declaration file #419

Closed
AjaiKN opened this issue Aug 11, 2020 · 1 comment
Labels
typescript Problem related to TS typings

Comments

@AjaiKN
Copy link

AjaiKN commented Aug 11, 2020

Version

4.0.0-beta.6

Reproduction link

https://github.com/aurelius333/vue-router-next-typing-repro

Steps to reproduce

Open src/views/index.vue and look for typing errors.

What is expected?

Should be typed correctly

What is actually happening?

Error message:

Property '$route' does not exist on type 'ComponentPublicInstance<{}, {}, {}, { theRoutePath(): string; }, {}, Record<string, any>, Readonly<{}>, ComponentOptionsBase<{}, {}, {}, { theRoutePath(): string; }, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<...>, string>>'.

It looks like the types appear here: https://github.com/vuejs/vue-router-next/blob/7869764cb5fefcf1fe02521c252b3e1ee35d4180/src/index.ts#L65-L115

However, they don't seem to show up in the final distributed vue-router.d.ts: https://unpkg.com/browse/vue-router@4.0.0-beta.6/dist/vue-router.d.ts. (I just searched for "$route" in this file and it didn't show up.)

@posva
Copy link
Member

posva commented Aug 11, 2020

It looks like there is a bug in api-extractor microsoft/rushstack#2090 microsoft/rushstack#1709

I wonder if we can find a workaround in the mean time that isn't appending the content to the final d.ts file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Problem related to TS typings
Projects
None yet
Development

No branches or pull requests

2 participants