chore: try to fix shims

(for npm package usage)
This commit is contained in:
Pooya Parsa 2021-05-24 13:29:31 +02:00
parent 2e0fce88a6
commit 423289d469
2 changed files with 9 additions and 6 deletions

View File

@ -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 {}

View File

@ -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<AssetMeta>
export function getAsset<T=any>(id: string): { read: () => Promise<T>, meta: AssetMeta }
}
export {}