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

貢獻者指南