rigor789/vue-scrollto

using this.$scrollTo in nuxt / typescript

Offen

#321 geöffnet am 11.07.2020

 (2 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)JavaScript (114 Forks)batch import
help wantednuxt

Repository-Metriken

Stars
 (1.966 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

There's an issue when using with nuxt (2.13.3) / typescript (@nuxt/types => 2.13.3)

If i don't import vue-scrollto inside my global.d.ts file:

import 'vue-scrollto'

Then using this.$scrollTo inside a component would complain about:

"Property '$scrollTo' does not exist on type 'CombinedVueInstance<Vue, Data, { setActive(index: number, id: number): void; findArticles: ((this: any, val: string) => Promise) & Cancelable; hideResults(): void; showArticle(articleId: number, categoryId: number): Promise<...>; }, unknown, Readonly<...>>'.Vetur(2339)"

Contributor Guide