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 errors triggered by Vue 3.5 #423

Open
kikuomax opened this issue Jan 23, 2025 · 0 comments
Open

Type errors triggered by Vue 3.5 #423

kikuomax opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kikuomax
Copy link
Collaborator

Overview of the problem

Buefy-next version: [0.2.0]
Vuejs version: [3.5.13]
OS/Browser: macOS/do not care

Description

Vue 3.5 triggered the following type errors:

src/components/table/TableColumn.spec.ts:24:9 - error TS2322: Type 'VueWrapper<CreateComponentPublicInstance<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}>, { $: ComponentInternalInstance; ... 13 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (args_0: any, args_1: any,...' is not assignable to type 'VueWrapper<CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, ... 16 more ..., {}>, { ...; } & ... 8 more ... & Omit<...>>'.
  Type '{ $: ComponentInternalInstance; $data: {}; $props: {} & Readonly<{}> & Readonly<{}>; $attrs: Data; $refs: Data; $slots: Readonly<...>; ... 8 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (args_0: an...' is not assignable to type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 11 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (ar...'.
    Type '{ $: ComponentInternalInstance; $data: {}; $props: {} & Readonly<{}> & Readonly<{}>; $attrs: Data; $refs: Data; $slots: Readonly<...>; ... 8 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (args_0: an...' is not assignable to type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 11 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (ar...'.
      Types of property '$options' are incompatible.
        Type 'ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, ... 8 more ..., ComponentProvideOptions> & MergedComponentOptionsOverride & ComponentOptionsBase<...>' is not assignable to type 'ComponentOptionsBase<ToResolvedProps<{}, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, ... 7 more ..., ComponentProvideOptions> & MergedComponentOptionsOverride'.
          Type 'ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, ... 8 more ..., ComponentProvideOptions> & MergedComponentOptionsOverride & ComponentOptionsBase<...>' is not assignable to type 'ComponentOptionsBase<ToResolvedProps<{}, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, ... 7 more ..., ComponentProvideOptions>'.
            Types of property 'components' are incompatible.
              Type 'Record<string, Component<any, any, any, ComputedOptions, MethodOptions, {}, any>> | undefined' is not assignable to type '({ BTable: DefineComponent<ExtractPropTypes<{ data: { type: PropType<any[]>; default: () => never[]; }; columns: { type: PropType<TableColumnProps[]>; default: () => never[]; }; bordered: BooleanConstructor; ... 62 more ...; debouncePageInput: (NumberConstructor | StringConstructor)[]; }>, ... 18 more ..., any>; BTa...'.
                Type 'Record<string, Component<any, any, any, ComputedOptions, MethodOptions, {}, any>>' is not assignable to type '{ BTable: DefineComponent<ExtractPropTypes<{ data: { type: PropType<any[]>; default: () => never[]; }; columns: { type: PropType<TableColumnProps[]>; default: () => never[]; }; bordered: BooleanConstructor; ... 62 more ...; debouncePageInput: (NumberConstructor | StringConstructor)[]; }>, ... 18 more ..., any>; BTab...'.
                  Type 'Record<string, Component<any, any, any, ComputedOptions, MethodOptions, {}, any>>' is missing the following properties from type '{ BTable: DefineComponent<ExtractPropTypes<{ data: { type: PropType<any[]>; default: () => never[]; }; columns: { type: PropType<TableColumnProps[]>; default: () => never[]; }; bordered: BooleanConstructor; ... 62 more ...; debouncePageInput: (NumberConstructor | StringConstructor)[]; }>, ... 18 more ..., any>; BTab...': BTable, BTableColumn

24         wrapper = mount(WrapperComp).findComponent({ ref: 'testItem' })
           ~~~~~~~

src/utils/SlotComponent.ts:69:17 - error TS2322: Type 'void' is not assignable to type 'boolean | Function | undefined'.

69                 this.updatedHook = onUpdated(this.refresh, this.component.$)
                   ~~~~~~~~~~~~~~~~


Found 2 errors in 2 files.

Errors  Files
     1  src/components/table/TableColumn.spec.ts:24
     1  src/utils/SlotComponent.ts:69

Steps to reproduce

npm -w @ntohq/buefy-next run type-check

Expected behavior

No type error reported.

Actual behavior

Type error reported.

@kikuomax kikuomax self-assigned this Jan 23, 2025
@kikuomax kikuomax added the bug Something isn't working label Jan 23, 2025
@kikuomax kikuomax added this to the v0.2.1 milestone Jan 23, 2025
@kikuomax kikuomax moved this to 🔖 Ready in Buefy Vue3 Project Board Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant