Skip to content

Conversation

@ndelangen
Copy link
Contributor

@ndelangen ndelangen commented Nov 29, 2025

We use execa in Storybook, and we ran into an issue where the type definitions are not valid.

@ndelangen ndelangen changed the title ExportVerboseOption, since it's imported in another file Export VerboseOption, since it's imported in another file Nov 29, 2025
@ehmicky
Copy link
Collaborator

ehmicky commented Nov 29, 2025

Hi @ndelangen,

Thanks for this PR.

we ran into an issue where the type definitions are not valid.

Can you please describe what the issue is? Including a minimal reproducing example using TypeScript playground and which type error you're getting. Thanks!

@sindresorhus
Copy link
Owner

Looks correct to me since it's imported here:

import type {VerboseOption} from '../verbose.js';

@sindresorhus
Copy link
Owner

sindresorhus commented Nov 29, 2025

The reason it's not caught is because .d.ts files are dumb and only work as ESM if you had export {}; to all files.

microsoft/TypeScript#57764

@sindresorhus sindresorhus merged commit 7891c39 into sindresorhus:main Nov 29, 2025
8 checks passed
@ndelangen
Copy link
Contributor Author

@ehmicky I can, but my use-case is rather niche, and so I doubt really anyone else would run into it.
Hence I didn't deem it too important to explain in full and demo the "problem".

Since the fix seemed rather innocent and correct, I opened the PR without further explaining.

The short version is:
Storybook core depends on a lot of package, but to reduce the install size and time, we bundle a lot of them at compile/release. This includes execa and it's types.

The rollup-dts-plugin reported the problem of the non-exported property that's referenced in another file.

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 1, 2025
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | execa   | 9.6.0 | 9.6.1 |


## [v9.6.1](https://github.com/sindresorhus/execa/releases/tag/v9.6.1)

- Fix `VerboseOption` type not being properly exported ([#1215](sindresorhus/execa#1215))  [`7891c39`](sindresorhus/execa@7891c39)

***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants