UNPKG

@storybook/nextjs-vite

Version:

Storybook for Next.js and Vite: Develop, document, and test UI components in isolation

37 lines (32 loc) 1.91 kB
import { M as Mock } from '../../index.d-ff220430.js'; import { draftMode as draftMode$1 } from 'next/dist/server/request/draft-mode'; export * from 'next/dist/server/request/headers'; import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers'; import * as next_dist_compiled__edge_runtime_cookies from 'next/dist/compiled/@edge-runtime/cookies'; import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies'; declare class HeadersAdapterMock extends HeadersAdapter { constructor(); append: Mock<(name: string, value: string) => void>; delete: Mock<(name: string) => void>; get: Mock<(name: string) => string | null>; has: Mock<(name: string) => boolean>; set: Mock<(name: string, value: string) => void>; forEach: Mock<(callbackfn: (value: string, name: string, parent: Headers) => void, thisArg?: any) => void>; entries: Mock<() => HeadersIterator<[string, string]>>; keys: Mock<() => HeadersIterator<string>>; values: Mock<() => HeadersIterator<string>>; } declare const headers: { (): HeadersAdapterMock; mockRestore(): void; }; declare class RequestCookiesMock extends RequestCookies { get: Mock<(...args: [name: string] | [next_dist_compiled__edge_runtime_cookies.RequestCookie]) => next_dist_compiled__edge_runtime_cookies.RequestCookie | undefined>; getAll: Mock<(...args: [name: string] | [next_dist_compiled__edge_runtime_cookies.RequestCookie] | []) => next_dist_compiled__edge_runtime_cookies.RequestCookie[]>; has: Mock<(name: string) => boolean>; set: Mock<(...args: [key: string, value: string] | [options: next_dist_compiled__edge_runtime_cookies.RequestCookie]) => this>; delete: Mock<(names: string | string[]) => boolean | boolean[]>; } declare const cookies: Mock<() => RequestCookiesMock>; declare const draftMode: Mock<typeof draftMode$1>; export { cookies, draftMode, headers };