Skip to content

[Bug]: CSF-Factories: Does not infer types from global decorators #32307

@IanVS

Description

@IanVS

Describe the bug

I'm experimenting with the new typesafe csf-factories, and noticed that the parameters of custom decorators specified in preview.ts are not inferred. I can still use module augmentation to add them, as before, but I believe one of the goals of the RFC is to avoid the need for that.

Reproduction link

https://stackblitz.com/edit/github-bkfc7ul3?file=src%2Fstories%2FPage.stories.ts&view=editor

Reproduction steps

In the reproduction, I've created a custom decorator (a common one, for react-router), but the types for parameters.routing are not known by preview.meta.

System

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions