From 302d4003d65ed50521c7b3b46c2cddd3f1de560b Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 20 Jan 2020 19:09:09 +0100 Subject: [PATCH] types: add type checking to nuxt plugin --- nuxt/plugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nuxt/plugin.js b/nuxt/plugin.js index b7213151..cde0d6d4 100644 --- a/nuxt/plugin.js +++ b/nuxt/plugin.js @@ -1,4 +1,6 @@ +// @ts-check import Vue from 'vue' +// @ts-ignore: this must be pinia to load the local module import { setActiveReq, setStateProvider, getRootState } from 'pinia' Vue.mixin({ @@ -23,6 +25,9 @@ Vue.mixin({ for (let i = 0; i < patchedServerPrefetch.length; i++) { const original = patchedServerPrefetch[i] + /** + * @type {(this: import('vue').default) => any} + */ patchedServerPrefetch[i] = function() { setActiveReq(this.$ssrContext.req) -- 2.47.2