Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type '(context: Context) => Promise<{}>' is not assignable to type 'LoaderFunction<ReactRenderer, Args>' #161

Open
musjj opened this issue Sep 6, 2024 · 0 comments

Comments

@musjj
Copy link

musjj commented Sep 6, 2024

I'm getting this TypeScript error when trying to assign mswLoader to loaders:

import type { Preview } from "@storybook/react";
import { mswLoader } from "msw-storybook-addon";

const preview: Preview = {
  loaders: [mswLoader],
}
Type '(context: Context) => Promise<{}>' is not assignable to type 'LoaderFunction<ReactRenderer, Args>'.
  Types of parameters 'context' and 'context' are incompatible.
    Type 'StoryContextForLoaders<ReactRenderer, Args>' is not assignable to type 'Context'.
      Types of property 'parameters' are incompatible.
        Type 'Parameters' has no properties in common with type 'MswParameters'.ts(2322)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant