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

Typing issue with 4.0.0-alpha.4 #147

Closed
cexbrayat opened this issue Mar 29, 2020 · 0 comments
Closed

Typing issue with 4.0.0-alpha.4 #147

cexbrayat opened this issue Mar 29, 2020 · 0 comments

Comments

@cexbrayat
Copy link
Member

It looks like there is a typing issue using the lastest release.
dist/vue-router.d.ts has the following declarations:

export declare function useRoute(): import("./types").RouteLocationNormalizedResolved;

export declare function useRouter(): import("./router").Router;

but types and router are not in the directory, which leads to the following compilation errors:

369:44 Cannot find module './types'.
    367 | declare type UseLinkOptions = VueUseOptions<LinkProps>;
    368 |
  > 369 | export declare function useRoute(): import("./types").RouteLocationNormalizedResolved;
        |                                            ^
    370 |
    371 | export declare function useRouter(): import("./router").Router;
    372 |
ERROR in /Users/ced-pro/vue-router-test/node_modules/vue-router/dist/vue-router.d.ts(371,45):
371:45 Cannot find module './router'.
    369 | export declare function useRoute(): import("./types").RouteLocationNormalizedResolved;
    370 |
  > 371 | export declare function useRouter(): import("./router").Router;
        |                                             ^
    372 |
    373 | export declare function useView(options: UseViewOptions): (attrs: {
    374 |     [key: string]: unknown;
ERROR in /Users/ced-pro/vue-router-test/node_modules/vue-router/dist/vue-router.d.ts(375,41):
375:41 Namespace '"/Users/ced-pro/vue-router-test/node_modules/vue/dist/vue"' has no exported member 'RendererNode'.
    373 | export declare function useView(options: UseViewOptions): (attrs: {
    374 |     [key: string]: unknown;
  > 375 | }) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement> | null;
        |                                         ^
    376 |
    377 | declare type UseViewOptions = VueUseOptions<ViewProps>;
    378 |
ERROR in /Users/ced-pro/vue-router-test/node_modules/vue-router/dist/vue-router.d.ts(375,69):
375:69 Namespace '"/Users/ced-pro/vue-router-test/node_modules/vue/dist/vue"' has no exported member 'RendererElement'.
    373 | export declare function useView(options: UseViewOptions): (attrs: {
    374 |     [key: string]: unknown;
  > 375 | }) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement> | null;
        |                                                                     ^
    376 |
    377 | declare type UseViewOptions = VueUseOptions<ViewProps>;
    378 |
ERROR in /Users/ced-pro/vue-router-test/node_modules/vue-router/dist/vue-router.d.ts(381,49):
381:49 Namespace '"/Users/ced-pro/vue-router-test/node_modules/vue/dist/vue"' has no exported member 'RendererNode'.
    379 | export declare const View: new () => ComponentPublicInstance<{
    380 |     name: string;
  > 381 | } & {}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement> | null, unknown, {}, {}, import("vue").VNodeProps & {} & {
        |                                                 ^
    382 |     name?: string | undefined;
    383 | }>;
    384 |
ERROR in /Users/ced-pro/vue-router-test/node_modules/vue-router/dist/vue-router.d.ts(381,77):
381:77 Namespace '"/Users/ced-pro/vue-router-test/node_modules/vue/dist/vue"' has no exported member 'RendererElement'.
    379 | export declare const View: new () => ComponentPublicInstance<{
    380 |     name: string;
  > 381 | } & {}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement> | null, unknown, {}, {}, import("vue").VNodeProps & {} & {
        |                                                                             ^
    382 |     name?: string | undefined;
    383 | }>;

I guess the last errors will be fixed with your commit in vue-next when alpha.11 will be out, but I'm not sure about the first two.

@posva posva closed this as completed in ec241f7 Mar 29, 2020
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