From d7ba672ce9baf29e90a551a8922bc2f95ccc5d97 Mon Sep 17 00:00:00 2001 From: grgr-dkrk <40130327+grgr-dkrk@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:04:22 +0900 Subject: [PATCH] fix: type information is included in the storybook.requires.js output when the useJs option is used --- .../scripts/__snapshots__/generate.test.js.snap | 8 ++++---- packages/react-native/scripts/generate.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native/scripts/__snapshots__/generate.test.js.snap b/packages/react-native/scripts/__snapshots__/generate.test.js.snap index 0cfcd257e8..437cabdae8 100644 --- a/packages/react-native/scripts/__snapshots__/generate.test.js.snap +++ b/packages/react-native/scripts/__snapshots__/generate.test.js.snap @@ -43,7 +43,7 @@ import "@storybook/addon-ondevice-actions/register"; const { importMap } = prepareStories({ storyEntries: normalizedStories }); global.view._preview.onStoriesChanged({ - importFn: async (importPath: string) => importMap[importPath], + importFn: async (importPath) => importMap[importPath], }); global.view._preview.onGetProjectAnnotationsChanged({ @@ -98,7 +98,7 @@ import "@storybook/addon-ondevice-actions/register"; const { importMap } = prepareStories({ storyEntries: normalizedStories }); global.view._preview.onStoriesChanged({ - importFn: async (importPath: string) => importMap[importPath], + importFn: async (importPath) => importMap[importPath], }); global.view._preview.onGetProjectAnnotationsChanged({ @@ -153,7 +153,7 @@ import "@storybook/addon-ondevice-actions/register"; const { importMap } = prepareStories({ storyEntries: normalizedStories }); global.view._preview.onStoriesChanged({ - importFn: async (importPath: string) => importMap[importPath], + importFn: async (importPath) => importMap[importPath], }); global.view._preview.onGetProjectAnnotationsChanged({ @@ -208,7 +208,7 @@ import "@storybook/addon-ondevice-actions/register"; const { importMap } = prepareStories({ storyEntries: normalizedStories }); global.view._preview.onStoriesChanged({ - importFn: async (importPath: string) => importMap[importPath], + importFn: async (importPath) => importMap[importPath], }); global.view._preview.onGetProjectAnnotationsChanged({ diff --git a/packages/react-native/scripts/generate.js b/packages/react-native/scripts/generate.js index 88732c09b5..852ca9c3a9 100644 --- a/packages/react-native/scripts/generate.js +++ b/packages/react-native/scripts/generate.js @@ -93,7 +93,7 @@ function generate({ configPath, absolute = false, useJs = false }) { const { importMap } = prepareStories({ storyEntries: normalizedStories }); global.view._preview.onStoriesChanged({ - importFn: async (importPath: string) => importMap[importPath], + importFn: async (importPath) => importMap[importPath], }); global.view._preview.onGetProjectAnnotationsChanged({