nuxt.d.ts
.../// <reference types="vite/client" />...
declarations.d.ts
// https://github.com/nuxt/nuxt/releases/tag/v3.13.0// TODO periodically check if this file is still needed, as libraries may update their typesimport type { ComponentCustomOptions as _ComponentCustomOptions, ComponentCustomProperties as _ComponentCustomProperties,} from 'vue'declare module '@vue/runtime-core' { interface ComponentCustomProperties extends _ComponentCustomProperties {} interface ComponentCustomOptions extends _ComponentCustomOptions {}}
export async function useFetchCookie<T = unknown, R extends NitroFetchRequest = NitroFetchRequest, O extends NitroFetchOptions<R> = NitroFetchOptions<R>>(event: H3Event, request: R, opts?: O) { const res = await $fetch.raw<T>(request, { ...opts, headers: { ...opts?.headers, ...useRequestHeaders(['cookie']) }, }) // forward cookies into SSR response const cookies = (res.headers.get('set-cookie') || '').split(',') for (const cookie of cookies) appendResponseHeader(event, 'set-cookie', cookie) // Return the data of the response return res._data}