Repository: storybook
Issue: [Bug]: Cannot read properties of undefined (reading 'every') when using essentials addon with typescript
Labels: bug,needs triage

### Describe the bug

With the [essentials](https://storybook.js.org/docs/essentials) addon installed, whilst using typescript, I am seeing the following error in certain scenarios:


<details>
  <summary>TypeError: Cannot read properties of undefined (reading 'every')</summary>
  
    at convert (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:52:28)
    at convert4 (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:143:59)
    at tsFactory (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:345:27)
    at extractProp (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:389:92)
    at http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:380:33
    at Array.map (<anonymous>)
    at extractComponentSectionObject (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:378:26)
    at extractComponentProps (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/chunk-XZPANCAW.js?v=3bd88a06:385:125)
    at getPropDefs (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/@storybook_react_dist_entry-preview-docs__mjs.js?v=3bd88a06:6200:24)
    at extractProps (http://localhost:6006/node_modules/.cache/storybook/1c3385a5d25e538d10b518b310c74d3ca2690b6aaffeadccd74da79736171f86/sb-vite/deps/@storybook_react_dist_entry-preview-docs__mjs.js?v=3bd88a06:6212:44)
</details>

### To Reproduce

https://github.com/Slessi/storybook-essentials-typescript-every-error

Just install and run, there is only one story, and it errors.
Here is a video:

https://github.com/storybookjs/storybook/assets/3223500/5c357c0a-78b0-4a41-a62b-b7530470e0ba

### System

```bash
System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /opt/homebrew/bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm <----- active
  Browsers:
    Chrome: 123.0.6312.59
    Safari: 17.4
  npmPackages:
    @storybook/addon-essentials: ^8.0.4 => 8.0.4 
    @storybook/react: ^8.0.4 => 8.0.4 
    @storybook/react-vite: ^8.0.4 => 8.0.4 
    storybook: ^8.0.4 => 8.0.4
```


### Additional context

In the attached reproduction, editing the typescript definition for `Foo` or removing the essentials addon seem to remove the error.

As an example, changing the `Foo` from a `type` to an `interface` fixes it, as does directly using `string | null` instead of referencing it from `Foo["bar"]`. In this simplified example, I am able to do these things, but these types are from generated files from a tool chain not in my control. In any case, there is nothing wrong with the types there, so it should work.