-
Notifications
You must be signed in to change notification settings - Fork 157
Closed
Labels
Type: BugSomething isn't workingSomething isn't workingstaleIssue was not updated for some time and may be closed in the futureIssue was not updated for some time and may be closed in the future
Description
Versions
-1.7.11
Describe the bug
When using yarn generate
on a nuxt + typescript + nuxt-composition-api project, I'm getting this error:
Text:
ERROR in node_modules/vue-toastification/src/types/index.ts:251:5
TS2717: Subsequent property declarations must have the same type. Property '$toast' must be of type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }', but here has type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }'.
249 | declare module "vue/types/vue" {
250 | interface Vue {
> 251 | $toast: ReturnType<typeof ToastInterface>;
| ^^^^^^
252 | }
253 |
254 | interface VueConstructor {
ERROR in node_modules/vue-toastification/src/types/index.ts:255:5
TS2717: Subsequent property declarations must have the same type. Property '$toast' must be of type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }', but here has type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }'.
253 |
254 | interface VueConstructor {
> 255 | $toast: ReturnType<typeof ToastInterface>;
| ^^^^^^
256 | }
257 | }
258 |
ERROR in node_modules/vue-toastification/src/types/index.ts:261:5
TS2717: Subsequent property declarations must have the same type. Property '$toast' must be of type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }', but here has type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }'.
259 | declare module "@nuxt/types" {
260 | interface NuxtAppOptions {
> 261 | $toast: ReturnType<typeof ToastInterface>;
| ^^^^^^
262 | }
263 | }
264 |
ERROR in node_modules/vue-toastification/src/types/index.ts:267:5
TS2717: Subsequent property declarations must have the same type. Property '$toast' must be of type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }', but here has type '{ (content: ToastContent, options?: ToastOptions | undefined): ToastID; clear(): any; updateDefaults(update: PluginOptions): void; ... 5 more ...; warning(content: ToastContent, options?: (ToastOptions & { ...; }) | undefined): ToastID; }'.
265 | declare module "vuex/types/index" {
266 | interface Store<S> {
> 267 | $toast: ReturnType<typeof ToastInterface>;
| ^^^^^^
268 | }
269 | }
270 |
Expected behavior
yarn generate
should complete without any errors.
Steps to reproduce
Steps:
- Set up project with Nuxt, Typescript, Nuxt Composition API
- Use the provider in a component and then use the toast in a child component
- run
yarn generate
Your Environment
- Device: PC
- OS: Windows 10, Ubuntu 20 (problem exists in both OS)
NotHolst, Jhomalex and p-runge
Metadata
Metadata
Assignees
Labels
Type: BugSomething isn't workingSomething isn't workingstaleIssue was not updated for some time and may be closed in the futureIssue was not updated for some time and may be closed in the future