From 99110d7b70ebf385e954314bc4caa7bf61819375 Mon Sep 17 00:00:00 2001 From: Adam Howard <91115+codeincontext@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:21:01 +0100 Subject: [PATCH] chore: fix Msw type --- apps/nextjs/.storybook/preview.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/nextjs/.storybook/preview.tsx b/apps/nextjs/.storybook/preview.tsx index 59f9ee53..0f552f1b 100644 --- a/apps/nextjs/.storybook/preview.tsx +++ b/apps/nextjs/.storybook/preview.tsx @@ -8,7 +8,11 @@ import "@fontsource/lexend/800.css"; import "@fontsource/lexend/900.css"; import { OakThemeProvider, oakDefaultTheme } from "@oaknational/oak-components"; import type { Preview, Decorator } from "@storybook/react"; -import { initialize as initializeMsw, mswLoader } from "msw-storybook-addon"; +import { + initialize as initializeMsw, + mswLoader, + MswParameters, +} from "msw-storybook-addon"; import { TooltipProvider } from "../src/components/AppComponents/Chat/ui/tooltip"; import { DialogProvider } from "../src/components/AppComponents/DialogContext"; @@ -19,6 +23,12 @@ import { chromaticParams } from "./chromatic"; import { RadixThemeDecorator } from "./decorators/RadixThemeDecorator"; import "./preview.css"; +declare module "@storybook/csf" { + interface Parameters { + msw?: MswParameters["msw"]; + } +} + initializeMsw(); const preview: Preview = {