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

type error in NaiveNavbar #18

Closed
tobiasdiez opened this issue Sep 3, 2023 · 2 comments
Closed

type error in NaiveNavbar #18

tobiasdiez opened this issue Sep 3, 2023 · 2 comments

Comments

@tobiasdiez
Copy link
Contributor

nuxi typecheck complains about a typeerror in the navbar

node_modules/@bg-dev/nuxt-naiveui/dist/runtime/components/NaiveNavbar.vue:120:40 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type 'import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").DefineComponent<{ name: { type: globalThis.PropType<string>; required: true; }; size: { type: globalThis.PropType<number>; }; color: { type: globalThis.PropType<string>; }; borderRadius: { ...; }; iconColor: { ...; }; }, ... 11 mo...' is not assignable to parameter of type 'import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").DefineComponent<{ name: { type: globalThis.PropType<string>; required: true; }; size: { type: globalThis.PropType<number>; }; color: { type: globalThis.PropType<string>; }; borderRadius: { ...; }; iconColor: { ...; }; }, ... 11 mo...'.
      Type 'DefineComponent<{ name: { type: PropType<string>; required: true; }; size: { type: PropType<number>; }; color: { type: PropType<string>; }; borderRadius: { type: PropType<number>; }; iconColor: { ...; }; }, ... 11 more ..., {}>' is not assignable to type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: { readonly iconColor?: string | undefined; readonly borderRadius?: number | undefined; readonly name: string; ... 13 more ...; readonly size?: number | undefined; }; ... 10 more ...; $watch<T extends string | ((...args: any) => any...'.
        Type '{ $: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").ComponentInternalInstance; $data: {}; $props: { readonly iconColor?: string | undefined; ... 15 more ...; readonly size?: number | undefined; }; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, c...' is not assignable to type '{ $: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").ComponentInternalInstance; $data: {}; $props: { readonly iconColor?: string | undefined; ... 15 more ...; readonly size?: number | undefined; }; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, c...'. Two different types with this name exist, but they are unrelated.
          Type '{ $: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").ComponentInternalInstance; $data: {}; $props: { readonly iconColor?: string | undefined; ... 15 more ...; readonly size?: number | undefined; }; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, c...' is not assignable to type '{ $: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").ComponentInternalInstance; $data: {}; $props: { readonly iconColor?: string | undefined; ... 15 more ...; readonly size?: number | undefined; }; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, c...'. Two different types with this name exist, but they are unrelated.
            Types of property '$options' are incompatible.
              Type 'import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{ name: { type: globalThis.PropType<string>; required: true; }; size: { type: globalThis.PropType<number>; }; color: { type: globalThis.PropType<string>; }; borderRadius: {...' is not assignable to type 'import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{ name: { type: globalThis.PropType<string>; required: true; }; size: { type: globalThis.PropType<number>; }; color: { type: globalThis.PropType<string>; }; borderRadius: {...'. Two different types with this name exist, but they are unrelated.
                Type 'ComponentOptionsBase<Readonly<ExtractPropTypes<{ name: { type: PropType<string>; required: true; }; size: { type: PropType<number>; }; color: { type: PropType<string>; }; borderRadius: { type: PropType<number>; }; iconColor: { ...; }; }>>, ... 11 more ..., {}> & MergedComponentOptionsOverride' is not assignable to type 'ComponentOptionsBase<Readonly<ExtractPropTypes<{ name: { type: PropType<string>; required: true; }; size: { type: PropType<number>; }; color: { type: PropType<string>; }; borderRadius: { type: PropType<number>; }; iconColor: { ...; }; }>>, ... 11 more ..., {}>'.
                  Types of property 'data' are incompatible.
                    Type '((this: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<...>, vm: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<Readonly<globalThis.ExtractPropTypes<{ name: { type: globalThis.P...' is not assignable to type '((this: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<...>, vm: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<Readonly<globalThis.ExtractPropTypes<{ name: { type: globalThis.P...'. Two different types with this name exist, but they are unrelated.
                      Type '(this: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<...>, vm: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<Readonly<globalThis.ExtractPropTypes<{ name: { type: globalThis.Pr...' is not assignable to type '(this: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<...>, vm: import("D:/Programming/JabRefOnline/node_modules/@vue/runtime-core/dist/runtime-core").CreateComponentPublicInstance<Readonly<globalThis.ExtractPropTypes<{ name: { type: globalThis.Pr...'. Two different types with this name exist, but they are unrelated.
                        Type 'unknown' is not assignable to type '{}'.

120             icon: route.icon ? () => h(NaiveIcon, { name: route.icon }) : undefined,
                                           ~~~~~~~~~

  node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1490:25
    1490 export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
                                 ~
    The last overload is declared here.

its this call here:

icon: route.icon ? () => h(NaiveIcon, { name: route.icon }) : undefined,

@becem-gharbi
Copy link
Owner

Hi, I just pushed a commit that fixes all nuxi typecheck issues eed57a0

@tobiasdiez
Copy link
Contributor Author

Perfect, thanks a lot!

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

2 participants