Repository: storybook
Issue: [Bug]: Storybook can't inferr TypeScript props
Labels: bug,needs triage

### Describe the bug

Hi, i'm working on a monorepo, with an app for storybook and a library for React (TypeScript).
I'm building the library with Rollup and importing the component to the storybook app, no troubles 'till here.

The thing is that Storybook can't inferr the component types and i have some problems trying to display the props info.

Some of my package.json:
`
"devDependencies": {
    "@base2/pretty-print-object": "^1.0.2",
    "@mdx-js/react": "^2.2.1",
    "@storybook/addon-actions": "^6.5.15",
    "@storybook/addon-backgrounds": "^6.5.15",
    "@storybook/addon-controls": "^6.5.15",
    "@storybook/addon-docs": "^6.5.15",
    "@storybook/addon-essentials": "^6.5.15",
    "@storybook/addon-links": "^6.5.15",
    "@storybook/addon-measure": "^6.5.15",
    "@storybook/addon-outline": "^6.5.15",
    "@storybook/addons": "6.5.15",
    "@storybook/builder-webpack5": "^6.5.15",
    "@storybook/manager-webpack5": "^6.5.15",
    "@storybook/mdx2-csf": "^0.0.3",
    "@storybook/react": "^6.5.15",
    "@storybook/source-loader": "6.5.15",
    "@types/react": "^18.0.26",
    "@types/react-dom": "^18.0.10",
    "css-loader": "^6.7.3",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "sass-loader": "^13.2.0",
    "serve": "^14.1.2",
    "typescript": "^4.5.2",
    "webpack": "^5.75.0",
    "webpack-cli": "^5.0.1",
    "webpack-dev-server": "^4.11.1"
  }
`

my main.js
`
module.exports = {
	stories: ["../stories/**/*.stories.@(mdx|js|jsx|ts|tsx)"],
	framework: "@storybook/react",
	addons: [
		"@storybook/addon-links",
		"@storybook/addon-essentials"
	],
	core: {
		builder: 'webpack5',
	},
	features: {
		previewMdx2: true,
	},
	async webpackFinal(config, { configType }) {
		config.module.rules = [
			...config.module.rules,
			{
				test: /\.css$/i,
				loader: "css-loader",
				options: {
					import: true,
				},
			}
		];
		return config;
	},
};
`

I'm having some issues with get code reproduction:
<img width="1023" alt="Captura de Pantalla 2023-01-16 a la(s) 22 19 04" src="https://user-images.githubusercontent.com/27156771/212789157-aefdc37f-86d1-4067-8da2-f54a586a8e90.png">

Now, the only workaround that i can use to solve this is write the props manually, in the story config.

Thanks a lot, hope I can find a solution.

### To Reproduce

_No response_

### System

```shell
System:
    OS: macOS 12.6
    CPU: (8) x64 Apple M1 Pro
  Binaries:
    Node: 14.20.1 - ~/.nvm/versions/node/v14.20.1/bin/node
    npm: 8.19.2 - ~/.nvm/versions/node/v14.20.1/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Firefox: 108.0.1
    Safari: 16.0
  npmPackages:
    @storybook/addon-actions: ^6.5.15 => 6.5.15 
    @storybook/addon-backgrounds: ^6.5.15 => 6.5.15 
    @storybook/addon-controls: ^6.5.15 => 6.5.15 
    @storybook/addon-docs: ^6.5.15 => 6.5.15 
    @storybook/addon-essentials: ^6.5.15 => 6.5.15 
    @storybook/addon-links: ^6.5.15 => 6.5.15 
    @storybook/addon-measure: ^6.5.15 => 6.5.15 
    @storybook/addon-outline: ^6.5.15 => 6.5.15 
    @storybook/addons: 6.5.15 => 7.0.0-beta.27 
    @storybook/builder-webpack5: ^6.5.15 => 6.5.15 
    @storybook/mdx2-csf: ^0.0.3 => 0.0.3 
    @storybook/react: ^6.5.15 => 6.5.15 
    @storybook/source-loader: 6.5.15 => 6.5.15
```


### Additional context

_No response_