mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
feat: integrate $fetch with ohmyfetch
This commit is contained in:
parent
239c69d92a
commit
2c83f6ea6a
@ -1,4 +1,5 @@
|
||||
import nuxt2 from './module/nuxt2'
|
||||
export * from './types'
|
||||
|
||||
export default function () {
|
||||
const { nuxt } = this
|
||||
|
11
packages/nitro/src/types.ts
Normal file
11
packages/nitro/src/types.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import type { $Fetch } from 'ohmyfetch'
|
||||
|
||||
declare global {
|
||||
const $fetch: $Fetch
|
||||
|
||||
namespace NodeJS {
|
||||
interface Global {
|
||||
$fetch: $Fetch
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user