mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
chore: try to fix shims
(for npm package usage)
This commit is contained in:
parent
2e0fce88a6
commit
423289d469
8
packages/app/types/shims.d.ts
vendored
8
packages/app/types/shims.d.ts
vendored
@ -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 {}
|
||||
|
7
packages/nitro/types/shims.d.ts
vendored
7
packages/nitro/types/shims.d.ts
vendored
@ -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 {}
|
||||
|
Loading…
Reference in New Issue
Block a user