diff --git a/packages/nitro/src/index.ts b/packages/nitro/src/index.ts index 01b14171aa..a66a35c2fb 100644 --- a/packages/nitro/src/index.ts +++ b/packages/nitro/src/index.ts @@ -1,4 +1,5 @@ import nuxt2 from './module/nuxt2' +export * from './types' export default function () { const { nuxt } = this diff --git a/packages/nitro/src/types.ts b/packages/nitro/src/types.ts new file mode 100644 index 0000000000..2c632eaff2 --- /dev/null +++ b/packages/nitro/src/types.ts @@ -0,0 +1,11 @@ +import type { $Fetch } from 'ohmyfetch' + +declare global { + const $fetch: $Fetch + + namespace NodeJS { + interface Global { + $fetch: $Fetch + } + } +}