From 423289d46997ab98e5e493921bf8c7795c9ea34a Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 24 May 2021 13:29:31 +0200 Subject: [PATCH] chore: try to fix shims (for npm package usage) --- packages/app/types/shims.d.ts | 8 ++++---- packages/nitro/types/shims.d.ts | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/app/types/shims.d.ts b/packages/app/types/shims.d.ts index a9474984f0..51ed6d8f40 100644 --- a/packages/app/types/shims.d.ts +++ b/packages/app/types/shims.d.ts @@ -1,8 +1,8 @@ import Vue from 'vue' +import { $Fetch } from 'ohmyfetch' +import { Nuxt } from '../dist' declare global { - import type { $Fetch } from 'ohmyfetch' - // eslint-disable-next-line no-var var $fetch: $Fetch @@ -29,9 +29,9 @@ declare module '*.vue' { } declare module 'vue' { - import type { Nuxt } from '../dist' - interface App { $nuxt: Nuxt } } + +export {} diff --git a/packages/nitro/types/shims.d.ts b/packages/nitro/types/shims.d.ts index c29b22b431..b21f53396c 100644 --- a/packages/nitro/types/shims.d.ts +++ b/packages/nitro/types/shims.d.ts @@ -1,5 +1,7 @@ +import type { $Fetch } from 'ohmyfetch' +import type { Storage } from 'unstorage' + declare global { - import type { $Fetch } from 'ohmyfetch' // eslint-disable-next-line no-var var $fetch: $Fetch namespace NodeJS { @@ -10,7 +12,6 @@ declare global { } declare module '#storage' { - import type { Storage } from 'unstorage' export const storage: Storage } @@ -20,3 +21,5 @@ declare module '#assets' { export function statAsset(id: string): Promise export function getAsset(id: string): { read: () => Promise, meta: AssetMeta } } + +export {}