Maronato / vue-toastification

Vue notifications made easy!
https://vue-toastification.maronato.dev
MIT License
3.03k stars 139 forks source link

Type error with Vue 2.7 #339

Closed rchl closed 1 year ago

rchl commented 1 year ago

Versions

Describe the bug

Generic type 'CombinedVueInstance' requires 6 type argument(s).

Screenshot 2022-07-19 at 23 02 18

Expected behavior

No type error

Steps to reproduce

Steps:

  1. Use in a project that has Vue 2.7 in dependencies
  2. Type check the project

Your Environment

Additional context

CombinedVueInstance has additional argument SetupBindings in its type:

export type CombinedVueInstance<
  Instance extends Vue,
  Data,
  Methods,
  Computed,
  Props,
  SetupBindings
> = Data &
  Methods &
  Computed &
  Props &
  Instance &
  (SetupBindings extends void ? {} : SetupBindings)

I believe that CombinedVueInstance is considered internal by Vue so ideally it wouldn't be referenced directly.

Swedish-li commented 1 year ago

Maybe you need update vue to v2.7.10 https://github.com/vuejs/vue/pull/12727

rchl commented 1 year ago

Cool, thanks for pointing that out. This was not the case at the time of creating this issue. :)