mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +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 Vue from 'vue'
|
||||||
|
import { $Fetch } from 'ohmyfetch'
|
||||||
|
import { Nuxt } from '../dist'
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
import type { $Fetch } from 'ohmyfetch'
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-var
|
// eslint-disable-next-line no-var
|
||||||
var $fetch: $Fetch
|
var $fetch: $Fetch
|
||||||
|
|
||||||
@ -29,9 +29,9 @@ declare module '*.vue' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
import type { Nuxt } from '../dist'
|
|
||||||
|
|
||||||
interface App {
|
interface App {
|
||||||
$nuxt: Nuxt
|
$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 {
|
declare global {
|
||||||
import type { $Fetch } from 'ohmyfetch'
|
|
||||||
// eslint-disable-next-line no-var
|
// eslint-disable-next-line no-var
|
||||||
var $fetch: $Fetch
|
var $fetch: $Fetch
|
||||||
namespace NodeJS {
|
namespace NodeJS {
|
||||||
@ -10,7 +12,6 @@ declare global {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '#storage' {
|
declare module '#storage' {
|
||||||
import type { Storage } from 'unstorage'
|
|
||||||
export const storage: Storage
|
export const storage: Storage
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,3 +21,5 @@ declare module '#assets' {
|
|||||||
export function statAsset(id: string): Promise<AssetMeta>
|
export function statAsset(id: string): Promise<AssetMeta>
|
||||||
export function getAsset<T=any>(id: string): { read: () => Promise<T>, meta: AssetMeta }
|
export function getAsset<T=any>(id: string): { read: () => Promise<T>, meta: AssetMeta }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export {}
|
||||||
|
Loading…
Reference in New Issue
Block a user