storybookjs/storybook

CLI: csf-2-to-3 codemod type improvements

开放

#22,850 创建于 2023年5月31日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (10,058 个派生)batch import
codemodscsf3help wantedmaintenance

仓库指标

星标
 (89,909 个星标)
PR 合并指标
 (平均合并 7天 22小时) (30 天内合并 184 个 PR)

描述

Describe the bug

The csf-2-to-3 codemod currently produces the following CSF3 code:

export default { .... } as Meta<typeof Foo>;

export const MyStory = { ... }

It should produce:

const meta: Meta<typeof Foo> = { ... };
export default meta;

type Story = StoryObj<typeof Foo>;
export const MyStory: Story = { ... }

Discussion: https://discord.com/channels/486522875931656193/1110567774033559663

To Reproduce

No response

System

No response

Additional context

No response

贡献者指南