feat: integrate $fetch with ohmyfetch

This commit is contained in:
Pooya Parsa 2020-12-12 15:46:54 +01:00
parent 239c69d92a
commit 2c83f6ea6a
2 changed files with 12 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import nuxt2 from './module/nuxt2'
export * from './types'
export default function () {
const { nuxt } = this

View File

@ -0,0 +1,11 @@
import type { $Fetch } from 'ohmyfetch'
declare global {
const $fetch: $Fetch
namespace NodeJS {
interface Global {
$fetch: $Fetch
}
}
}