smastrom / notivue

🔔 Powerful toast notification system for Vue and Nuxt.
https://notivue.smastrom.io
MIT License
678 stars 8 forks source link

Error in plugin configuration after updating to latest version #18

Closed MellKam closed 1 year ago

MellKam commented 1 year ago

Notivue version: 1.2.2

Now the type expects all notification types, and I cant pass my configuration only for success alert.


  Overload 1 of 2, '(plugin: Plugin<[config?: NotivueConfig | undefined]>, config?: NotivueConfig | undefined): App<Element>', gave the following error.
    Type '{ success: { duration: number; }; }' is missing the following properties from type 'Record<NotificationType | "global", NotificationOptions_2>': error, info, warning, promise, and 3 more.
  Overload 2 of 2, '(plugin: Plugin<[config?: NotivueConfig | undefined]>, options: [config?: NotivueConfig | undefined]): App<Element>', gave the following error.
    Argument of type '{ limit: number; position: string; pauseOnHover: boolean; pauseOnTabChange: boolean; notifications: { success: { duration: number; }; }; }' is not assignable to parameter of type '[config?: NotivueConfig | undefined]'.
      Object literal may only specify known properties, and 'limit' does not exist in type '[config?: NotivueConfig | undefined]'.```
smastrom commented 1 year ago

Thank you for reporting! Please update:

pnpm add notivue@latest