sindresorhus / open

Open stuff like URLs, files, executables. Cross-platform.
MIT License
3.14k stars 213 forks source link

Not using a default export #305

Closed Huguesmmm closed 1 year ago

Huguesmmm commented 1 year ago

There is a problem caused by exporting 'open' without using the 'default' keyword in the index.d.ts file.

The error when trying to import :

Module '".../node_modules/open/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flagts(1259)
index.d.ts(153, 1): This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
sindresorhus commented 1 year ago

Fixed in v9: https://github.com/sindresorhus/open/releases/tag/v9.0.0